OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. | |
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | |
4 * | |
5 * This library is free software; you can redistribute it and/or | |
6 * modify it under the terms of the GNU Library General Public | |
7 * License as published by the Free Software Foundation; either | |
8 * version 2 of the License, or (at your option) any later version. | |
9 * | |
10 * This library is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 * Library General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU Library General Public License | |
16 * along with this library; see the file COPYING.LIB. If not, write to | |
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
18 * Boston, MA 02110-1301, USA. | |
19 */ | |
20 | |
21 #ifndef SVGAnimatedTypeAnimator_h | |
22 #define SVGAnimatedTypeAnimator_h | |
23 | |
24 #include "core/CSSPropertyNames.h" | |
25 #include "core/svg/properties/SVGPropertyInfo.h" | |
26 #include "platform/heap/Handle.h" | |
27 #include "wtf/text/WTFString.h" | |
28 | |
29 namespace blink { | |
30 | |
31 class SVGAnimatedPropertyBase; | |
32 class SVGPropertyBase; | |
33 class SVGElement; | |
34 class SVGAnimationElement; | |
35 | |
36 class SVGAnimatedTypeAnimator final { | |
37 DISALLOW_NEW(); | |
38 | |
39 public: | |
40 SVGAnimatedTypeAnimator(SVGAnimationElement*); | |
41 | |
42 void clear(); | |
43 void reset(const SVGElement&); | |
44 | |
45 SVGPropertyBase* createAnimatedValue() const; | |
46 SVGPropertyBase* createPropertyForAnimation(const String&) const; | |
47 | |
48 AnimatedPropertyType type() const { return m_type; } | |
49 CSSPropertyID cssProperty() const { return m_cssProperty; } | |
50 | |
51 bool isAnimatingSVGDom() const { return m_animatedProperty; } | |
52 bool isAnimatingCSSProperty() const { | |
53 return m_cssProperty != CSSPropertyInvalid; | |
54 } | |
55 | |
56 DECLARE_TRACE(); | |
57 | |
58 private: | |
59 SVGPropertyBase* createPropertyForAttributeAnimation(const String&) const; | |
60 SVGPropertyBase* createPropertyForCSSAnimation(const String&) const; | |
61 | |
62 Member<SVGAnimationElement> m_animationElement; | |
63 Member<SVGAnimatedPropertyBase> m_animatedProperty; | |
64 AnimatedPropertyType m_type; | |
65 CSSPropertyID m_cssProperty; | |
66 }; | |
67 | |
68 } // namespace blink | |
69 | |
70 #endif // SVGAnimatedTypeAnimator_h | |
OLD | NEW |