本文整理汇总了C++中RenderFlowThread::isRenderNamedFlowThread方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderFlowThread::isRenderNamedFlowThread方法的具体用法?C++ RenderFlowThread::isRenderNamedFlowThread怎么用?C++ RenderFlowThread::isRenderNamedFlowThread使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderFlowThread
的用法示例。
在下文中一共展示了RenderFlowThread::isRenderNamedFlowThread方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildObjectForElementInfo
static PassRefPtr<InspectorObject> buildObjectForElementInfo(Node* node)
{
if (!node->isElementNode() || !node->document().frame())
return nullptr;
RefPtr<InspectorObject> elementInfo = InspectorObject::create();
Element* element = toElement(node);
bool isXHTML = element->document().isXHTMLDocument();
elementInfo->setString("tagName", isXHTML ? element->nodeName() : element->nodeName().lower());
elementInfo->setString("idValue", element->getIdAttribute());
HashSet<AtomicString> usedClassNames;
if (element->hasClass() && element->isStyledElement()) {
StringBuilder classNames;
const SpaceSplitString& classNamesString = toStyledElement(element)->classNames();
size_t classNameCount = classNamesString.size();
for (size_t i = 0; i < classNameCount; ++i) {
const AtomicString& className = classNamesString[i];
if (usedClassNames.contains(className))
continue;
usedClassNames.add(className);
classNames.append('.');
classNames.append(className);
}
elementInfo->setString("className", classNames.toString());
}
RenderElement* renderer = element->renderer();
Frame* containingFrame = node->document().frame();
FrameView* containingView = containingFrame->view();
IntRect boundingBox = pixelSnappedIntRect(containingView->contentsToRootView(renderer->absoluteBoundingBoxRect()));
RenderBoxModelObject* modelObject = renderer->isBoxModelObject() ? toRenderBoxModelObject(renderer) : nullptr;
elementInfo->setString("nodeWidth", String::number(modelObject ? adjustForAbsoluteZoom(modelObject->pixelSnappedOffsetWidth(), *modelObject) : boundingBox.width()));
elementInfo->setString("nodeHeight", String::number(modelObject ? adjustForAbsoluteZoom(modelObject->pixelSnappedOffsetHeight(), *modelObject) : boundingBox.height()));
if (renderer->isRenderNamedFlowFragmentContainer()) {
RenderNamedFlowFragment* region = toRenderBlockFlow(renderer)->renderNamedFlowFragment();
if (region->isValid()) {
RenderFlowThread* flowThread = region->flowThread();
ASSERT(flowThread && flowThread->isRenderNamedFlowThread());
RefPtr<InspectorObject> regionFlowInfo = InspectorObject::create();
regionFlowInfo->setString("name", toRenderNamedFlowThread(flowThread)->flowThreadName());
regionFlowInfo->setArray("regions", buildObjectForCSSRegionsHighlight(region, flowThread));
elementInfo->setObject("regionFlowInfo", regionFlowInfo.release());
}
}
RenderFlowThread* containingFlowThread = renderer->flowThreadContainingBlock();
if (containingFlowThread && containingFlowThread->isRenderNamedFlowThread()) {
RefPtr<InspectorObject> contentFlowInfo = InspectorObject::create();
contentFlowInfo->setString("name", toRenderNamedFlowThread(containingFlowThread)->flowThreadName());
elementInfo->setObject("contentFlowInfo", contentFlowInfo.release());
}
#if ENABLE(CSS_SHAPES)
if (renderer->isBox()) {
RenderBox* renderBox = toRenderBox(renderer);
if (RefPtr<InspectorObject> shapeObject = buildObjectForShapeOutside(containingFrame, renderBox))
elementInfo->setObject("shapeOutsideInfo", shapeObject.release());
}
#endif
// Need to enable AX to get the computed role.
if (!WebCore::AXObjectCache::accessibilityEnabled())
WebCore::AXObjectCache::enableAccessibility();
if (AXObjectCache* axObjectCache = node->document().axObjectCache()) {
if (AccessibilityObject* axObject = axObjectCache->getOrCreate(node))
elementInfo->setString("role", axObject->computedRoleString());
}
return elementInfo.release();
}