Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Side by Side Diff: Source/core/layout/line/BreakingContextInlineHeaders.h

Issue 763173003: Convert RenderBlockFlow code to use FloatingObject references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/layout/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/line/LineBreaker.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * Copyright (C) 2013 Adobe Systems Incorporated. 5 * Copyright (C) 2013 Adobe Systems Incorporated.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 365 }
366 366
367 inline void BreakingContext::handleFloat() 367 inline void BreakingContext::handleFloat()
368 { 368 {
369 LayoutBox* floatBox = toLayoutBox(m_current.object()); 369 LayoutBox* floatBox = toLayoutBox(m_current.object());
370 FloatingObject* floatingObject = m_block->insertFloatingObject(*floatBox); 370 FloatingObject* floatingObject = m_block->insertFloatingObject(*floatBox);
371 // check if it fits in the current line. 371 // check if it fits in the current line.
372 // If it does, position it now, otherwise, position 372 // If it does, position it now, otherwise, position
373 // it after moving to next line (in newLine() func) 373 // it after moving to next line (in newLine() func)
374 // FIXME: Bug 110372: Properly position multiple stacked floats with non-rec tangular shape outside. 374 // FIXME: Bug 110372: Properly position multiple stacked floats with non-rec tangular shape outside.
375 if (m_floatsFitOnLine && m_width.fitsOnLine(m_block->logicalWidthForFloat(fl oatingObject).toFloat(), ExcludeWhitespace)) { 375 if (m_floatsFitOnLine && m_width.fitsOnLine(m_block->logicalWidthForFloat(*f loatingObject).toFloat(), ExcludeWhitespace)) {
376 m_block->positionNewFloatOnLine(floatingObject, m_lastFloatFromPreviousL ine, m_lineInfo, m_width); 376 m_block->positionNewFloatOnLine(*floatingObject, m_lastFloatFromPrevious Line, m_lineInfo, m_width);
377 if (m_lineBreak.object() == m_current.object()) { 377 if (m_lineBreak.object() == m_current.object()) {
378 ASSERT(!m_lineBreak.offset()); 378 ASSERT(!m_lineBreak.offset());
379 m_lineBreak.increment(); 379 m_lineBreak.increment();
380 } 380 }
381 } else { 381 } else {
382 m_floatsFitOnLine = false; 382 m_floatsFitOnLine = false;
383 } 383 }
384 // Update prior line break context characters, using U+FFFD (OBJECT REPLACEM ENT CHARACTER) for floating element. 384 // Update prior line break context characters, using U+FFFD (OBJECT REPLACEM ENT CHARACTER) for floating element.
385 m_layoutTextInfo.m_lineBreakIterator.updatePriorContext(replacementCharacter ); 385 m_layoutTextInfo.m_lineBreakIterator.updatePriorContext(replacementCharacter );
386 } 386 }
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 902
903 if (style.textIndentType() == TextIndentHanging) 903 if (style.textIndentType() == TextIndentHanging)
904 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In dentText; 904 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In dentText;
905 905
906 return shouldIndentText; 906 return shouldIndentText;
907 } 907 }
908 908
909 } 909 }
910 910
911 #endif // BreakingContextInlineHeaders_h 911 #endif // BreakingContextInlineHeaders_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/line/LineBreaker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698