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* createAnimatedValue(); | 43 SVGPropertyBase* createAnimatedValue() const; |
44 SVGPropertyBase* createAnimatedValueFromString(const String&); | 44 SVGPropertyBase* createPropertyForAnimation(const String&) const; |
45 | |
46 void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGPrope
rtyBase*, SVGPropertyBase*, SVGPropertyBase*, SVGPropertyBase*); | |
47 float calculateDistance(const String& fromString, const String& toString); | |
48 | |
49 void calculateFromAndToValues(Member<SVGPropertyBase>& from, Member<SVGPrope
rtyBase>& to, const String& fromString, const String& toString); | |
50 void calculateFromAndByValues(Member<SVGPropertyBase>& from, Member<SVGPrope
rtyBase>& to, const String& fromString, const String& byString); | |
51 | 45 |
52 void setContextElement(SVGElement* contextElement) { m_contextElement = cont
extElement; } | 46 void setContextElement(SVGElement* contextElement) { m_contextElement = cont
extElement; } |
53 AnimatedPropertyType type() const { return m_type; } | 47 AnimatedPropertyType type() const { return m_type; } |
54 | 48 |
55 bool isAnimatingSVGDom() const { return m_animatedProperty; } | 49 bool isAnimatingSVGDom() const { return m_animatedProperty; } |
56 bool isAnimatingCSSProperty() const { return !m_animatedProperty; } | 50 bool isAnimatingCSSProperty() const { return !m_animatedProperty; } |
57 | 51 |
58 DECLARE_TRACE(); | 52 DECLARE_TRACE(); |
59 | 53 |
60 private: | 54 private: |
61 friend class ParsePropertyFromString; | 55 SVGPropertyBase* createPropertyForAttributeAnimation(const String&) const; |
62 SVGPropertyBase* createPropertyForAnimation(const String&); | 56 SVGPropertyBase* createPropertyForCSSAnimation(const String&) const; |
63 | 57 |
64 Member<SVGAnimationElement> m_animationElement; | 58 Member<SVGAnimationElement> m_animationElement; |
65 Member<SVGElement> m_contextElement; | 59 Member<SVGElement> m_contextElement; |
66 Member<SVGAnimatedPropertyBase> m_animatedProperty; | 60 Member<SVGAnimatedPropertyBase> m_animatedProperty; |
67 AnimatedPropertyType m_type; | 61 AnimatedPropertyType m_type; |
68 }; | 62 }; |
69 | 63 |
70 } // namespace blink | 64 } // namespace blink |
71 | 65 |
72 #endif // SVGAnimatedTypeAnimator_h | 66 #endif // SVGAnimatedTypeAnimator_h |
OLD | NEW |