OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 public: | 46 public: |
47 static PassRefPtr<CompositeAnimation> create(AnimationControllerPrivate* ani
mationController) | 47 static PassRefPtr<CompositeAnimation> create(AnimationControllerPrivate* ani
mationController) |
48 { | 48 { |
49 return adoptRef(new CompositeAnimation(animationController)); | 49 return adoptRef(new CompositeAnimation(animationController)); |
50 }; | 50 }; |
51 | 51 |
52 ~CompositeAnimation(); | 52 ~CompositeAnimation(); |
53 | 53 |
54 void clearRenderer(); | 54 void clearRenderer(); |
55 | 55 |
56 PassRefPtr<RenderStyle> animate(RenderObject*, RenderStyle* currentStyle, Re
nderStyle* targetStyle); | 56 PassRefPtr<RenderStyle> animate(RenderObject&, RenderStyle* currentStyle, Re
nderStyle& targetStyle); |
57 PassRefPtr<RenderStyle> getAnimatedStyle() const; | 57 PassRefPtr<RenderStyle> getAnimatedStyle() const; |
58 | 58 |
59 double timeToNextService() const; | 59 double timeToNextService() const; |
60 double timeToNextEvent() const; | 60 double timeToNextEvent() const; |
61 | 61 |
62 AnimationControllerPrivate* animationController() const { return m_animation
Controller; } | 62 AnimationControllerPrivate* animationController() const { return m_animation
Controller; } |
63 | 63 |
64 bool hasAnimations() const { return !m_transitions.isEmpty() || !m_keyframe
Animations.isEmpty(); } | 64 bool hasAnimations() const { return !m_transitions.isEmpty() || !m_keyframe
Animations.isEmpty(); } |
65 | 65 |
66 bool isAnimatingProperty(CSSPropertyID, bool acceleratedOnly, bool isRunning
Now) const; | 66 bool isAnimatingProperty(CSSPropertyID, bool acceleratedOnly, bool isRunning
Now) const; |
67 | 67 |
68 PassRefPtr<KeyframeAnimation> getAnimationForProperty(CSSPropertyID) const; | 68 PassRefPtr<KeyframeAnimation> getAnimationForProperty(CSSPropertyID) const; |
69 | 69 |
70 void overrideImplicitAnimations(CSSPropertyID); | 70 void overrideImplicitAnimations(CSSPropertyID); |
71 void resumeOverriddenImplicitAnimations(CSSPropertyID); | 71 void resumeOverriddenImplicitAnimations(CSSPropertyID); |
72 | 72 |
73 void pauseAnimationsForTesting(double t); | 73 void pauseAnimationsForTesting(double t); |
74 unsigned numberOfActiveAnimations() const; | 74 unsigned numberOfActiveAnimations() const; |
75 | 75 |
76 private: | 76 private: |
77 CompositeAnimation(AnimationControllerPrivate* animationController) | 77 CompositeAnimation(AnimationControllerPrivate* animationController) |
78 : m_animationController(animationController) | 78 : m_animationController(animationController) |
79 { | 79 { |
80 } | 80 } |
81 | 81 |
82 void updateTransitions(RenderObject*, RenderStyle* currentStyle, RenderStyle
* targetStyle); | 82 void updateTransitions(RenderObject&, RenderStyle* currentStyle, RenderStyle
& targetStyle); |
83 void updateKeyframeAnimations(RenderObject*, RenderStyle* currentStyle, Rend
erStyle* targetStyle); | 83 void updateKeyframeAnimations(RenderObject&, RenderStyle* currentStyle, Rend
erStyle& targetStyle); |
84 | 84 |
85 typedef HashMap<int, RefPtr<ImplicitAnimation> > CSSPropertyTransitionsMap; | 85 typedef HashMap<int, RefPtr<ImplicitAnimation> > CSSPropertyTransitionsMap; |
86 typedef HashMap<AtomicString, RefPtr<KeyframeAnimation> > AnimationNameMap; | 86 typedef HashMap<AtomicString, RefPtr<KeyframeAnimation> > AnimationNameMap; |
87 | 87 |
88 AnimationControllerPrivate* m_animationController; | 88 AnimationControllerPrivate* m_animationController; |
89 CSSPropertyTransitionsMap m_transitions; | 89 CSSPropertyTransitionsMap m_transitions; |
90 AnimationNameMap m_keyframeAnimations; | 90 AnimationNameMap m_keyframeAnimations; |
91 Vector<AtomicString> m_keyframeAnimationOrderList; | 91 Vector<AtomicString> m_keyframeAnimationOrderList; |
92 }; | 92 }; |
93 | 93 |
94 } // namespace WebCore | 94 } // namespace WebCore |
95 | 95 |
96 #endif // CompositeAnimation_h | 96 #endif // CompositeAnimation_h |
OLD | NEW |