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, 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 attr_name == SVGNames::keySplinesAttr || | 214 attr_name == SVGNames::keySplinesAttr || |
215 attr_name == SVGNames::keyPointsAttr || | 215 attr_name == SVGNames::keyPointsAttr || |
216 attr_name == SVGNames::keyTimesAttr) { | 216 attr_name == SVGNames::keyTimesAttr) { |
217 AnimationAttributeChanged(); | 217 AnimationAttributeChanged(); |
218 return; | 218 return; |
219 } | 219 } |
220 | 220 |
221 SVGSMILElement::SvgAttributeChanged(attr_name); | 221 SVGSMILElement::SvgAttributeChanged(attr_name); |
222 } | 222 } |
223 | 223 |
| 224 void SVGAnimationElement::InvalidatedValuesCache() { |
| 225 last_values_animation_from_ = String(); |
| 226 last_values_animation_to_ = String(); |
| 227 } |
| 228 |
224 void SVGAnimationElement::AnimationAttributeChanged() { | 229 void SVGAnimationElement::AnimationAttributeChanged() { |
225 // Assumptions may not hold after an attribute change. | 230 // Assumptions may not hold after an attribute change. |
226 animation_valid_ = false; | 231 animation_valid_ = false; |
227 last_values_animation_from_ = String(); | 232 InvalidatedValuesCache(); |
228 last_values_animation_to_ = String(); | |
229 SetInactive(); | 233 SetInactive(); |
230 } | 234 } |
231 | 235 |
232 float SVGAnimationElement::getStartTime(ExceptionState& exception_state) const { | 236 float SVGAnimationElement::getStartTime(ExceptionState& exception_state) const { |
233 SMILTime start_time = IntervalBegin(); | 237 SMILTime start_time = IntervalBegin(); |
234 if (!start_time.IsFinite()) { | 238 if (!start_time.IsFinite()) { |
235 exception_state.ThrowDOMException(kInvalidStateError, | 239 exception_state.ThrowDOMException(kInvalidStateError, |
236 "No current interval."); | 240 "No current interval."); |
237 return 0; | 241 return 0; |
238 } | 242 } |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 CalculatePercentForSpline(percent, CalculateKeyTimesIndex(percent)); | 622 CalculatePercentForSpline(percent, CalculateKeyTimesIndex(percent)); |
619 else if (animation_mode == kFromToAnimation || animation_mode == kToAnimation) | 623 else if (animation_mode == kFromToAnimation || animation_mode == kToAnimation) |
620 effective_percent = CalculatePercentForFromTo(percent); | 624 effective_percent = CalculatePercentForFromTo(percent); |
621 else | 625 else |
622 effective_percent = percent; | 626 effective_percent = percent; |
623 | 627 |
624 CalculateAnimatedValue(effective_percent, repeat_count, result_element); | 628 CalculateAnimatedValue(effective_percent, repeat_count, result_element); |
625 } | 629 } |
626 | 630 |
627 } // namespace blink | 631 } // namespace blink |
OLD | NEW |