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

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

Issue 2046863006: Dirty line boxes correctly when a float gets layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@618230
Patch Set: Updated Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-9-expected.txt ('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 486227bc3c92845c5b6ade53d189a9572ee0d2e0..2d24f8818e9601b5138468a1742fad96d9331319 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -1590,7 +1590,12 @@ void LayoutBlockFlow::layoutInlineChildren(bool relayoutChildren, LayoutUnit& pa
layoutState.floats().append(FloatWithRect(box));
if (box->needsLayout()) {
box->layout();
- markLinesDirtyInBlockRange(toLayoutBox(o)->logicalTop(), toLayoutBox(o)->logicalBottom());
+ // 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.
+ bool ancestorLineBoxWasDirty = ancestorLineBoxDirty();
+ setAncestorLineBoxDirty(false);
+ dirtyLinesFromChangedChild(box);
+ setAncestorLineBoxDirty(ancestorLineBoxWasDirty);
eae 2016/06/10 06:20:41 Shouldn't this be setAncestorLineBoxDirty(ancestor
rhogan 2016/06/10 17:25:13 Oh I have it the wrong way round. I need to set it
}
} else if (isFullLayout || o->needsLayout()) {
// Atomic inline.
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-9-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698