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) 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) 2008 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2008 Cameron McCormack <cam@mcc.id.au> |
7 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2011. 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(end, endEvent); | 69 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(end, endEvent); |
70 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(repeat, repeatEvent); | 70 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(repeat, repeatEvent); |
71 | 71 |
72 static bool isTargetAttributeCSSProperty(SVGElement*, const QualifiedName&); | 72 static bool isTargetAttributeCSSProperty(SVGElement*, const QualifiedName&); |
73 | 73 |
74 virtual bool isAdditive(); | 74 virtual bool isAdditive(); |
75 bool isAccumulated() const; | 75 bool isAccumulated() const; |
76 AnimationMode getAnimationMode() const { return m_animationMode; } | 76 AnimationMode getAnimationMode() const { return m_animationMode; } |
77 CalcMode getCalcMode() const { return m_calcMode; } | 77 CalcMode getCalcMode() const { return m_calcMode; } |
78 | 78 |
79 enum ShouldApplyAnimationType { | |
80 DontApplyAnimation, | |
81 ApplyCSSAnimation, | |
82 ApplyXMLAnimation, | |
83 ApplyXMLandCSSAnimation | |
84 }; | |
85 | |
86 ShouldApplyAnimationType shouldApplyAnimation( | |
87 SVGElement* targetElement, | |
88 const QualifiedName& attributeName); | |
89 | |
90 template <typename AnimatedType> | 79 template <typename AnimatedType> |
91 void animateDiscreteType(float percentage, | 80 void animateDiscreteType(float percentage, |
92 const AnimatedType& fromType, | 81 const AnimatedType& fromType, |
93 const AnimatedType& toType, | 82 const AnimatedType& toType, |
94 AnimatedType& animatedType) { | 83 AnimatedType& animatedType) { |
95 if ((getAnimationMode() == FromToAnimation && percentage > 0.5) || | 84 if ((getAnimationMode() == FromToAnimation && percentage > 0.5) || |
96 getAnimationMode() == ToAnimation || percentage == 1) { | 85 getAnimationMode() == ToAnimation || percentage == 1) { |
97 animatedType = AnimatedType(toType); | 86 animatedType = AnimatedType(toType); |
98 return; | 87 return; |
99 } | 88 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 String m_lastValuesAnimationFrom; | 202 String m_lastValuesAnimationFrom; |
214 String m_lastValuesAnimationTo; | 203 String m_lastValuesAnimationTo; |
215 bool m_hasInvalidCSSAttributeType; | 204 bool m_hasInvalidCSSAttributeType; |
216 CalcMode m_calcMode; | 205 CalcMode m_calcMode; |
217 AnimationMode m_animationMode; | 206 AnimationMode m_animationMode; |
218 }; | 207 }; |
219 | 208 |
220 } // namespace blink | 209 } // namespace blink |
221 | 210 |
222 #endif // SVGAnimationElement_h | 211 #endif // SVGAnimationElement_h |
OLD | NEW |