本文整理汇总了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();
}
示例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);
}