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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp

Issue 2493833004: InitialColumnHeightFinder needs to take all expected rows into account. (Closed)
Patch Set: Code review Created 4 years, 1 month 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: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
index 489b429c5f4596364b4d994aa762a347689cdd81..7d251344bb3c5ea25451bd41e06cfeb678ccf201 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
@@ -164,6 +164,26 @@ bool LayoutMultiColumnSet::isPageLogicalHeightKnown() const {
return firstFragmentainerGroup().logicalHeight();
}
+bool LayoutMultiColumnSet::newFragmentainerGroupsAllowed() const {
+ if (!isPageLogicalHeightKnown()) {
+ // If we have no clue about the height of the multicol container, bail. This
+ // situation occurs initially when an auto-height multicol container is
+ // nested inside another auto-height multicol container. We need at least an
+ // estimated height of the outer multicol container before we can check what
+ // an inner fragmentainer group has room for.
+ // Its height is indefinite for now.
+ return false;
+ }
+ if (isInitialHeightCalculated()) {
+ // We only insert additional fragmentainer groups in the initial layout
+ // pass. We only want to balance columns in the last fragmentainer group (if
+ // we need to balance at all), so we want that last fragmentainer group to
+ // be the same one in all layout passes that follow.
+ return false;
+ }
+ return true;
+}
+
LayoutUnit LayoutMultiColumnSet::nextLogicalTopForUnbreakableContent(
LayoutUnit flowThreadOffset,
LayoutUnit contentLogicalHeight) const {

Powered by Google App Engine
This is Rietveld 408576698