Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: Source/core/svg/SVGAnimateElement.cpp

Issue 183973023: Always reset the animated property for CSS-type SVG animation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/svg/animations/additive-from-to-fill-animation-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 // CSS properties animation code-path. 222 // CSS properties animation code-path.
223 ASSERT(m_animatedProperties.isEmpty()); 223 ASSERT(m_animatedProperties.isEmpty());
224 String baseValue; 224 String baseValue;
225 225
226 if (shouldApply == ApplyCSSAnimation) { 226 if (shouldApply == ApplyCSSAnimation) {
227 ASSERT(SVGAnimationElement::isTargetAttributeCSSProperty(targetElement, attributeName)); 227 ASSERT(SVGAnimationElement::isTargetAttributeCSSProperty(targetElement, attributeName));
228 computeCSSPropertyValue(targetElement, cssPropertyID(attributeName.local Name()), baseValue); 228 computeCSSPropertyValue(targetElement, cssPropertyID(attributeName.local Name()), baseValue);
229 } 229 }
230 230
231 if (!m_animatedProperty) 231 m_animatedProperty = animator->constructFromString(baseValue);
232 m_animatedProperty = animator->constructFromString(baseValue);
233 } 232 }
234 233
235 static inline void applyCSSPropertyToTarget(SVGElement* targetElement, CSSProper tyID id, const String& value) 234 static inline void applyCSSPropertyToTarget(SVGElement* targetElement, CSSProper tyID id, const String& value)
236 { 235 {
237 ASSERT_WITH_SECURITY_IMPLICATION(!targetElement->m_deletionHasBegun); 236 ASSERT_WITH_SECURITY_IMPLICATION(!targetElement->m_deletionHasBegun);
238 237
239 MutableStylePropertySet* propertySet = targetElement->ensureAnimatedSMILStyl eProperties(); 238 MutableStylePropertySet* propertySet = targetElement->ensureAnimatedSMILStyl eProperties();
240 if (!propertySet->setProperty(id, value, false, 0)) 239 if (!propertySet->setProperty(id, value, false, 0))
241 return; 240 return;
242 241
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 423
425 SVGAnimatedTypeAnimator* SVGAnimateElement::ensureAnimator() 424 SVGAnimatedTypeAnimator* SVGAnimateElement::ensureAnimator()
426 { 425 {
427 if (!m_animator) 426 if (!m_animator)
428 m_animator = SVGAnimatorFactory::create(this, targetElement(), m_animate dPropertyType); 427 m_animator = SVGAnimatorFactory::create(this, targetElement(), m_animate dPropertyType);
429 ASSERT(m_animatedPropertyType == m_animator->type()); 428 ASSERT(m_animatedPropertyType == m_animator->type());
430 return m_animator.get(); 429 return m_animator.get();
431 } 430 }
432 431
433 } 432 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/animations/additive-from-to-fill-animation-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698