Index: Source/core/rendering/RenderBlockFlow.cpp |
diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp |
index 391f2db532359af17708f47fd591a0dab7fbd63b..1d7d6918238ef36b82bf185d1ada884ae0b19c3a 100644 |
--- a/Source/core/rendering/RenderBlockFlow.cpp |
+++ b/Source/core/rendering/RenderBlockFlow.cpp |
@@ -683,6 +683,11 @@ void RenderBlockFlow::layoutBlockChild(RenderBox& child, MarginInfo& marginInfo, |
if (newHeight != size().height()) |
setLogicalHeight(newHeight); |
} |
+ |
+ if (child.isRenderMultiColumnSpannerPlaceholder()) { |
+ // The actual column-span:all element is positioned by this placeholder child. |
+ positionSpannerDescendant(toRenderMultiColumnSpannerPlaceholder(child)); |
+ } |
} |
LayoutUnit RenderBlockFlow::adjustBlockChildForPagination(LayoutUnit logicalTopAfterClear, LayoutUnit estimateWithoutPagination, RenderBox& child, bool atBeforeSideOfBlock) |
@@ -1060,7 +1065,10 @@ void RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, SubtreeLayoutSc |
} |
if (child->isColumnSpanAll()) { |
// This is not the containing block of the spanner. The spanner's placeholder will lay |
- // it out in due course. |
+ // it out in due course. For now we just need to consult our flow thread, so that the |
+ // columns (if any) preceding and following the spanner are laid out correctly. |
+ LayoutUnit adjustment = flowThreadContainingBlock()->skipColumnSpanner(child, offsetFromLogicalTopOfFirstPage() + logicalHeight()); |
+ setLogicalHeight(logicalHeight() + adjustment); |
continue; |
} |
@@ -2972,6 +2980,15 @@ void RenderBlockFlow::setPaginationStrut(LayoutUnit strut) |
m_rareData->m_paginationStrut = strut; |
} |
+void RenderBlockFlow::positionSpannerDescendant(RenderMultiColumnSpannerPlaceholder& child) |
+{ |
+ RenderBox& spanner = *child.rendererInFlowThread(); |
+ // FIXME: |spanner| is a descendant, but never a direct child, so the names here are bad, if |
+ // nothing else. |
+ setLogicalTopForChild(spanner, child.logicalTop()); |
+ determineLogicalLeftPositionForChild(spanner); |
+} |
+ |
bool RenderBlockFlow::avoidsFloats() const |
{ |
// Floats can't intrude into our box if we have a non-auto column count or width. |