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

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

Issue 189463005: Generate the isSVG*Element() / toSVG*Element() helper functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove blank line change Created 6 years, 9 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
« no previous file with comments | « Source/core/svg/SVGAnimateMotionElement.h ('k') | Source/core/svg/SVGAnimateTransformElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 (Element* child = ElementTraversal::firstWithin(*this); child; child = E lementTraversal::nextSibling(*child)) { 143 for (SVGMPathElement* mpath = Traversal<SVGMPathElement>::firstChild(*this); mpath; mpath = Traversal<SVGMPathElement>::nextSibling(*mpath)) {
144 if (child->hasTagName(SVGNames::mpathTag)) { 144 if (SVGPathElement* pathElement = mpath->pathElement()) {
145 SVGMPathElement* mPath = toSVGMPathElement(child); 145 updatePathFromGraphicsElement(pathElement, m_animationPath);
146 SVGPathElement* pathElement = mPath->pathElement(); 146 foundMPath = true;
147 if (pathElement) { 147 break;
148 updatePathFromGraphicsElement(pathElement, m_animationPath);
149 foundMPath = true;
150 break;
151 }
152 } 148 }
153 } 149 }
154 150
155 if (!foundMPath && fastHasAttribute(SVGNames::pathAttr)) 151 if (!foundMPath && fastHasAttribute(SVGNames::pathAttr))
156 m_animationPath = m_path; 152 m_animationPath = m_path;
157 153
158 updateAnimationMode(); 154 updateAnimationMode();
159 } 155 }
160 156
161 template<typename CharType> 157 template<typename CharType>
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 341
346 void SVGAnimateMotionElement::updateAnimationMode() 342 void SVGAnimateMotionElement::updateAnimationMode()
347 { 343 {
348 if (!m_animationPath.isEmpty()) 344 if (!m_animationPath.isEmpty())
349 setAnimationMode(PathAnimation); 345 setAnimationMode(PathAnimation);
350 else 346 else
351 SVGAnimationElement::updateAnimationMode(); 347 SVGAnimationElement::updateAnimationMode();
352 } 348 }
353 349
354 } 350 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAnimateMotionElement.h ('k') | Source/core/svg/SVGAnimateTransformElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698