| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |