OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. |
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 22 matching lines...) Expand all Loading... |
33 class SVGAnimationElement; | 33 class SVGAnimationElement; |
34 | 34 |
35 class SVGAnimatedTypeAnimator final { | 35 class SVGAnimatedTypeAnimator final { |
36 DISALLOW_NEW(); | 36 DISALLOW_NEW(); |
37 public: | 37 public: |
38 SVGAnimatedTypeAnimator(SVGAnimationElement*); | 38 SVGAnimatedTypeAnimator(SVGAnimationElement*); |
39 | 39 |
40 void clear(); | 40 void clear(); |
41 void reset(SVGElement* contextElement); | 41 void reset(SVGElement* contextElement); |
42 | 42 |
43 SVGPropertyBase* constructFromString(const String&); | 43 SVGPropertyBase* createAnimatedValue(); |
44 | 44 SVGPropertyBase* createAnimatedValueFromString(const String&); |
45 SVGPropertyBase* startAnimValAnimation(); | |
46 void stopAnimValAnimation(); | |
47 SVGPropertyBase* resetAnimValToBaseVal(); | |
48 | 45 |
49 void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGPrope
rtyBase*, SVGPropertyBase*, SVGPropertyBase*, SVGPropertyBase*); | 46 void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGPrope
rtyBase*, SVGPropertyBase*, SVGPropertyBase*, SVGPropertyBase*); |
50 float calculateDistance(const String& fromString, const String& toString); | 47 float calculateDistance(const String& fromString, const String& toString); |
51 | 48 |
52 void calculateFromAndToValues(Member<SVGPropertyBase>& from, Member<SVGPrope
rtyBase>& to, const String& fromString, const String& toString); | 49 void calculateFromAndToValues(Member<SVGPropertyBase>& from, Member<SVGPrope
rtyBase>& to, const String& fromString, const String& toString); |
53 void calculateFromAndByValues(Member<SVGPropertyBase>& from, Member<SVGPrope
rtyBase>& to, const String& fromString, const String& byString); | 50 void calculateFromAndByValues(Member<SVGPropertyBase>& from, Member<SVGPrope
rtyBase>& to, const String& fromString, const String& byString); |
54 | 51 |
55 void setContextElement(SVGElement* contextElement) { m_contextElement = cont
extElement; } | 52 void setContextElement(SVGElement* contextElement) { m_contextElement = cont
extElement; } |
56 AnimatedPropertyType type() const { return m_type; } | 53 AnimatedPropertyType type() const { return m_type; } |
57 | 54 |
58 bool isAnimatingSVGDom() const { return m_animatedProperty; } | 55 bool isAnimatingSVGDom() const { return m_animatedProperty; } |
59 bool isAnimatingCSSProperty() const { return !m_animatedProperty; } | 56 bool isAnimatingCSSProperty() const { return !m_animatedProperty; } |
60 | 57 |
61 DECLARE_TRACE(); | 58 DECLARE_TRACE(); |
62 | 59 |
63 private: | 60 private: |
64 friend class ParsePropertyFromString; | 61 friend class ParsePropertyFromString; |
65 SVGPropertyBase* createPropertyForAnimation(const String&); | 62 SVGPropertyBase* createPropertyForAnimation(const String&); |
66 SVGPropertyBase* resetAnimation(); | |
67 | 63 |
68 Member<SVGAnimationElement> m_animationElement; | 64 Member<SVGAnimationElement> m_animationElement; |
69 Member<SVGElement> m_contextElement; | 65 Member<SVGElement> m_contextElement; |
70 Member<SVGAnimatedPropertyBase> m_animatedProperty; | 66 Member<SVGAnimatedPropertyBase> m_animatedProperty; |
71 AnimatedPropertyType m_type; | 67 AnimatedPropertyType m_type; |
72 }; | 68 }; |
73 | 69 |
74 } // namespace blink | 70 } // namespace blink |
75 | 71 |
76 #endif // SVGAnimatedTypeAnimator_h | 72 #endif // SVGAnimatedTypeAnimator_h |
OLD | NEW |