Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: Source/core/svg/SVGAnimateMotionElement.cpp

Issue 171663005: Consistently use ElementTraversal API when looking for an Element (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 if (rotate == autoReverse) 133 if (rotate == autoReverse)
134 return RotateAutoReverse; 134 return RotateAutoReverse;
135 return RotateAngle; 135 return RotateAngle;
136 } 136 }
137 137
138 void SVGAnimateMotionElement::updateAnimationPath() 138 void SVGAnimateMotionElement::updateAnimationPath()
139 { 139 {
140 m_animationPath = Path(); 140 m_animationPath = Path();
141 bool foundMPath = false; 141 bool foundMPath = false;
142 142
143 for (Node* child = firstChild(); child; child = child->nextSibling()) { 143 for (Element* child = ElementTraversal::firstWithin(*this); child; child = E lementTraversal::nextSibling(*child)) {
144 if (child->hasTagName(SVGNames::mpathTag)) { 144 if (child->hasTagName(SVGNames::mpathTag)) {
145 SVGMPathElement* mPath = toSVGMPathElement(child); 145 SVGMPathElement* mPath = toSVGMPathElement(child);
146 SVGPathElement* pathElement = mPath->pathElement(); 146 SVGPathElement* pathElement = mPath->pathElement();
147 if (pathElement) { 147 if (pathElement) {
148 updatePathFromGraphicsElement(pathElement, m_animationPath); 148 updatePathFromGraphicsElement(pathElement, m_animationPath);
149 foundMPath = true; 149 foundMPath = true;
150 break; 150 break;
151 } 151 }
152 } 152 }
153 } 153 }
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 void SVGAnimateMotionElement::updateAnimationMode() 346 void SVGAnimateMotionElement::updateAnimationMode()
347 { 347 {
348 if (!m_animationPath.isEmpty()) 348 if (!m_animationPath.isEmpty())
349 setAnimationMode(PathAnimation); 349 setAnimationMode(PathAnimation);
350 else 350 else
351 SVGAnimationElement::updateAnimationMode(); 351 SVGAnimationElement::updateAnimationMode();
352 } 352 }
353 353
354 } 354 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourcePattern.cpp ('k') | Source/core/svg/SVGFEMergeElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698