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

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

Issue 2486423003: Dirty lineboxes when adding floats to a nested empty inline (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/fast/block/float/float-should-dirty-line-when-adjacent-to-line-breaks-2-expected.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 f63948a40d51aebba58657fbf6155f21bd87c46f..7938afb2dd6040150e4b243f33613013fa9d8203 100644
--- a/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
+++ b/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
@@ -291,11 +291,15 @@ void LineBoxList::dirtyLinesFromChangedChild(LineLayoutItem container,
// check the siblings of our inline parent. If we didn't find a line box, then
// use our parent's first line box.
RootInlineBox* box = nullptr;
- LineLayoutItem curr = child.isFloating() && !child.previousSibling() &&
- child.parent() &&
- child.parent().isLayoutInline()
- ? child.parent().previousSibling()
- : child.previousSibling();
+ 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();
+ }
+
for (; curr; curr = curr.previousSibling()) {
if (curr.isFloatingOrOutOfFlowPositioned())
continue;
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/block/float/float-should-dirty-line-when-adjacent-to-line-breaks-2-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698