| 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/AnimationEffectReadOnly.h" | 9 #include "core/animation/AnimationEffectReadOnly.h" |
| 10 #include "core/animation/EffectModel.h" | 10 #include "core/animation/EffectModel.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 WTF_MAKE_NONCOPYABLE(PropertySpecificKeyframe); | 66 WTF_MAKE_NONCOPYABLE(PropertySpecificKeyframe); |
| 67 | 67 |
| 68 public: | 68 public: |
| 69 virtual ~PropertySpecificKeyframe() {} | 69 virtual ~PropertySpecificKeyframe() {} |
| 70 double offset() const { return m_offset; } | 70 double offset() const { return m_offset; } |
| 71 TimingFunction& easing() const { return *m_easing; } | 71 TimingFunction& easing() const { return *m_easing; } |
| 72 EffectModel::CompositeOperation composite() const { return m_composite; } | 72 EffectModel::CompositeOperation composite() const { return m_composite; } |
| 73 double underlyingFraction() const { | 73 double underlyingFraction() const { |
| 74 return m_composite == EffectModel::CompositeReplace ? 0 : 1; | 74 return m_composite == EffectModel::CompositeReplace ? 0 : 1; |
| 75 } | 75 } |
| 76 virtual bool isNeutral() const { | 76 virtual bool isNeutral() const = 0; |
| 77 NOTREACHED(); | |
| 78 return false; | |
| 79 } | |
| 80 virtual PassRefPtr<PropertySpecificKeyframe> cloneWithOffset( | 77 virtual PassRefPtr<PropertySpecificKeyframe> cloneWithOffset( |
| 81 double offset) const = 0; | 78 double offset) const = 0; |
| 82 | 79 |
| 83 // FIXME: Remove this once CompositorAnimations no longer depends on | 80 // FIXME: Remove this once CompositorAnimations no longer depends on |
| 84 // AnimatableValues | 81 // AnimatableValues |
| 85 virtual bool populateAnimatableValue( | 82 virtual bool populateAnimatableValue( |
| 86 CSSPropertyID, | 83 CSSPropertyID, |
| 87 Element&, | 84 Element&, |
| 88 const ComputedStyle& baseStyle, | 85 const ComputedStyle& baseStyle, |
| 89 const ComputedStyle* parentStyle) const { | 86 const ComputedStyle* parentStyle) const { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 double m_offset; | 127 double m_offset; |
| 131 EffectModel::CompositeOperation m_composite; | 128 EffectModel::CompositeOperation m_composite; |
| 132 RefPtr<TimingFunction> m_easing; | 129 RefPtr<TimingFunction> m_easing; |
| 133 }; | 130 }; |
| 134 | 131 |
| 135 using PropertySpecificKeyframe = Keyframe::PropertySpecificKeyframe; | 132 using PropertySpecificKeyframe = Keyframe::PropertySpecificKeyframe; |
| 136 | 133 |
| 137 } // namespace blink | 134 } // namespace blink |
| 138 | 135 |
| 139 #endif // Keyframe_h | 136 #endif // Keyframe_h |
| OLD | NEW |