Index: third_party/WebKit/Source/core/layout/LayoutInline.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp |
index 3e85d7a1ad729b3234230c8b410dc4a333d537d1..4b37343eb7e6fafb1b1decadc9a2dac90ed7f1a5 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp |
@@ -437,19 +437,19 @@ void LayoutInline::splitInlines(LayoutBlock* fromBlock, LayoutBlock* toBlock, |
void LayoutInline::splitFlow(LayoutObject* beforeChild, LayoutBlock* newBlockBox, |
LayoutObject* newChild, LayoutBoxModelObject* oldCont) |
{ |
+ LayoutBlockFlow* containingBlockFlow = toLayoutBlockFlow(containingBlock()); |
LayoutBlock* pre = nullptr; |
- LayoutBlock* block = containingBlock(); |
+ LayoutBlock* block = containingBlockFlow; |
// Delete our line boxes before we do the inline split into continuations. |
- block->deleteLineBoxTree(); |
+ containingBlockFlow->deleteLineBoxTree(); |
bool madeNewBeforeBlock = false; |
if (block->isAnonymousBlock() && (!block->parent() || !block->parent()->createsAnonymousWrapper())) { |
// We can reuse this block and make it the preBlock of the next continuation. |
- pre = block; |
- pre->removePositionedObjects(nullptr); |
- if (pre->isLayoutBlockFlow()) |
- toLayoutBlockFlow(pre)->removeFloatingObjects(); |
+ containingBlockFlow->removePositionedObjects(nullptr); |
+ containingBlockFlow->removeFloatingObjects(); |
+ pre = containingBlockFlow; |
block = block->containingBlock(); |
} else { |
// No anonymous block available for use. Make one. |