本文整理汇总了C++中NodeRenderingContext::node方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeRenderingContext::node方法的具体用法?C++ NodeRenderingContext::node怎么用?C++ NodeRenderingContext::node使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeRenderingContext
的用法示例。
在下文中一共展示了NodeRenderingContext::node方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: childShouldCreateRenderer
bool HTMLDetailsElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
{
if (!childContext.isOnEncapsulationBoundary())
return false;
if (m_isOpen)
return HTMLElement::childShouldCreateRenderer(childContext);
if (!childContext.node()->hasTagName(summaryTag))
return false;
return childContext.node() == findMainSummary() && HTMLElement::childShouldCreateRenderer(childContext);
}
示例2: childShouldCreateRenderer
bool HTMLSummaryElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
{
if (childContext.node()->isPseudoElement())
return HTMLElement::childShouldCreateRenderer(childContext);
return childContext.isOnEncapsulationBoundary() && HTMLElement::childShouldCreateRenderer(childContext);
}
示例3: childShouldCreateRenderer
bool SVGSwitchElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
{
// FIXME: This function does not do what the comment below implies it does.
// It will create a renderer for any valid SVG element children, not just the first one.
for (Node* node = firstChild(); node; node = node->nextSibling()) {
if (!node->isSVGElement())
continue;
SVGElement* element = toSVGElement(node);
if (!element || !element->isValid())
continue;
return node == childContext.node(); // Only allow this child if it's the first valid child
}
return false;
}
示例4: childShouldCreateRenderer
bool SVGTextElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
{
if (childContext.node()->isTextNode()
|| childContext.node()->hasTagName(SVGNames::aTag)
#if ENABLE(SVG_FONTS)
|| childContext.node()->hasTagName(SVGNames::altGlyphTag)
#endif
|| childContext.node()->hasTagName(SVGNames::textPathTag)
|| childContext.node()->hasTagName(SVGNames::trefTag)
|| childContext.node()->hasTagName(SVGNames::tspanTag))
return true;
return false;
}
示例5: childShouldCreateRenderer
bool SVGDocument::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
{
if (childContext.node()->hasTagName(SVGNames::svgTag))
return toSVGSVGElement(childContext.node())->isValid();
return true;
}
示例6: childShouldCreateRenderer
bool SVGAltGlyphElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
{
if (childContext.node()->isTextNode())
return true;
return false;
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:6,代码来源:SVGAltGlyphElement.cpp