| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 #endif | 198 #endif |
| 199 | 199 |
| 200 void SVGAnimateElement::resetAnimatedType() | 200 void SVGAnimateElement::resetAnimatedType() |
| 201 { | 201 { |
| 202 SVGAnimatedTypeAnimator* animator = ensureAnimator(); | 202 SVGAnimatedTypeAnimator* animator = ensureAnimator(); |
| 203 ASSERT(m_animatedPropertyType == animator->type()); | 203 ASSERT(m_animatedPropertyType == animator->type()); |
| 204 | 204 |
| 205 SVGElement* targetElement = this->targetElement(); | 205 SVGElement* targetElement = this->targetElement(); |
| 206 const QualifiedName& attributeName = this->attributeName(); | 206 const QualifiedName& attributeName = this->attributeName(); |
| 207 ShouldApplyAnimation shouldApply = shouldApplyAnimation(targetElement, attri
buteName); | 207 ShouldApplyAnimation shouldApply = shouldApplyAnimation(targetElement, attri
buteName); |
| 208 |
| 209 if (shouldApply == DontApplyAnimation) |
| 210 return; |
| 211 |
| 208 if (shouldApply == ApplyXMLAnimation) { | 212 if (shouldApply == ApplyXMLAnimation) { |
| 209 // SVG DOM animVal animation code-path. | 213 // SVG DOM animVal animation code-path. |
| 210 m_animatedProperties = animator->findAnimatedPropertiesForAttributeName(
targetElement, attributeName); | 214 m_animatedProperties = animator->findAnimatedPropertiesForAttributeName(
targetElement, attributeName); |
| 211 ASSERT(!m_animatedProperties.isEmpty()); | 215 ASSERT(!m_animatedProperties.isEmpty()); |
| 212 | 216 |
| 213 ASSERT(propertyTypesAreConsistent(m_animatedPropertyType, m_animatedProp
erties)); | 217 ASSERT(propertyTypesAreConsistent(m_animatedPropertyType, m_animatedProp
erties)); |
| 214 if (!m_animatedType) | 218 if (!m_animatedType) |
| 215 m_animatedType = animator->startAnimValAnimation(m_animatedPropertie
s); | 219 m_animatedType = animator->startAnimValAnimation(m_animatedPropertie
s); |
| 216 else { | 220 else { |
| 217 animator->resetAnimValToBaseVal(m_animatedProperties, m_animatedType
.get()); | 221 animator->resetAnimValToBaseVal(m_animatedProperties, m_animatedType
.get()); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 | 425 |
| 422 SVGAnimatedTypeAnimator* SVGAnimateElement::ensureAnimator() | 426 SVGAnimatedTypeAnimator* SVGAnimateElement::ensureAnimator() |
| 423 { | 427 { |
| 424 if (!m_animator) | 428 if (!m_animator) |
| 425 m_animator = SVGAnimatorFactory::create(this, targetElement(), m_animate
dPropertyType); | 429 m_animator = SVGAnimatorFactory::create(this, targetElement(), m_animate
dPropertyType); |
| 426 ASSERT(m_animatedPropertyType == m_animator->type()); | 430 ASSERT(m_animatedPropertyType == m_animator->type()); |
| 427 return m_animator.get(); | 431 return m_animator.get(); |
| 428 } | 432 } |
| 429 | 433 |
| 430 } | 434 } |
| OLD | NEW |