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 { |