Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
bool HTMLSummaryElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
{
    if (childContext.node()->isPseudoElement())
        return HTMLElement::childShouldCreateRenderer(childContext);

    return childContext.isOnEncapsulationBoundary() && HTMLElement::childShouldCreateRenderer(childContext);
}
Exemplo n.º 3
0
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;
}
Exemplo n.º 4
0
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;
}
Exemplo n.º 5
0
bool SVGDocument::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
{
    if (childContext.node()->hasTagName(SVGNames::svgTag))
        return toSVGSVGElement(childContext.node())->isValid();
    return true;
}
bool SVGAltGlyphElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
{
    if (childContext.node()->isTextNode())
        return true;
    return false;
}