SVGPathElement* SVGMPathElement::pathElement() { Element* target = targetElementFromIRIString(href(), document()); if (target && is<SVGPathElement>(target)) return downcast<SVGPathElement>(target); return nullptr; }
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); }
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; }
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; }
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; }
SVGPathElement* SVGMPathElement::pathElement() { Element* target = targetElementFromIRIString(hrefString(), treeScope()); return isSVGPathElement(target) ? toSVGPathElement(target) : 0; }