本文整理汇总了C++中HTMLFrameOwnerElement::contentDocument方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLFrameOwnerElement::contentDocument方法的具体用法?C++ HTMLFrameOwnerElement::contentDocument怎么用?C++ HTMLFrameOwnerElement::contentDocument使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLFrameOwnerElement
的用法示例。
在下文中一共展示了HTMLFrameOwnerElement::contentDocument方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: searchUsingDOMTreeTraversal
void InspectorNodeFinder::searchUsingDOMTreeTraversal(Node* parentNode)
{
// Manual plain text search.
for (auto node = parentNode; node; node = NodeTraversal::next(node, parentNode)) {
switch (node->nodeType()) {
case Node::TEXT_NODE:
case Node::COMMENT_NODE:
case Node::CDATA_SECTION_NODE: {
if (node->nodeValue().findIgnoringCase(m_whitespaceTrimmedQuery) != notFound)
m_results.add(node);
break;
}
case Node::ELEMENT_NODE: {
if (matchesElement(*toElement(node)))
m_results.add(node);
// Search inside frame elements.
if (node->isFrameOwnerElement()) {
HTMLFrameOwnerElement* frameOwner = toHTMLFrameOwnerElement(node);
if (Document* document = frameOwner->contentDocument())
performSearch(document);
}
break;
}
default:
break;
}
}
}
示例2: frameContentsCompositor
PaintLayerCompositor* PaintLayerCompositor::frameContentsCompositor(LayoutPart* layoutObject)
{
if (!layoutObject->node()->isFrameOwnerElement())
return nullptr;
HTMLFrameOwnerElement* element = toHTMLFrameOwnerElement(layoutObject->node());
if (Document* contentDocument = element->contentDocument()) {
if (LayoutView* view = contentDocument->layoutView())
return view->compositor();
}
return nullptr;
}
示例3: requiresAcceleratedCompositing
bool RenderPart::requiresAcceleratedCompositing() const
{
// There are two general cases in which we can return true. First, if this is a plugin
// renderer and the plugin has a layer, then we need a layer. Second, if this is
// a renderer with a contentDocument and that document needs a layer, then we need
// a layer.
if (widget() && widget()->isPluginView() && toPluginView(widget())->platformLayer())
return true;
if (!node() || !node()->isFrameOwnerElement())
return false;
HTMLFrameOwnerElement* element = toFrameOwnerElement(node());
if (Document* contentDocument = element->contentDocument()) {
if (RenderView* view = contentDocument->renderView())
return view->usesCompositing();
}
return false;
}
示例4: findGlobalRootScrollerElement
Element* TopDocumentRootScrollerController::findGlobalRootScrollerElement() {
if (!topDocument())
return nullptr;
DCHECK(topDocument()->rootScrollerController());
Element* element =
topDocument()->rootScrollerController()->effectiveRootScroller();
while (element && element->isFrameOwnerElement()) {
HTMLFrameOwnerElement* frameOwner = toHTMLFrameOwnerElement(element);
DCHECK(frameOwner);
Document* iframeDocument = frameOwner->contentDocument();
if (!iframeDocument)
return element;
DCHECK(iframeDocument->rootScrollerController());
element = iframeDocument->rootScrollerController()->effectiveRootScroller();
}
return element;
}