Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: Source/core/layout/LayoutMultiColumnFlowThread.cpp

Issue 1241703005: Make sure that no column rows get negative flow thread portion heights. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698