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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 || targetElement->hasTagName(textTag) | 80 || targetElement->hasTagName(textTag) |
81 || targetElement->hasTagName(clipPathTag) | 81 || targetElement->hasTagName(clipPathTag) |
82 || targetElement->hasTagName(maskTag) | 82 || targetElement->hasTagName(maskTag) |
83 || targetElement->hasTagName(aTag) | 83 || targetElement->hasTagName(aTag) |
84 || targetElement->hasTagName(foreignObjectTag) | 84 || targetElement->hasTagName(foreignObjectTag) |
85 ) | 85 ) |
86 return true; | 86 return true; |
87 return false; | 87 return false; |
88 } | 88 } |
89 | 89 |
| 90 bool SVGAnimateMotionElement::hasValidAttributeName() |
| 91 { |
| 92 // AnimateMotion does not use attributeName so it is always valid. |
| 93 return true; |
| 94 } |
| 95 |
90 bool SVGAnimateMotionElement::isSupportedAttribute(const QualifiedName& attrName
) | 96 bool SVGAnimateMotionElement::isSupportedAttribute(const QualifiedName& attrName
) |
91 { | 97 { |
92 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 98 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
93 if (supportedAttributes.isEmpty()) | 99 if (supportedAttributes.isEmpty()) |
94 supportedAttributes.add(SVGNames::pathAttr); | 100 supportedAttributes.add(SVGNames::pathAttr); |
95 return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslato
r>(attrName); | 101 return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslato
r>(attrName); |
96 } | 102 } |
97 | 103 |
98 void SVGAnimateMotionElement::parseAttribute(const Attribute& attribute) | 104 void SVGAnimateMotionElement::parseAttribute(const Attribute& attribute) |
99 { | 105 { |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 if (!parsePoint(fromString, from)) | 313 if (!parsePoint(fromString, from)) |
308 return -1; | 314 return -1; |
309 if (!parsePoint(toString, to)) | 315 if (!parsePoint(toString, to)) |
310 return -1; | 316 return -1; |
311 FloatSize diff = to - from; | 317 FloatSize diff = to - from; |
312 return sqrtf(diff.width() * diff.width() + diff.height() * diff.height()); | 318 return sqrtf(diff.width() * diff.width() + diff.height() * diff.height()); |
313 } | 319 } |
314 | 320 |
315 } | 321 } |
316 #endif // ENABLE(SVG) | 322 #endif // ENABLE(SVG) |
OLD | NEW |