本文整理汇总了C++中LayoutObject::alwaysCreateLineBoxesForLayoutInline方法的典型用法代码示例。如果您正苦于以下问题:C++ LayoutObject::alwaysCreateLineBoxesForLayoutInline方法的具体用法?C++ LayoutObject::alwaysCreateLineBoxesForLayoutInline怎么用?C++ LayoutObject::alwaysCreateLineBoxesForLayoutInline使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayoutObject
的用法示例。
在下文中一共展示了LayoutObject::alwaysCreateLineBoxesForLayoutInline方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: push
void LayoutAnalyzer::push(const LayoutObject& o)
{
increment(TotalLayoutObjectsThatWereLaidOut);
if (!o.everHadLayout())
increment(LayoutObjectsThatHadNeverHadLayout);
if (o.selfNeedsLayout())
increment(LayoutObjectsThatNeedLayoutForThemselves);
if (o.needsPositionedMovementLayout())
increment(LayoutObjectsThatNeedPositionedMovementLayout);
if (o.isOutOfFlowPositioned())
increment(LayoutObjectsThatAreOutOfFlowPositioned);
if (o.isTableCell())
increment(LayoutObjectsThatAreTableCells);
if (o.isFloating())
increment(LayoutObjectsThatAreFloating);
if (o.style()->specifiesColumns())
increment(LayoutObjectsThatSpecifyColumns);
if (o.hasLayer())
increment(LayoutObjectsThatHaveALayer);
if (o.isLayoutInline() && o.alwaysCreateLineBoxesForLayoutInline())
increment(LayoutInlineObjectsThatAlwaysCreateLineBoxes);
if (o.isText()) {
const LayoutText& t = *toLayoutText(&o);
if (t.canUseSimpleFontCodePath()) {
increment(LayoutObjectsThatAreTextAndCanUseTheSimpleFontCodePath);
increment(CharactersInLayoutObjectsThatAreTextAndCanUseTheSimpleFontCodePath, t.textLength());
} else {
increment(LayoutObjectsThatAreTextAndCanNotUseTheSimpleFontCodePath);
increment(CharactersInLayoutObjectsThatAreTextAndCanNotUseTheSimpleFontCodePath, t.textLength());
}
}
// This might be a root in a subtree layout, in which case the LayoutObject
// has a parent but the stack is empty. If a LayoutObject subclass forgets
// to call push() and is a root in a subtree layout, then this
// assert would only fail if that LayoutObject instance has any children
// that need layout and do call push().
// LayoutBlock::layoutPositionedObjects() hoists positioned descendants.
// LayoutBlockFlow::layoutInlineChildren() walks through inlines.
// LayoutTableSection::layoutRows() walks through rows.
if (!o.isPositioned()
&& !o.isTableCell()
&& !o.isSVGResourceContainer()
&& (m_stack.size() != 0)
&& !(o.parent()->childrenInline()
&& (o.isReplaced() || o.isFloating() || o.isOutOfFlowPositioned()))) {
ASSERT(o.parent() == m_stack.peek());
}
m_stack.push(&o);
// This refers to LayoutAnalyzer depth, not layout tree depth or DOM tree
// depth. LayoutAnalyzer depth is generally closer to C++ stack recursion
// depth. See above exceptions for when LayoutAnalyzer depth != layout tree
// depth.
if (m_stack.size() > m_counters[LayoutAnalyzerStackMaximumDepth])
m_counters[LayoutAnalyzerStackMaximumDepth] = m_stack.size();
}
示例2: push
void LayoutAnalyzer::push(const LayoutObject& o)
{
increment(TotalLayoutObjectsThatWereLaidOut);
if (!o.everHadLayout())
increment(LayoutObjectsThatHadNeverHadLayout);
if (o.selfNeedsLayout())
increment(LayoutObjectsThatNeedLayoutForThemselves);
if (o.needsPositionedMovementLayout())
increment(LayoutObjectsThatNeedPositionedMovementLayout);
if (o.isOutOfFlowPositioned())
increment(LayoutObjectsThatAreOutOfFlowPositioned);
if (o.isTableCell())
increment(LayoutObjectsThatAreTableCells);
if (o.isFloating())
increment(LayoutObjectsThatAreFloating);
if (o.style()->specifiesColumns())
increment(LayoutObjectsThatSpecifyColumns);
if (o.hasLayer())
increment(LayoutObjectsThatHaveALayer);
if (o.isLayoutInline() && o.alwaysCreateLineBoxesForLayoutInline())
increment(LayoutInlineObjectsThatAlwaysCreateLineBoxes);
if (o.isText()) {
const LayoutText& t = *toLayoutText(&o);
if (t.canUseSimpleFontCodePath()) {
increment(LayoutObjectsThatAreTextAndCanUseTheSimpleFontCodePath);
increment(CharactersInLayoutObjectsThatAreTextAndCanUseTheSimpleFontCodePath, t.textLength());
} else {
increment(LayoutObjectsThatAreTextAndCanNotUseTheSimpleFontCodePath);
increment(CharactersInLayoutObjectsThatAreTextAndCanNotUseTheSimpleFontCodePath, t.textLength());
}
}
++m_depth;
// This refers to LayoutAnalyzer depth, which is generally closer to C++
// stack recursion depth, not layout tree depth or DOM tree depth.
m_counters[LayoutAnalyzerStackMaximumDepth] = max(m_counters[LayoutAnalyzerStackMaximumDepth], m_depth);
}