コード例 #1
0
void MultiColumnFragmentainerGroup::addContentRun(LayoutUnit 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() < m_columnSet.usedColumnCount())
        m_contentRuns.append(ContentRun(endOffsetInFlowThread));
}
コード例 #2
0
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));
}
コード例 #3
0
void RenderMultiColumnSet::addForcedBreak(LayoutUnit offsetFromFirstPage)
{
    if (!multiColumnFlowThread()->requiresBalancing())
        return;
    if (!m_contentRuns.isEmpty() && offsetFromFirstPage <= 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() < m_computedColumnCount)
        m_contentRuns.append(ContentRun(offsetFromFirstPage));
}
コード例 #4
0
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));
}