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

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

Issue 1266553002: Include overflow when setting the logical flowthread bottom on the last column set. (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 a613daef42ecd0fe7acc4ad54387a0145fa35dfd..62515fba8536d2bf42ff0f2f4e373544c5771486 100644
--- a/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -871,8 +871,16 @@ void LayoutMultiColumnFlowThread::layout()
if (LayoutMultiColumnSet* lastSet = lastMultiColumnSet()) {
ASSERT(lastSet == m_lastSetWorkedOn);
if (!lastSet->nextSiblingMultiColumnBox()) {
- lastSet->endFlow(logicalHeight());
- lastSet->expandToEncompassFlowThreadContentsIfNeeded();
+ // Include trailing overflow in the last column set. The idea is that we will generate
+ // additional columns and pages to hold that overflow, since people do write bad content
+ // like <body style="height:0px"> in multi-column layouts.
+ // TODO(mstensho): Once we support nested multicol, adding in overflow here may result
+ // in the need for creating additional rows, since there may not be enough space
+ // remaining in the currently last row.
+ LayoutRect layoutRect = layoutOverflowRect();
+ LayoutUnit logicalBottomInFlowThread = isHorizontalWritingMode() ? layoutRect.maxY() : layoutRect.maxX();
+ ASSERT(logicalBottomInFlowThread >= logicalHeight());
+ lastSet->endFlow(logicalBottomInFlowThread);
}
}
m_lastSetWorkedOn = nullptr;

Powered by Google App Engine
This is Rietveld 408576698