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 21 matching lines...) Expand all Loading... |
32 #include "CSSPropertyNames.h" | 32 #include "CSSPropertyNames.h" |
33 #include "core/dom/Document.h" | 33 #include "core/dom/Document.h" |
34 #include "core/frame/animation/AnimationBase.h" | 34 #include "core/frame/animation/AnimationBase.h" |
35 | 35 |
36 namespace WebCore { | 36 namespace WebCore { |
37 | 37 |
38 // An ImplicitAnimation tracks the state of a transition of a specific CSS prope
rty | 38 // An ImplicitAnimation tracks the state of a transition of a specific CSS prope
rty |
39 // for a single RenderObject. | 39 // for a single RenderObject. |
40 class ImplicitAnimation : public AnimationBase { | 40 class ImplicitAnimation : public AnimationBase { |
41 public: | 41 public: |
42 static PassRefPtr<ImplicitAnimation> create(const CSSAnimationData* animatio
n, CSSPropertyID animatingProperty, RenderObject* renderer, CompositeAnimation*
compositeAnimation, RenderStyle* fromStyle) | 42 static PassRefPtr<ImplicitAnimation> create(const CSSAnimationData* animatio
n, CSSPropertyID animatingProperty, RenderObject& renderer, CompositeAnimation*
compositeAnimation, RenderStyle* fromStyle) |
43 { | 43 { |
44 return adoptRef(new ImplicitAnimation(animation, animatingProperty, rend
erer, compositeAnimation, fromStyle)); | 44 return adoptRef(new ImplicitAnimation(animation, animatingProperty, rend
erer, compositeAnimation, fromStyle)); |
45 }; | 45 }; |
46 | 46 |
47 CSSPropertyID transitionProperty() const { return m_transitionProperty; } | 47 CSSPropertyID transitionProperty() const { return m_transitionProperty; } |
48 CSSPropertyID animatingProperty() const { return m_animatingProperty; } | 48 CSSPropertyID animatingProperty() const { return m_animatingProperty; } |
49 | 49 |
50 virtual void onAnimationEnd(double elapsedTime); | 50 virtual void onAnimationEnd(double elapsedTime); |
51 virtual void startAnimation(double timeOffset); | 51 virtual void startAnimation(double timeOffset); |
52 virtual void pauseAnimation(double /*timeOffset*/); | 52 virtual void pauseAnimation(double /*timeOffset*/); |
(...skipping 20 matching lines...) Expand all Loading... |
73 void setActive(bool b) { m_active = b; } | 73 void setActive(bool b) { m_active = b; } |
74 | 74 |
75 protected: | 75 protected: |
76 bool shouldSendEventForListener(Document::ListenerType) const; | 76 bool shouldSendEventForListener(Document::ListenerType) const; |
77 bool sendTransitionEvent(const AtomicString&, double elapsedTime); | 77 bool sendTransitionEvent(const AtomicString&, double elapsedTime); |
78 | 78 |
79 void validateTransformFunctionList(); | 79 void validateTransformFunctionList(); |
80 void checkForMatchingFilterFunctionLists(); | 80 void checkForMatchingFilterFunctionLists(); |
81 | 81 |
82 private: | 82 private: |
83 ImplicitAnimation(const CSSAnimationData*, CSSPropertyID, RenderObject*, Com
positeAnimation*, RenderStyle*); | 83 ImplicitAnimation(const CSSAnimationData*, CSSPropertyID, RenderObject&, Com
positeAnimation*, RenderStyle*); |
84 virtual ~ImplicitAnimation(); | 84 virtual ~ImplicitAnimation(); |
85 | 85 |
86 CSSPropertyID m_transitionProperty; // Transition property as specified in t
he RenderStyle. | 86 CSSPropertyID m_transitionProperty; // Transition property as specified in t
he RenderStyle. |
87 CSSPropertyID m_animatingProperty; // Specific property for this ImplicitAni
mation | 87 CSSPropertyID m_animatingProperty; // Specific property for this ImplicitAni
mation |
88 bool m_overridden; // true when there is a keyframe animation that
overrides the transitioning property | 88 bool m_overridden; // true when there is a keyframe animation that
overrides the transitioning property |
89 bool m_active; // used for culling the list of transitions | 89 bool m_active; // used for culling the list of transitions |
90 | 90 |
91 // The two styles that we are blending. | 91 // The two styles that we are blending. |
92 RefPtr<RenderStyle> m_fromStyle; | 92 RefPtr<RenderStyle> m_fromStyle; |
93 RefPtr<RenderStyle> m_toStyle; | 93 RefPtr<RenderStyle> m_toStyle; |
94 }; | 94 }; |
95 | 95 |
96 } // namespace WebCore | 96 } // namespace WebCore |
97 | 97 |
98 #endif // ImplicitAnimation_h | 98 #endif // ImplicitAnimation_h |
OLD | NEW |