diff options
Diffstat (limited to 'Source/WebCore')
-rw-r--r-- | Source/WebCore/rendering/RenderBlock.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp index 15e9fd9..d01ced8 100644 --- a/Source/WebCore/rendering/RenderBlock.cpp +++ b/Source/WebCore/rendering/RenderBlock.cpp @@ -663,8 +663,22 @@ RenderBlock* RenderBlock::columnsBlockForSpanningElement(RenderObject* newChild) && !newChild->isFloatingOrPositioned() && !newChild->isInline() && !isAnonymousColumnSpanBlock()) { if (style()->specifiesColumns()) columnsBlockAncestor = this; - else if (!isInline() && parent() && parent()->isRenderBlock()) + else if (!isInline() && parent() && parent()->isRenderBlock()) { columnsBlockAncestor = toRenderBlock(parent())->containingColumnsBlock(false); + + if (columnsBlockAncestor) { + // Make sure that none of the parent ancestors have a continuation. + // If yes, we do not want split the block into continuations. + RenderObject* curr = this; + while (curr && curr != columnsBlockAncestor) { + if (curr->isRenderBlock() && toRenderBlock(curr)->continuation()) { + columnsBlockAncestor = 0; + break; + } + curr = curr->parent(); + } + } + } } return columnsBlockAncestor; } |