OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef Keyframe_h | 5 #ifndef Keyframe_h |
6 #define Keyframe_h | 6 #define Keyframe_h |
7 | 7 |
8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
9 #include "core/animation/AnimationEffect.h" | 9 #include "core/animation/AnimationEffect.h" |
10 #include "core/animation/AnimationNode.h" | 10 #include "core/animation/AnimationNode.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 PassRefPtrWillBeRawPtr<Keyframe> cloneWithOffset(double offset) const | 41 PassRefPtrWillBeRawPtr<Keyframe> cloneWithOffset(double offset) const |
42 { | 42 { |
43 RefPtrWillBeRawPtr<Keyframe> theClone = clone(); | 43 RefPtrWillBeRawPtr<Keyframe> theClone = clone(); |
44 theClone->setOffset(offset); | 44 theClone->setOffset(offset); |
45 return theClone.release(); | 45 return theClone.release(); |
46 } | 46 } |
47 | 47 |
48 virtual bool isAnimatableValueKeyframe() const { return false; } | 48 virtual bool isAnimatableValueKeyframe() const { return false; } |
49 virtual bool isStringKeyframe() const { return false; } | 49 virtual bool isStringKeyframe() const { return false; } |
50 | 50 |
51 virtual void trace(Visitor*) { } | 51 DEFINE_INLINE_VIRTUAL_TRACE() { } |
52 | 52 |
53 class PropertySpecificKeyframe : public NoBaseWillBeGarbageCollectedFinalize
d<PropertySpecificKeyframe> { | 53 class PropertySpecificKeyframe : public NoBaseWillBeGarbageCollectedFinalize
d<PropertySpecificKeyframe> { |
54 public: | 54 public: |
55 virtual ~PropertySpecificKeyframe() { } | 55 virtual ~PropertySpecificKeyframe() { } |
56 double offset() const { return m_offset; } | 56 double offset() const { return m_offset; } |
57 TimingFunction& easing() const { return *m_easing; } | 57 TimingFunction& easing() const { return *m_easing; } |
58 AnimationEffect::CompositeOperation composite() const { return m_composi
te; } | 58 AnimationEffect::CompositeOperation composite() const { return m_composi
te; } |
59 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> cloneWithOffset
(double offset) const = 0; | 59 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> cloneWithOffset
(double offset) const = 0; |
60 | 60 |
61 virtual const PassRefPtrWillBeRawPtr<AnimatableValue> getAnimatableValue
() const = 0; | 61 virtual const PassRefPtrWillBeRawPtr<AnimatableValue> getAnimatableValue
() const = 0; |
62 | 62 |
63 virtual bool isAnimatableValuePropertySpecificKeyframe() const { return
false; } | 63 virtual bool isAnimatableValuePropertySpecificKeyframe() const { return
false; } |
64 virtual bool isStringPropertySpecificKeyframe() const { return false; } | 64 virtual bool isStringPropertySpecificKeyframe() const { return false; } |
65 | 65 |
66 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> neutralKeyframe
(double offset, PassRefPtr<TimingFunction> easing) const = 0; | 66 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> neutralKeyframe
(double offset, PassRefPtr<TimingFunction> easing) const = 0; |
67 virtual PassRefPtrWillBeRawPtr<Interpolation> maybeCreateInterpolation(C
SSPropertyID, blink::Keyframe::PropertySpecificKeyframe& end, Element*) const =
0; | 67 virtual PassRefPtrWillBeRawPtr<Interpolation> maybeCreateInterpolation(C
SSPropertyID, blink::Keyframe::PropertySpecificKeyframe& end, Element*) const =
0; |
68 | 68 |
69 virtual void trace(Visitor*) { } | 69 DEFINE_INLINE_VIRTUAL_TRACE() { } |
70 | 70 |
71 protected: | 71 protected: |
72 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin
g, AnimationEffect::CompositeOperation); | 72 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin
g, AnimationEffect::CompositeOperation); |
73 | 73 |
74 double m_offset; | 74 double m_offset; |
75 RefPtr<TimingFunction> m_easing; | 75 RefPtr<TimingFunction> m_easing; |
76 AnimationEffect::CompositeOperation m_composite; | 76 AnimationEffect::CompositeOperation m_composite; |
77 }; | 77 }; |
78 | 78 |
79 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> createPropertySpeci
ficKeyframe(CSSPropertyID) const = 0; | 79 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> createPropertySpeci
ficKeyframe(CSSPropertyID) const = 0; |
(...skipping 13 matching lines...) Expand all Loading... |
93 } | 93 } |
94 | 94 |
95 double m_offset; | 95 double m_offset; |
96 AnimationEffect::CompositeOperation m_composite; | 96 AnimationEffect::CompositeOperation m_composite; |
97 RefPtr<TimingFunction> m_easing; | 97 RefPtr<TimingFunction> m_easing; |
98 }; | 98 }; |
99 | 99 |
100 } // namespace blink | 100 } // namespace blink |
101 | 101 |
102 #endif // Keyframe_h | 102 #endif // Keyframe_h |
OLD | NEW |