本文整理汇总了C++中LayoutBlockFlow::lastLineBox方法的典型用法代码示例。如果您正苦于以下问题:C++ LayoutBlockFlow::lastLineBox方法的具体用法?C++ LayoutBlockFlow::lastLineBox怎么用?C++ LayoutBlockFlow::lastLineBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayoutBlockFlow
的用法示例。
在下文中一共展示了LayoutBlockFlow::lastLineBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: flowBoxForLayoutObject
static inline InlineFlowBox* flowBoxForLayoutObject(LayoutObject* layoutObject)
{
if (!layoutObject)
return nullptr;
if (layoutObject->isLayoutBlock()) {
// If we're given a block element, it has to be a LayoutSVGText.
ASSERT(layoutObject->isSVGText());
LayoutBlockFlow* layoutBlockFlow = toLayoutBlockFlow(layoutObject);
// LayoutSVGText only ever contains a single line box.
InlineFlowBox* flowBox = layoutBlockFlow->firstLineBox();
ASSERT(flowBox == layoutBlockFlow->lastLineBox());
return flowBox;
}
if (layoutObject->isLayoutInline()) {
// We're given a LayoutSVGInline or objects that derive from it (LayoutSVGTSpan / LayoutSVGTextPath)
LayoutInline* layoutInline = toLayoutInline(layoutObject);
// LayoutSVGInline only ever contains a single line box.
InlineFlowBox* flowBox = layoutInline->firstLineBox();
ASSERT(flowBox == layoutInline->lastLineBox());
return flowBox;
}
ASSERT_NOT_REACHED();
return nullptr;
}