PassRefPtrWillBeRawPtr<CSSValueList> SVGFontFaceSrcElement::srcValue() const { RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); for (SVGElement* element = Traversal<SVGElement>::firstChild(*this); element; element = Traversal<SVGElement>::nextSibling(*element)) { RefPtrWillBeRawPtr<CSSFontFaceSrcValue> srcValue = nullptr; if (isSVGFontFaceUriElement(*element)) srcValue = toSVGFontFaceUriElement(*element).srcValue(); else if (isSVGFontFaceNameElement(*element)) srcValue = toSVGFontFaceNameElement(*element).srcValue(); if (srcValue && srcValue->resource().length()) list->append(srcValue); } return list; }
void SVGFontFaceFormatElement::childrenChanged(const ChildrenChange& change) { SVGElement::childrenChanged(change); if (!isSVGFontFaceUriElement(parentNode())) return; ContainerNode* ancestor = parentNode()->parentNode(); if (!isSVGFontFaceSrcElement(ancestor)) return; ancestor = ancestor->parentNode(); if (isSVGFontFaceElement(ancestor)) toSVGFontFaceElement(ancestor)->rebuildFontFace(); }