当前位置: 首页>>代码示例>>C++>>正文


C++ HTMLFrameOwnerElement::contentDocument方法代码示例

本文整理汇总了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;
        }
    }
}
开发者ID:boska,项目名称:webkit,代码行数:30,代码来源:InspectorNodeFinder.cpp

示例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;
}
开发者ID:joone,项目名称:chromium-crosswalk,代码行数:12,代码来源:PaintLayerCompositor.cpp

示例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;
}
开发者ID:Channely,项目名称:know-your-chrome,代码行数:20,代码来源:RenderPart.cpp

示例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;
}
开发者ID:mirror,项目名称:chromium,代码行数:22,代码来源:TopDocumentRootScrollerController.cpp


注:本文中的HTMLFrameOwnerElement::contentDocument方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。