| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 231 |
| 232 // CSS properties animation code-path. | 232 // CSS properties animation code-path. |
| 233 ASSERT(m_animatedProperties.isEmpty()); | 233 ASSERT(m_animatedProperties.isEmpty()); |
| 234 String baseValue; | 234 String baseValue; |
| 235 | 235 |
| 236 if (shouldApply == ApplyCSSAnimation) { | 236 if (shouldApply == ApplyCSSAnimation) { |
| 237 ASSERT(SVGAnimationElement::isTargetAttributeCSSProperty(targetElement,
attributeName)); | 237 ASSERT(SVGAnimationElement::isTargetAttributeCSSProperty(targetElement,
attributeName)); |
| 238 computeCSSPropertyValue(targetElement, cssPropertyID(attributeName.local
Name()), baseValue); | 238 computeCSSPropertyValue(targetElement, cssPropertyID(attributeName.local
Name()), baseValue); |
| 239 } | 239 } |
| 240 | 240 |
| 241 if (!m_animatedType) | 241 if (!m_animatedType || !m_animatedType->setValueAsString(attributeName, base
Value)) |
| 242 m_animatedType = animator->constructFromString(baseValue); | 242 m_animatedType = animator->constructFromString(baseValue); |
| 243 else | |
| 244 m_animatedType->setValueAsString(attributeName, baseValue); | |
| 245 } | 243 } |
| 246 | 244 |
| 247 static inline void applyCSSPropertyToTarget(SVGElement* targetElement, CSSProper
tyID id, const String& value) | 245 static inline void applyCSSPropertyToTarget(SVGElement* targetElement, CSSProper
tyID id, const String& value) |
| 248 { | 246 { |
| 249 ASSERT_WITH_SECURITY_IMPLICATION(!targetElement->m_deletionHasBegun); | 247 ASSERT_WITH_SECURITY_IMPLICATION(!targetElement->m_deletionHasBegun); |
| 250 | 248 |
| 251 MutableStylePropertySet* propertySet = targetElement->ensureAnimatedSMILStyl
eProperties(); | 249 MutableStylePropertySet* propertySet = targetElement->ensureAnimatedSMILStyl
eProperties(); |
| 252 if (!propertySet->setProperty(id, value, false, 0)) | 250 if (!propertySet->setProperty(id, value, false, 0)) |
| 253 return; | 251 return; |
| 254 | 252 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 433 |
| 436 SVGAnimatedTypeAnimator* SVGAnimateElement::ensureAnimator() | 434 SVGAnimatedTypeAnimator* SVGAnimateElement::ensureAnimator() |
| 437 { | 435 { |
| 438 if (!m_animator) | 436 if (!m_animator) |
| 439 m_animator = SVGAnimatorFactory::create(this, targetElement(), m_animate
dPropertyType); | 437 m_animator = SVGAnimatorFactory::create(this, targetElement(), m_animate
dPropertyType); |
| 440 ASSERT(m_animatedPropertyType == m_animator->type()); | 438 ASSERT(m_animatedPropertyType == m_animator->type()); |
| 441 return m_animator.get(); | 439 return m_animator.get(); |
| 442 } | 440 } |
| 443 | 441 |
| 444 } | 442 } |
| OLD | NEW |