Index: third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
index 2155f0fb821d12c15e88232f0b100bd6df333086..55653fc57e0a6d42549b07b5f36d2ad0d8dc4e72 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
@@ -2890,6 +2890,31 @@ bool LayoutBlock::tryLayoutDoingPositionedMovementOnly() |
return true; |
} |
+static void invalidteDisplayItemClientsOfInlineBoxRecursively(InlineBox& box) |
rune
2015/12/02 09:00:49
invalidte -> invalidate
Xianzhu
2015/12/02 17:41:57
Done.
|
+{ |
+ box.layoutObject().invalidateDisplayItemClient(box); |
+ if (!box.isInlineFlowBox()) |
+ return; |
+ for (InlineBox* child = toInlineFlowBox(box).firstChild(); child; child = child->nextOnLine()) |
+ invalidteDisplayItemClientsOfInlineBoxRecursively(*child); |
+} |
+ |
+void LayoutBlock::invalidateDisplayItemClientsOfFirstLine() |
mstensho (USE GERRIT)
2015/12/02 10:09:31
Lines are only interesting in block containers, i.
Xianzhu
2015/12/02 17:41:57
Done. Separated this method into LayoutBlock::firs
mstensho (USE GERRIT)
2015/12/03 12:08:10
Acknowledged.
|
+{ |
+ if (childrenInline()) { |
+ // This block has the first line. |
+ if (RootInlineBox* firstRootBox = this->firstRootBox()) |
+ invalidteDisplayItemClientsOfInlineBoxRecursively(*firstRootBox); |
+ return; |
+ } |
+ |
+ // Let the first child flow find the first line. |
+ if (LayoutObject* child = firstChild()) { |
+ if (!child->isFloatingOrOutOfFlowPositioned() && child->isLayoutBlock()) |
mstensho (USE GERRIT)
2015/12/02 10:09:31
Should only allow LayoutBlockFlow here. It's okay
Xianzhu
2015/12/02 17:41:57
Done. Now this is in LayoutBlock::firstLineContain
|
+ toLayoutBlock(child)->invalidateDisplayItemClientsOfFirstLine(); |
+ } |
+} |
+ |
#if ENABLE(ASSERT) |
void LayoutBlock::checkPositionedObjectsNeedLayout() |
{ |