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

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

Issue 1473363003: Invalidate first line display item clients when first line style changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Recurse into first block child Created 5 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
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 2769ce4aa7677d610b11012db7e306298b7010f8..51b59da4c81369c81662ec8fe4fa3284fa91531c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -2065,4 +2065,21 @@ LayoutUnit LayoutBlockFlow::startAlignedOffsetForLine(LayoutUnit position, bool
return logicalLeft;
}
+static void invalidateDisplayItemClientsOfInlineBoxRecursively(LayoutBlockFlow* flow, InlineBox& box)
+{
+ flow->invalidateDisplayItemClient(box);
+ if (!box.isInlineFlowBox())
+ return;
+ for (InlineBox* curr = toInlineFlowBox(box).firstChild(); curr; curr = curr->nextOnLine())
+ invalidateDisplayItemClientsOfInlineBoxRecursively(flow, *curr);
+}
+
+void LayoutBlockFlow::invalidateDisplayItemClientsOfFirstLine()
+{
+ if (RootInlineBox* firstRootBox = this->firstRootBox())
+ invalidateDisplayItemClientsOfInlineBoxRecursively(this, *firstRootBox);
+ else if (firstChild()->isLayoutBlockFlow())
+ toLayoutBlockFlow(firstChild())->invalidateDisplayItemClientsOfFirstLine();
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698