Index: Source/core/rendering/RenderMultiColumnFlowThread.cpp |
diff --git a/Source/core/rendering/RenderMultiColumnFlowThread.cpp b/Source/core/rendering/RenderMultiColumnFlowThread.cpp |
index c71439b5ed9062f126dd016aa24b993a06989db8..487dc477fae4780aa4e5a356e9ea1205e6dda420 100644 |
--- a/Source/core/rendering/RenderMultiColumnFlowThread.cpp |
+++ b/Source/core/rendering/RenderMultiColumnFlowThread.cpp |
@@ -278,6 +278,13 @@ void RenderMultiColumnFlowThread::layout() |
void RenderMultiColumnFlowThread::setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) |
{ |
+ // Only positive values are interesting (and allowed) here. Zero space shortage may be reported |
+ // when we're at the top of a column and the element has zero height. Ignore this, and also |
+ // ignore any negative values, which may occur when we set an early break in order to honor |
+ // widows in the next column. |
+ if (spaceShortage <= 0) |
+ return; |
+ |
if (RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(regionAtBlockOffset(offset))) |
multicolSet->recordSpaceShortage(spaceShortage); |
} |