Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 if (string.is8Bit()) | 135 if (string.is8Bit()) |
| 136 parseKeySplinesInternal<LChar>(string, result); | 136 parseKeySplinesInternal<LChar>(string, result); |
| 137 else | 137 else |
| 138 parseKeySplinesInternal<UChar>(string, result); | 138 parseKeySplinesInternal<UChar>(string, result); |
| 139 } | 139 } |
| 140 | 140 |
| 141 bool SVGAnimationElement::isSupportedAttribute(const QualifiedName& attrName) | 141 bool SVGAnimationElement::isSupportedAttribute(const QualifiedName& attrName) |
| 142 { | 142 { |
| 143 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 143 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| 144 if (supportedAttributes.isEmpty()) { | 144 if (supportedAttributes.isEmpty()) { |
| 145 SVGTests::addSupportedAttributes(supportedAttributes); | |
| 146 supportedAttributes.add(SVGNames::valuesAttr); | 145 supportedAttributes.add(SVGNames::valuesAttr); |
| 147 supportedAttributes.add(SVGNames::keyTimesAttr); | 146 supportedAttributes.add(SVGNames::keyTimesAttr); |
| 148 supportedAttributes.add(SVGNames::keyPointsAttr); | 147 supportedAttributes.add(SVGNames::keyPointsAttr); |
| 149 supportedAttributes.add(SVGNames::keySplinesAttr); | 148 supportedAttributes.add(SVGNames::keySplinesAttr); |
| 150 supportedAttributes.add(SVGNames::attributeTypeAttr); | 149 supportedAttributes.add(SVGNames::attributeTypeAttr); |
| 151 supportedAttributes.add(SVGNames::calcModeAttr); | 150 supportedAttributes.add(SVGNames::calcModeAttr); |
| 152 supportedAttributes.add(SVGNames::fromAttr); | 151 supportedAttributes.add(SVGNames::fromAttr); |
| 153 supportedAttributes.add(SVGNames::toAttr); | 152 supportedAttributes.add(SVGNames::toAttr); |
| 154 supportedAttributes.add(SVGNames::byAttr); | 153 supportedAttributes.add(SVGNames::byAttr); |
| 155 } | 154 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 202 if (name == SVGNames::calcModeAttr) { | 201 if (name == SVGNames::calcModeAttr) { |
| 203 setCalcMode(value); | 202 setCalcMode(value); |
| 204 return; | 203 return; |
| 205 } | 204 } |
| 206 | 205 |
| 207 if (name == SVGNames::fromAttr || name == SVGNames::toAttr || name == SVGNam es::byAttr) { | 206 if (name == SVGNames::fromAttr || name == SVGNames::toAttr || name == SVGNam es::byAttr) { |
| 208 updateAnimationMode(); | 207 updateAnimationMode(); |
| 209 return; | 208 return; |
| 210 } | 209 } |
| 211 | 210 |
| 212 if (SVGTests::parseAttribute(name, value)) | |
| 213 return; | |
|
kouhei (in TOK)
2014/07/28 13:34:41
This is handled by SVGElement::parseAttributeNew
| |
| 214 | |
| 215 ASSERT_NOT_REACHED(); | 211 ASSERT_NOT_REACHED(); |
| 216 } | 212 } |
| 217 | 213 |
| 218 void SVGAnimationElement::svgAttributeChanged(const QualifiedName& attrName) | 214 void SVGAnimationElement::svgAttributeChanged(const QualifiedName& attrName) |
| 219 { | 215 { |
| 220 if (!isSupportedAttribute(attrName)) { | 216 if (!isSupportedAttribute(attrName) && !SVGTests::isKnownAttribute(attrName) ) { |
|
fs
2014/07/28 14:01:01
Nit: Maybe make a note that this (the SVGTests-cal
kouhei (in TOK)
2014/07/28 14:28:58
Hmm, I didn't intend to move it back later. Maybe
fs
2014/07/28 17:12:36
Moving it to SVGSMILElement SGTM (and would void t
| |
| 221 SVGSMILElement::svgAttributeChanged(attrName); | 217 SVGSMILElement::svgAttributeChanged(attrName); |
| 222 return; | 218 return; |
| 223 } | 219 } |
| 224 | 220 |
| 225 animationAttributeChanged(); | 221 animationAttributeChanged(); |
| 226 } | 222 } |
| 227 | 223 |
| 228 void SVGAnimationElement::animationAttributeChanged() | 224 void SVGAnimationElement::animationAttributeChanged() |
| 229 { | 225 { |
| 230 // Assumptions may not hold after an attribute change. | 226 // Assumptions may not hold after an attribute change. |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 686 SVGSMILElement::setAttributeName(attributeName); | 682 SVGSMILElement::setAttributeName(attributeName); |
| 687 checkInvalidCSSAttributeType(targetElement()); | 683 checkInvalidCSSAttributeType(targetElement()); |
| 688 } | 684 } |
| 689 | 685 |
| 690 void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target) | 686 void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target) |
| 691 { | 687 { |
| 692 m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attribut eType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(target, attributeNa me()); | 688 m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attribut eType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(target, attributeNa me()); |
| 693 } | 689 } |
| 694 | 690 |
| 695 } | 691 } |
| OLD | NEW |