Index: Source/core/layout/LayoutBlock.cpp |
diff --git a/Source/core/layout/LayoutBlock.cpp b/Source/core/layout/LayoutBlock.cpp |
index 116c979367c9b7c7fc0eb820d6eeff761531ee70..bd2ae4a4dacab025edc67144fad8e415dd676973 100644 |
--- a/Source/core/layout/LayoutBlock.cpp |
+++ b/Source/core/layout/LayoutBlock.cpp |
@@ -449,6 +449,21 @@ void LayoutBlock::addChildIgnoringContinuation(LayoutObject* newChild, LayoutObj |
LayoutBlock* newBox = createAnonymousBlock(); |
LayoutBox::addChild(newBox, beforeChild); |
newBox->addChild(newChild); |
+ LayoutObject* nextChild = beforeChild; |
+ // Reparent adjacent inline siblings to the new box. |
mstensho (USE GERRIT)
2015/08/26 19:44:15
As szager has already pointed out, how could there
|
+ while (nextChild && (nextChild->isFloatingOrOutOfFlowPositioned() || nextChild->isInline() || nextChild->isAnonymousBlock())) { |
szager1
2015/08/26 17:04:40
nextChild->isInline() should never be true here
|
+ LayoutObject* sibling = nextChild->nextSibling(); |
+ if (nextChild->isAnonymousBlock()) { |
+ LayoutBlockFlow* nextBlock = toLayoutBlockFlow(nextChild); |
+ nextBlock->moveAllChildrenIncludingFloatsTo(newBox, true); |
+ // Delete the now-empty block's lines and nuke it. |
+ nextBlock->deleteLineBoxTree(); |
szager1
2015/08/26 17:04:40
Redundant? nextBlock->moveAllChildrenIncludingFlo
|
+ nextBlock->destroy(); |
+ } else { |
+ moveChildTo(newBox, nextChild, 0, true); |
+ } |
+ nextChild = sibling; |
+ } |
return; |
} |
} |