| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 { | 63 { |
| 64 SVGElement* targetElement = this->targetElement(); | 64 SVGElement* targetElement = this->targetElement(); |
| 65 if (!targetElement) | 65 if (!targetElement) |
| 66 return false; | 66 return false; |
| 67 | 67 |
| 68 // We don't have a special attribute name to verify the animation type. Chec
k the element name instead. | 68 // We don't have a special attribute name to verify the animation type. Chec
k the element name instead. |
| 69 if (!targetElement->isSVGGraphicsElement()) | 69 if (!targetElement->isSVGGraphicsElement()) |
| 70 return false; | 70 return false; |
| 71 // Spec: SVG 1.1 section 19.2.15 | 71 // Spec: SVG 1.1 section 19.2.15 |
| 72 // FIXME: svgTag is missing. Needs to be checked, if transforming <svg> coul
d cause problems. | 72 // FIXME: svgTag is missing. Needs to be checked, if transforming <svg> coul
d cause problems. |
| 73 if (targetElement->hasTagName(gTag) | 73 return (isSVGGElement(*targetElement) |
| 74 || targetElement->hasTagName(defsTag) | 74 || isSVGDefsElement(*targetElement) |
| 75 || targetElement->hasTagName(useTag) | 75 || isSVGUseElement(*targetElement) |
| 76 || targetElement->hasTagName(SVGNames::imageTag) | 76 || isSVGImageElement(*targetElement) |
| 77 || targetElement->hasTagName(switchTag) | 77 || isSVGSwitchElement(*targetElement) |
| 78 || targetElement->hasTagName(pathTag) | 78 || isSVGPathElement(*targetElement) |
| 79 || targetElement->hasTagName(rectTag) | 79 || isSVGRectElement(*targetElement) |
| 80 || targetElement->hasTagName(circleTag) | 80 || isSVGCircleElement(*targetElement) |
| 81 || targetElement->hasTagName(ellipseTag) | 81 || isSVGEllipseElement(*targetElement) |
| 82 || targetElement->hasTagName(lineTag) | 82 || isSVGLineElement(*targetElement) |
| 83 || targetElement->hasTagName(polylineTag) | 83 || isSVGPolylineElement(*targetElement) |
| 84 || targetElement->hasTagName(polygonTag) | 84 || isSVGPolygonElement(*targetElement) |
| 85 || targetElement->hasTagName(textTag) | 85 || isSVGTextElement(*targetElement) |
| 86 || targetElement->hasTagName(clipPathTag) | 86 || isSVGClipPathElement(*targetElement) |
| 87 || targetElement->hasTagName(maskTag) | 87 || isSVGMaskElement(*targetElement) |
| 88 || targetElement->hasTagName(SVGNames::aTag) | 88 || isSVGAElement(*targetElement) |
| 89 || targetElement->hasTagName(foreignObjectTag) | 89 || isSVGForeignObjectElement(*targetElement) |
| 90 ) | 90 ); |
| 91 return true; | |
| 92 return false; | |
| 93 } | 91 } |
| 94 | 92 |
| 95 bool SVGAnimateMotionElement::hasValidAttributeName() | 93 bool SVGAnimateMotionElement::hasValidAttributeName() |
| 96 { | 94 { |
| 97 // AnimateMotion does not use attributeName so it is always valid. | 95 // AnimateMotion does not use attributeName so it is always valid. |
| 98 return true; | 96 return true; |
| 99 } | 97 } |
| 100 | 98 |
| 101 bool SVGAnimateMotionElement::isSupportedAttribute(const QualifiedName& attrName
) | 99 bool SVGAnimateMotionElement::isSupportedAttribute(const QualifiedName& attrName
) |
| 102 { | 100 { |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 339 |
| 342 void SVGAnimateMotionElement::updateAnimationMode() | 340 void SVGAnimateMotionElement::updateAnimationMode() |
| 343 { | 341 { |
| 344 if (!m_animationPath.isEmpty()) | 342 if (!m_animationPath.isEmpty()) |
| 345 setAnimationMode(PathAnimation); | 343 setAnimationMode(PathAnimation); |
| 346 else | 344 else |
| 347 SVGAnimationElement::updateAnimationMode(); | 345 SVGAnimationElement::updateAnimationMode(); |
| 348 } | 346 } |
| 349 | 347 |
| 350 } | 348 } |
| OLD | NEW |