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

Unified Diff: Source/core/layout/LayoutBlockFlowLine.cpp

Issue 1306733003: Don't add floats on clean lines to new lineboxes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/block/float/float-on-clean-line-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBlockFlowLine.cpp
diff --git a/Source/core/layout/LayoutBlockFlowLine.cpp b/Source/core/layout/LayoutBlockFlowLine.cpp
index 77c6656f3981fdf33291fa5d194d91a5ee82645a..40e41a5b7c3a5639d4fc034b39d143270df21da3 100644
--- a/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -900,6 +900,10 @@ void LayoutBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState,
}
for (; it != end; ++it) {
FloatingObject& floatingObject = *it->get();
+ // If we've reached the start of clean lines any remaining floating children belong to them.
+ // We don't care about the 'last float' mechanism once we're in clean lines so it's ok to let it get set below.
+ if (floatingObject.layoutObject() == cleanLineStart.object())
+ break;
appendFloatingObjectToLastLine(floatingObject);
ASSERT(floatingObject.layoutObject() == layoutState.floats()[layoutState.floatIndex()].object);
// If a float's geometry has changed, give up on syncing with clean lines.
« no previous file with comments | « LayoutTests/fast/block/float/float-on-clean-line-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698