void InitialColumnHeightFinder::addContentRun(LayoutUnit endOffsetInFlowThread) { endOffsetInFlowThread -= spaceUsedByStrutsAt(endOffsetInFlowThread); if (!m_contentRuns.isEmpty() && endOffsetInFlowThread <= m_contentRuns.last().breakOffset()) return; // Append another item as long as we haven't exceeded used column count. What ends up in the // overflow area shouldn't affect column balancing. if (m_contentRuns.size() < group().columnSet().usedColumnCount()) m_contentRuns.append(ContentRun(endOffsetInFlowThread)); }
void InitialColumnHeightFinder::addContentRun( LayoutUnit endOffsetInFlowThread) { endOffsetInFlowThread -= spaceUsedByStrutsAt(endOffsetInFlowThread); if (!m_contentRuns.isEmpty() && endOffsetInFlowThread <= m_contentRuns.back().breakOffset()) return; // Append another item as long as we haven't exceeded used column count. What // ends up in the overflow area shouldn't affect column balancing. However, if // we're in a nested fragmentation context, we may still need to record all // runs, since there'll be no overflow area in the inline direction then, but // rather additional rows of columns in multiple outer fragmentainers. if (m_contentRuns.size() >= columnSet().usedColumnCount()) { const auto* flowThread = columnSet().multiColumnFlowThread(); if (!flowThread->enclosingFragmentationContext() || columnSet().newFragmentainerGroupsAllowed()) return; } m_contentRuns.append(ContentRun(endOffsetInFlowThread)); }