コード例 #1
0
bool SVGAltGlyphElement::hasValidGlyphElements(Vector<AtomicString>& glyphNames) const
{
    AtomicString target;
    Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefAttr), treeScope(), &target);
    if (!element)
        return false;

    if (isSVGGlyphElement(*element)) {
        glyphNames.append(target);
        return true;
    }

    if (isSVGAltGlyphDefElement(*element) && toSVGAltGlyphDefElement(*element).hasValidGlyphElements(glyphNames))
        return true;

    return false;
}
コード例 #2
0
bool SVGAltGlyphElement::hasValidGlyphElements(Vector<AtomicString>& glyphNames) const
{
    AtomicString target;
    Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefAttr), document(), &target);
    if (!element)
        return false;

    if (element->hasTagName(SVGNames::glyphTag)) {
        glyphNames.append(target);
        return true;
    }

    if (element->hasTagName(SVGNames::altGlyphDefTag)
        && toSVGAltGlyphDefElement(element)->hasValidGlyphElements(glyphNames))
        return true;

    return false;
}