本文整理汇总了C++中RenderFlowThread::renderRegionList方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderFlowThread::renderRegionList方法的具体用法?C++ RenderFlowThread::renderRegionList怎么用?C++ RenderFlowThread::renderRegionList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderFlowThread
的用法示例。
在下文中一共展示了RenderFlowThread::renderRegionList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: containingRegion
RenderRegion* RootInlineBox::containingRegion() const
{
ContainingRegionMap& regionMap = containingRegionMap(blockFlow());
bool hasContainingRegion = regionMap.contains(this);
RenderRegion* region = hasContainingRegion ? regionMap.get(this) : nullptr;
#ifndef NDEBUG
if (hasContainingRegion) {
RenderFlowThread* flowThread = blockFlow().flowThreadContainingBlock();
const RenderRegionList& regionList = flowThread->renderRegionList();
ASSERT_WITH_SECURITY_IMPLICATION(regionList.contains(region));
}
#endif
return region;
}
示例2: buildObjectForRendererFragments
static PassRefPtr<InspectorArray> buildObjectForRendererFragments(RenderObject* renderer, const HighlightConfig& config)
{
RefPtr<InspectorArray> fragmentsArray = InspectorArray::create();
RenderFlowThread* containingFlowThread = renderer->flowThreadContainingBlock();
if (!containingFlowThread) {
Highlight highlight;
buildRendererHighlight(renderer, nullptr, config, &highlight, InspectorOverlay::CoordinateSystem::View);
fragmentsArray->pushObject(buildObjectForHighlight(highlight));
} else {
RenderRegion* startRegion = nullptr;
RenderRegion* endRegion = nullptr;
if (!containingFlowThread->getRegionRangeForBox(&renderer->enclosingBox(), startRegion, endRegion)) {
// The flow has no visible regions. The renderer is not visible on screen.
return nullptr;
}
const RenderRegionList& regionList = containingFlowThread->renderRegionList();
for (RenderRegionList::const_iterator iter = regionList.find(startRegion); iter != regionList.end(); ++iter) {
RenderRegion* region = *iter;
if (region->isValid()) {
// Compute the highlight of the fragment inside the current region.
Highlight highlight;
buildRendererHighlight(renderer, region, config, &highlight, InspectorOverlay::CoordinateSystem::View);
RefPtr<InspectorObject> fragmentObject = buildObjectForHighlight(highlight);
// Compute the clipping area of the region.
fragmentObject->setObject("region", buildObjectForCSSRegionContentClip(region));
fragmentsArray->pushObject(fragmentObject.release());
}
if (region == endRegion)
break;
}
}
return fragmentsArray.release();
}