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/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/animation/AnimationEffect.h" | 9 #include "core/animation/AnimationEffect.h" |
10 #include "core/animation/EffectModel.h" | 10 #include "core/animation/EffectModel.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 virtual bool isStringKeyframe() const { return false; } | 51 virtual bool isStringKeyframe() const { return false; } |
52 | 52 |
53 DEFINE_INLINE_VIRTUAL_TRACE() { } | 53 DEFINE_INLINE_VIRTUAL_TRACE() { } |
54 | 54 |
55 class PropertySpecificKeyframe : public NoBaseWillBeGarbageCollectedFinalize
d<PropertySpecificKeyframe> { | 55 class PropertySpecificKeyframe : public NoBaseWillBeGarbageCollectedFinalize
d<PropertySpecificKeyframe> { |
56 public: | 56 public: |
57 virtual ~PropertySpecificKeyframe() { } | 57 virtual ~PropertySpecificKeyframe() { } |
58 double offset() const { return m_offset; } | 58 double offset() const { return m_offset; } |
59 TimingFunction& easing() const { return *m_easing; } | 59 TimingFunction& easing() const { return *m_easing; } |
60 EffectModel::CompositeOperation composite() const { return m_composite;
} | 60 EffectModel::CompositeOperation composite() const { return m_composite;
} |
| 61 double underlyingFraction() const { return m_composite == EffectModel::C
ompositeReplace ? 0 : 1; } |
| 62 virtual bool isNeutral() const { ASSERT_NOT_REACHED(); return false; } |
61 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> cloneWithOffset
(double offset) const = 0; | 63 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> cloneWithOffset
(double offset) const = 0; |
62 | 64 |
63 // FIXME: Remove this once CompositorAnimations no longer depends on Ani
matableValues | 65 // FIXME: Remove this once CompositorAnimations no longer depends on Ani
matableValues |
64 virtual void populateAnimatableValue(CSSPropertyID, Element&, const Comp
utedStyle* baseStyle) const { } | 66 virtual void populateAnimatableValue(CSSPropertyID, Element&, const Comp
utedStyle* baseStyle) const { } |
65 virtual const PassRefPtrWillBeRawPtr<AnimatableValue> getAnimatableValue
() const = 0; | 67 virtual const PassRefPtrWillBeRawPtr<AnimatableValue> getAnimatableValue
() const = 0; |
66 | 68 |
67 virtual bool isAnimatableValuePropertySpecificKeyframe() const { return
false; } | 69 virtual bool isAnimatableValuePropertySpecificKeyframe() const { return
false; } |
68 virtual bool isCSSPropertySpecificKeyframe() const { return false; } | 70 virtual bool isCSSPropertySpecificKeyframe() const { return false; } |
69 virtual bool isSVGPropertySpecificKeyframe() const { return false; } | 71 virtual bool isSVGPropertySpecificKeyframe() const { return false; } |
70 | 72 |
(...skipping 27 matching lines...) Expand all Loading... |
98 } | 100 } |
99 | 101 |
100 double m_offset; | 102 double m_offset; |
101 EffectModel::CompositeOperation m_composite; | 103 EffectModel::CompositeOperation m_composite; |
102 RefPtr<TimingFunction> m_easing; | 104 RefPtr<TimingFunction> m_easing; |
103 }; | 105 }; |
104 | 106 |
105 } // namespace blink | 107 } // namespace blink |
106 | 108 |
107 #endif // Keyframe_h | 109 #endif // Keyframe_h |
OLD | NEW |