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

Unified Diff: third_party/WebKit/Source/core/layout/line/LineBoxList.cpp

Issue 2686913002: Stay within the containing block when looking for a line to dirty. (Closed)
Patch Set: Created 3 years, 10 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/fast/block/float/relayout-nested-float-after-line.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/line/LineBoxList.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp b/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
index 77b3069d5110660677a1922f67850af17ce08149..29888e5529daebad3b6c03170f6ae4e62360f505 100644
--- a/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
+++ b/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
@@ -293,11 +293,13 @@ void LineBoxList::dirtyLinesFromChangedChild(LineLayoutItem container,
RootInlineBox* box = nullptr;
LineLayoutItem curr = child.previousSibling();
if (child.isFloating() && !curr) {
- LineLayoutItem parent = child.parent();
- while (parent && parent.isLayoutInline() && !parent.previousSibling())
- parent = parent.parent();
- if (parent)
- curr = parent.previousSibling();
+ LineLayoutInline outerInline;
+ for (LineLayoutItem parent = child.parent();
+ parent && parent.isLayoutInline() && !parent.previousSibling();
+ parent = parent.parent())
+ outerInline = LineLayoutInline(parent);
+ if (outerInline)
+ curr = outerInline.previousSibling();
}
for (; curr; curr = curr.previousSibling()) {
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/block/float/relayout-nested-float-after-line.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698