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

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

Issue 107083007: Reset SVGAnimationElement values animation state on attribute changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 0ms timeout for pass. Created 6 years, 11 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
« no previous file with comments | « LayoutTests/svg/animations/animate-element-reinserted-crash-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, 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 return; 235 return;
236 } 236 }
237 237
238 animationAttributeChanged(); 238 animationAttributeChanged();
239 } 239 }
240 240
241 void SVGAnimationElement::animationAttributeChanged() 241 void SVGAnimationElement::animationAttributeChanged()
242 { 242 {
243 // Assumptions may not hold after an attribute change. 243 // Assumptions may not hold after an attribute change.
244 m_animationValid = false; 244 m_animationValid = false;
245 m_lastValuesAnimationFrom = String();
246 m_lastValuesAnimationTo = String();
245 setInactive(); 247 setInactive();
246 } 248 }
247 249
248 float SVGAnimationElement::getStartTime() const 250 float SVGAnimationElement::getStartTime() const
249 { 251 {
250 return narrowPrecisionToFloat(intervalBegin().value()); 252 return narrowPrecisionToFloat(intervalBegin().value());
251 } 253 }
252 254
253 float SVGAnimationElement::getCurrentTime() const 255 float SVGAnimationElement::getCurrentTime() const
254 { 256 {
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 SVGSMILElement::setAttributeName(attributeName); 697 SVGSMILElement::setAttributeName(attributeName);
696 checkInvalidCSSAttributeType(targetElement()); 698 checkInvalidCSSAttributeType(targetElement());
697 } 699 }
698 700
699 void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target) 701 void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target)
700 { 702 {
701 m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attribut eType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(target, attributeNa me()); 703 m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attribut eType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(target, attributeNa me());
702 } 704 }
703 705
704 } 706 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/animations/animate-element-reinserted-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698