Ejemplo n.º 1
0
ColumnBalancer::ColumnBalancer(const LayoutMultiColumnSet& columnSet,
                               LayoutUnit logicalTopInFlowThread,
                               LayoutUnit logicalBottomInFlowThread)
    : m_columnSet(columnSet),
      m_logicalTopInFlowThread(logicalTopInFlowThread),
      m_logicalBottomInFlowThread(logicalBottomInFlowThread) {
  DCHECK_GE(columnSet.usedColumnCount(), 1U);
}
Ejemplo n.º 2
0
InitialColumnHeightFinder::InitialColumnHeightFinder(
    const LayoutMultiColumnSet& columnSet,
    LayoutUnit logicalTopInFlowThread,
    LayoutUnit logicalBottomInFlowThread)
    : ColumnBalancer(columnSet,
                     logicalTopInFlowThread,
                     logicalBottomInFlowThread) {
  m_shortestStruts.resize(columnSet.usedColumnCount());
  for (auto& strut : m_shortestStruts)
    strut = LayoutUnit::max();
  traverse();
  // We have now found each explicit / forced break, and their location. Now we
  // need to figure out how many additional implicit / soft breaks we need and
  // guess where they will occur, in order
  // to provide an initial column height.
  distributeImplicitBreaks();
}