Index: Source/core/layout/LayoutMultiColumnFlowThread.cpp |
diff --git a/Source/core/layout/LayoutMultiColumnFlowThread.cpp b/Source/core/layout/LayoutMultiColumnFlowThread.cpp |
index 38fdb188cef181b7690b663550ede9848a22901a..a613daef42ecd0fe7acc4ad54387a0145fa35dfd 100644 |
--- a/Source/core/layout/LayoutMultiColumnFlowThread.cpp |
+++ b/Source/core/layout/LayoutMultiColumnFlowThread.cpp |
@@ -593,8 +593,12 @@ void LayoutMultiColumnFlowThread::skipColumnSpanner(LayoutBox* layoutObject, Lay |
ASSERT(layoutObject->isColumnSpanAll()); |
LayoutMultiColumnSpannerPlaceholder* placeholder = layoutObject->spannerPlaceholder(); |
LayoutBox* previousColumnBox = placeholder->previousSiblingMultiColumnBox(); |
- if (previousColumnBox && previousColumnBox->isLayoutMultiColumnSet()) |
- toLayoutMultiColumnSet(previousColumnBox)->endFlow(logicalTopInFlowThread); |
+ if (previousColumnBox && previousColumnBox->isLayoutMultiColumnSet()) { |
+ LayoutMultiColumnSet* columnSet = toLayoutMultiColumnSet(previousColumnBox); |
+ if (logicalTopInFlowThread < columnSet->logicalTopInFlowThread()) |
+ logicalTopInFlowThread = columnSet->logicalTopInFlowThread(); // Negative margins may cause this. |
+ columnSet->endFlow(logicalTopInFlowThread); |
+ } |
LayoutBox* nextColumnBox = placeholder->nextSiblingMultiColumnBox(); |
if (nextColumnBox && nextColumnBox->isLayoutMultiColumnSet()) { |
LayoutMultiColumnSet* nextSet = toLayoutMultiColumnSet(nextColumnBox); |