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

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

Issue 2539813002: Avoid rogue line float re-layout. (Closed)
Patch Set: Created 4 years, 1 month 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 | « third_party/WebKit/LayoutTests/fragmentation/change-fragmentainer-height-line-float.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
index 46e94f452b875caac46a725053240b33749485e5..5a344cf52f06f390bc6052a41b38c166aa9fd897 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -1932,10 +1932,10 @@ void LayoutBlockFlow::layoutInlineChildren(bool relayoutChildren,
} else if (o->isFloating()) {
layoutState.floats().append(FloatWithRect(box));
if (box->needsLayout()) {
- box->layout();
- // Dirty any lineboxes potentially affected by the float, but don't
- // search outside this object as we are only interested in dirtying
- // lineboxes to which we may attach the float.
+ // Be sure to at least mark the first line affected by the float as
+ // dirty, so that the float gets relaid out. Otherwise we'll miss
+ // it. After float layout, if it turns out that it changed size,
+ // any lines after this line will be deleted and relaid out.
dirtyLinesFromChangedChild(box, MarkOnlyThis);
}
} else if (isFullLayout || o->needsLayout()) {
« no previous file with comments | « third_party/WebKit/LayoutTests/fragmentation/change-fragmentainer-height-line-float.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698