| Index: third_party/WebKit/Source/core/layout/ColumnBalancer.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp b/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp
|
| index 60678cb328c4885b29e749b144a14213b7514e1f..e899eba2a810eb8e711b059d1411ad70ea4638fc 100644
|
| --- a/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp
|
| @@ -114,13 +114,17 @@ void InitialColumnHeightFinder::examineBoxAfterEntering(const LayoutBox& box)
|
| if (box.isFloating())
|
| unsplittableLogicalHeight += box.marginBefore() + box.marginAfter();
|
| m_tallestUnbreakableLogicalHeight = std::max(m_tallestUnbreakableLogicalHeight, unsplittableLogicalHeight);
|
| - } else if (box.isLayoutBlockFlow()) {
|
| - if (LayoutMultiColumnFlowThread* innerFlowThread = toLayoutBlockFlow(box).multiColumnFlowThread()) {
|
| - LayoutUnit offsetInInnerFlowThread = flowThreadOffset() - innerFlowThread->blockOffsetInEnclosingFragmentationContext();
|
| - LayoutUnit innerUnbreakableHeight = innerFlowThread->tallestUnbreakableLogicalHeight(offsetInInnerFlowThread);
|
| - m_tallestUnbreakableLogicalHeight = std::max(m_tallestUnbreakableLogicalHeight, innerUnbreakableHeight);
|
| - }
|
| + return;
|
| }
|
| + // Need to examine inner multicol containers to find their tallest unbreakable piece of content.
|
| + if (!box.isLayoutBlockFlow())
|
| + return;
|
| + LayoutMultiColumnFlowThread* innerFlowThread = toLayoutBlockFlow(box).multiColumnFlowThread();
|
| + if (!innerFlowThread || innerFlowThread->isLayoutPagedFlowThread())
|
| + return;
|
| + LayoutUnit offsetInInnerFlowThread = flowThreadOffset() - innerFlowThread->blockOffsetInEnclosingFragmentationContext();
|
| + LayoutUnit innerUnbreakableHeight = innerFlowThread->tallestUnbreakableLogicalHeight(offsetInInnerFlowThread);
|
| + m_tallestUnbreakableLogicalHeight = std::max(m_tallestUnbreakableLogicalHeight, innerUnbreakableHeight);
|
| }
|
|
|
| void InitialColumnHeightFinder::examineBoxBeforeLeaving(const LayoutBox& box)
|
| @@ -277,7 +281,7 @@ void MinimumSpaceShortageFinder::examineBoxAfterEntering(const LayoutBox& box)
|
| if (!box.isLayoutBlockFlow())
|
| return;
|
| LayoutMultiColumnFlowThread* flowThread = toLayoutBlockFlow(box).multiColumnFlowThread();
|
| - if (!flowThread)
|
| + if (!flowThread || flowThread->isLayoutPagedFlowThread())
|
| return;
|
| for (const LayoutMultiColumnSet* columnSet = flowThread->firstMultiColumnSet(); columnSet; columnSet = columnSet->nextSiblingMultiColumnSet()) {
|
| for (const MultiColumnFragmentainerGroup& row : columnSet->fragmentainerGroups()) {
|
|
|