当前位置: 首页>>代码示例>>C++>>正文


C++ LayoutMultiColumnFlowThread::isLayoutPagedFlowThread方法代码示例

本文整理汇总了C++中LayoutMultiColumnFlowThread::isLayoutPagedFlowThread方法的典型用法代码示例。如果您正苦于以下问题:C++ LayoutMultiColumnFlowThread::isLayoutPagedFlowThread方法的具体用法?C++ LayoutMultiColumnFlowThread::isLayoutPagedFlowThread怎么用?C++ LayoutMultiColumnFlowThread::isLayoutPagedFlowThread使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LayoutMultiColumnFlowThread的用法示例。


在下文中一共展示了LayoutMultiColumnFlowThread::isLayoutPagedFlowThread方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: heightIsAuto

bool LayoutMultiColumnSet::heightIsAuto() const
{
    LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread();
    if (!flowThread->isLayoutPagedFlowThread()) {
        // If support for the column-fill property isn't enabled, we want to behave as if
        // column-fill were auto, so that multicol containers with specified height don't get their
        // columns balanced (auto-height multicol containers will still get their columns balanced,
        // even if column-fill isn't 'balance' - in accordance with the spec). Pretending that
        // column-fill is auto also matches the old multicol implementation, which has no support
        // for this property.
        if (multiColumnBlockFlow()->style()->getColumnFill() == ColumnFillBalance)
            return true;
        if (LayoutBox* next = nextSiblingBox()) {
            if (next->isLayoutMultiColumnSpannerPlaceholder()) {
                // If we're followed by a spanner, we need to balance.
                return true;
            }
        }
    }
    return !flowThread->columnHeightAvailable();
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:21,代码来源:LayoutMultiColumnSet.cpp

示例2: examineBoxAfterEntering

void InitialColumnHeightFinder::examineBoxAfterEntering(
    const LayoutBox& box,
    EBreak previousBreakAfterValue) {
  if (isLogicalTopWithinBounds(flowThreadOffset() - box.paginationStrut())) {
    if (box.needsForcedBreakBefore(previousBreakAfterValue)) {
      addContentRun(flowThreadOffset());
    } else {
      ASSERT(isFirstAfterBreak(flowThreadOffset()) || !box.paginationStrut());
      if (isFirstAfterBreak(flowThreadOffset())) {
        // This box is first after a soft break.
        recordStrutBeforeOffset(flowThreadOffset(), box.paginationStrut());
      }
    }
  }

  if (box.getPaginationBreakability() != LayoutBox::AllowAnyBreaks) {
    LayoutUnit unsplittableLogicalHeight = box.logicalHeight();
    if (box.isFloating())
      unsplittableLogicalHeight += box.marginBefore() + box.marginAfter();
    m_tallestUnbreakableLogicalHeight =
        std::max(m_tallestUnbreakableLogicalHeight, unsplittableLogicalHeight);
    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);
}
开发者ID:ollie314,项目名称:chromium,代码行数:39,代码来源:ColumnBalancer.cpp


注:本文中的LayoutMultiColumnFlowThread::isLayoutPagedFlowThread方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。