Index: Source/core/svg/SVGAnimateMotionElement.cpp |
diff --git a/Source/core/svg/SVGAnimateMotionElement.cpp b/Source/core/svg/SVGAnimateMotionElement.cpp |
index 3dece5644f0e72e2e3c5e5a37452d6eea1f34966..715a7ab458d54954bdfb07233f9571cf208e97ec 100644 |
--- a/Source/core/svg/SVGAnimateMotionElement.cpp |
+++ b/Source/core/svg/SVGAnimateMotionElement.cpp |
@@ -140,15 +140,11 @@ void SVGAnimateMotionElement::updateAnimationPath() |
m_animationPath = Path(); |
bool foundMPath = false; |
- for (Element* child = ElementTraversal::firstWithin(*this); child; child = ElementTraversal::nextSibling(*child)) { |
- if (child->hasTagName(SVGNames::mpathTag)) { |
- SVGMPathElement* mPath = toSVGMPathElement(child); |
- SVGPathElement* pathElement = mPath->pathElement(); |
- if (pathElement) { |
- updatePathFromGraphicsElement(pathElement, m_animationPath); |
- foundMPath = true; |
- break; |
- } |
+ for (SVGMPathElement* mpath = Traversal<SVGMPathElement>::firstChild(*this); mpath; mpath = Traversal<SVGMPathElement>::nextSibling(*mpath)) { |
+ if (SVGPathElement* pathElement = mpath->pathElement()) { |
+ updatePathFromGraphicsElement(pathElement, m_animationPath); |
+ foundMPath = true; |
+ break; |
} |
} |