コード例 #1
0
SVGPathElement* SVGMPathElement::pathElement()
{
    Element* target = targetElementFromIRIString(href(), document());
    if (target && is<SVGPathElement>(target))
        return downcast<SVGPathElement>(target);
    return nullptr;
}
コード例 #2
0
bool SVGGlyphRefElement::hasValidGlyphElement(AtomicString& glyphName) const
{
    // FIXME: We only support xlink:href so far.
    // https://bugs.webkit.org/show_bug.cgi?id=64787
    Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefAttr), document(), &glyphName);
    return isSVGGlyphElement(element);
}
コード例 #3
0
bool SVGGlyphRefElement::hasValidGlyphElement(String& glyphName) const
{
    // FIXME: We only support xlink:href so far.
    // https://bugs.webkit.org/show_bug.cgi?id=64787
    Element* element = targetElementFromIRIString(fastGetAttribute(XLinkNames::hrefAttr), document(), &glyphName);
    if (!element || !element->hasTagName(SVGNames::glyphTag))
        return false;
    return true;
}
コード例 #4
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;
}
コード例 #5
0
ファイル: SVGAltGlyphElement.cpp プロジェクト: quanmo/webkit
bool SVGAltGlyphElement::hasValidGlyphElements(Vector<String>& glyphNames) const
{
    String target;
    Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefAttr), document(), &target);
    if (!element)
        return false;

    if (is<SVGGlyphElement>(*element)) {
        glyphNames.append(target);
        return true;
    }

    if (is<SVGAltGlyphDefElement>(*element)
        && downcast<SVGAltGlyphDefElement>(*element).hasValidGlyphElements(glyphNames))
        return true;

    return false;
}
bool SVGAltGlyphElement::hasValidGlyphElements(Vector<String>& glyphNames) const
{
    String 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)
        && static_cast<SVGAltGlyphDefElement*>(element)->hasValidGlyphElements(glyphNames))
        return true;

    return false;
}
コード例 #7
0
ファイル: SVGMPathElement.cpp プロジェクト: mirror/chromium
SVGPathElement* SVGMPathElement::pathElement() {
    Element* target = targetElementFromIRIString(hrefString(), treeScope());
    return isSVGPathElement(target) ? toSVGPathElement(target) : 0;
}