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 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 void SVGAnimateElement::removedFrom(ContainerNode* rootParent) { | 149 void SVGAnimateElement::removedFrom(ContainerNode* rootParent) { |
150 if (rootParent->isConnected()) | 150 if (rootParent->isConnected()) |
151 setAttributeName(anyQName()); | 151 setAttributeName(anyQName()); |
152 SVGAnimationElement::removedFrom(rootParent); | 152 SVGAnimationElement::removedFrom(rootParent); |
153 } | 153 } |
154 | 154 |
155 void SVGAnimateElement::parseAttribute( | 155 void SVGAnimateElement::parseAttribute( |
156 const AttributeModificationParams& params) { | 156 const AttributeModificationParams& params) { |
157 if (params.name == SVGNames::attributeTypeAttr) { | 157 if (params.name == SVGNames::attributeTypeAttr) { |
158 setAttributeType(params.newValue); | 158 setAttributeType(params.newValue); |
| 159 animationAttributeChanged(); |
| 160 return; |
| 161 } |
| 162 if (params.name == SVGNames::attributeNameAttr) { |
| 163 setAttributeName(constructQualifiedName(*this, params.newValue)); |
| 164 animationAttributeChanged(); |
159 return; | 165 return; |
160 } | 166 } |
161 SVGAnimationElement::parseAttribute(params); | 167 SVGAnimationElement::parseAttribute(params); |
162 } | 168 } |
163 | 169 |
164 void SVGAnimateElement::svgAttributeChanged(const QualifiedName& attrName) { | |
165 if (attrName == SVGNames::attributeTypeAttr) { | |
166 } else if (attrName == SVGNames::attributeNameAttr) { | |
167 setAttributeName(constructQualifiedName( | |
168 *this, fastGetAttribute(SVGNames::attributeNameAttr))); | |
169 } else { | |
170 SVGAnimationElement::svgAttributeChanged(attrName); | |
171 return; | |
172 } | |
173 animationAttributeChanged(); | |
174 } | |
175 | |
176 void SVGAnimateElement::resolveTargetProperty() { | 170 void SVGAnimateElement::resolveTargetProperty() { |
177 DCHECK(targetElement()); | 171 DCHECK(targetElement()); |
178 m_targetProperty = targetElement()->propertyFromAttribute(attributeName()); | 172 m_targetProperty = targetElement()->propertyFromAttribute(attributeName()); |
179 if (m_targetProperty) { | 173 if (m_targetProperty) { |
180 m_type = m_targetProperty->type(); | 174 m_type = m_targetProperty->type(); |
181 m_cssPropertyId = m_targetProperty->cssPropertyId(); | 175 m_cssPropertyId = m_targetProperty->cssPropertyId(); |
182 | 176 |
183 // Only <animateTransform> is allowed to animate AnimatedTransformList. | 177 // Only <animateTransform> is allowed to animate AnimatedTransformList. |
184 // http://www.w3.org/TR/SVG/animate.html#AnimationAttributesAndProperties | 178 // http://www.w3.org/TR/SVG/animate.html#AnimationAttributesAndProperties |
185 if (m_type == AnimatedTransformList) { | 179 if (m_type == AnimatedTransformList) { |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 DEFINE_TRACE(SVGAnimateElement) { | 615 DEFINE_TRACE(SVGAnimateElement) { |
622 visitor->trace(m_fromProperty); | 616 visitor->trace(m_fromProperty); |
623 visitor->trace(m_toProperty); | 617 visitor->trace(m_toProperty); |
624 visitor->trace(m_toAtEndOfDurationProperty); | 618 visitor->trace(m_toAtEndOfDurationProperty); |
625 visitor->trace(m_animatedValue); | 619 visitor->trace(m_animatedValue); |
626 visitor->trace(m_targetProperty); | 620 visitor->trace(m_targetProperty); |
627 SVGAnimationElement::trace(visitor); | 621 SVGAnimationElement::trace(visitor); |
628 } | 622 } |
629 | 623 |
630 } // namespace blink | 624 } // namespace blink |
OLD | NEW |