Index: Source/core/svg/SVGFontFaceSrcElement.cpp |
diff --git a/Source/core/svg/SVGFontFaceSrcElement.cpp b/Source/core/svg/SVGFontFaceSrcElement.cpp |
index 5bb34db4b9fa017ab7f7c76bf9ff0a0c63bd9dec..f1cd5a5e7d0d2b9bfe7576ed150ab4349911e420 100644 |
--- a/Source/core/svg/SVGFontFaceSrcElement.cpp |
+++ b/Source/core/svg/SVGFontFaceSrcElement.cpp |
@@ -25,6 +25,7 @@ |
#include "SVGNames.h" |
#include "core/css/CSSFontFaceSrcValue.h" |
#include "core/css/CSSValueList.h" |
+#include "core/dom/ElementTraversal.h" |
#include "core/svg/SVGFontFaceElement.h" |
#include "core/svg/SVGFontFaceNameElement.h" |
#include "core/svg/SVGFontFaceUriElement.h" |
@@ -47,12 +48,12 @@ PassRefPtr<SVGFontFaceSrcElement> SVGFontFaceSrcElement::create(Document& docume |
PassRefPtrWillBeRawPtr<CSSValueList> SVGFontFaceSrcElement::srcValue() const |
{ |
RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); |
- for (Node* child = firstChild(); child; child = child->nextSibling()) { |
+ for (SVGElement* element = Traversal<SVGElement>::firstChild(*this); element; element = Traversal<SVGElement>::nextSibling(*element)) { |
RefPtrWillBeRawPtr<CSSFontFaceSrcValue> srcValue; |
- if (child->hasTagName(font_face_uriTag)) |
- srcValue = toSVGFontFaceUriElement(child)->srcValue(); |
- else if (child->hasTagName(font_face_nameTag)) |
- srcValue = toSVGFontFaceNameElement(child)->srcValue(); |
+ if (isSVGFontFaceUriElement(*element)) |
+ srcValue = toSVGFontFaceUriElement(*element).srcValue(); |
+ else if (isSVGFontFaceNameElement(*element)) |
+ srcValue = toSVGFontFaceNameElement(*element).srcValue(); |
if (srcValue && srcValue->resource().length()) |
list->append(srcValue); |
@@ -63,8 +64,8 @@ PassRefPtrWillBeRawPtr<CSSValueList> SVGFontFaceSrcElement::srcValue() const |
void SVGFontFaceSrcElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) |
{ |
SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); |
- if (parentNode() && parentNode()->hasTagName(font_faceTag)) |
- toSVGFontFaceElement(parentNode())->rebuildFontFace(); |
+ if (isSVGFontFaceElement(parentNode())) |
+ toSVGFontFaceElement(*parentNode()).rebuildFontFace(); |
} |
} |