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

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

Issue 2227463002: SVG: Use path attribute for animateMotion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implicitWait Created 4 years, 4 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
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return RotateAngle; 110 return RotateAngle;
111 } 111 }
112 112
113 void SVGAnimateMotionElement::updateAnimationPath() 113 void SVGAnimateMotionElement::updateAnimationPath()
114 { 114 {
115 m_animationPath = Path(); 115 m_animationPath = Path();
116 bool foundMPath = false; 116 bool foundMPath = false;
117 117
118 for (SVGMPathElement* mpath = Traversal<SVGMPathElement>::firstChild(*this); mpath; mpath = Traversal<SVGMPathElement>::nextSibling(*mpath)) { 118 for (SVGMPathElement* mpath = Traversal<SVGMPathElement>::firstChild(*this); mpath; mpath = Traversal<SVGMPathElement>::nextSibling(*mpath)) {
119 if (SVGPathElement* pathElement = mpath->pathElement()) { 119 if (SVGPathElement* pathElement = mpath->pathElement()) {
120 m_animationPath = pathElement->asPath(); 120 m_animationPath = pathElement->attributePath();
121 foundMPath = true; 121 foundMPath = true;
122 break; 122 break;
123 } 123 }
124 } 124 }
125 125
126 if (!foundMPath && fastHasAttribute(SVGNames::pathAttr)) 126 if (!foundMPath && fastHasAttribute(SVGNames::pathAttr))
127 m_animationPath = m_path; 127 m_animationPath = m_path;
128 128
129 updateAnimationMode(); 129 updateAnimationMode();
130 } 130 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 void SVGAnimateMotionElement::updateAnimationMode() 313 void SVGAnimateMotionElement::updateAnimationMode()
314 { 314 {
315 if (!m_animationPath.isEmpty()) 315 if (!m_animationPath.isEmpty())
316 setAnimationMode(PathAnimation); 316 setAnimationMode(PathAnimation);
317 else 317 else
318 SVGAnimationElement::updateAnimationMode(); 318 SVGAnimationElement::updateAnimationMode();
319 } 319 }
320 320
321 } // namespace blink 321 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698