| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 virtual bool isAnimatableValuePropertySpecificKeyframe() const { | 91 virtual bool isAnimatableValuePropertySpecificKeyframe() const { |
| 92 return false; | 92 return false; |
| 93 } | 93 } |
| 94 virtual bool isCSSPropertySpecificKeyframe() const { return false; } | 94 virtual bool isCSSPropertySpecificKeyframe() const { return false; } |
| 95 virtual bool isSVGPropertySpecificKeyframe() const { return false; } | 95 virtual bool isSVGPropertySpecificKeyframe() const { return false; } |
| 96 | 96 |
| 97 virtual PassRefPtr<PropertySpecificKeyframe> neutralKeyframe( | 97 virtual PassRefPtr<PropertySpecificKeyframe> neutralKeyframe( |
| 98 double offset, | 98 double offset, |
| 99 PassRefPtr<TimingFunction> easing) const = 0; | 99 PassRefPtr<TimingFunction> easing) const = 0; |
| 100 virtual PassRefPtr<Interpolation> createInterpolation( | 100 virtual PassRefPtr<Interpolation> createInterpolation( |
| 101 PropertyHandle, | 101 const PropertyHandle&, |
| 102 const Keyframe::PropertySpecificKeyframe& end) const; | 102 const Keyframe::PropertySpecificKeyframe& end) const; |
| 103 | 103 |
| 104 protected: | 104 protected: |
| 105 PropertySpecificKeyframe(double offset, | 105 PropertySpecificKeyframe(double offset, |
| 106 PassRefPtr<TimingFunction> easing, | 106 PassRefPtr<TimingFunction> easing, |
| 107 EffectModel::CompositeOperation); | 107 EffectModel::CompositeOperation); |
| 108 | 108 |
| 109 double m_offset; | 109 double m_offset; |
| 110 RefPtr<TimingFunction> m_easing; | 110 RefPtr<TimingFunction> m_easing; |
| 111 EffectModel::CompositeOperation m_composite; | 111 EffectModel::CompositeOperation m_composite; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 virtual PassRefPtr<PropertySpecificKeyframe> createPropertySpecificKeyframe( | 114 virtual PassRefPtr<PropertySpecificKeyframe> createPropertySpecificKeyframe( |
| 115 PropertyHandle) const = 0; | 115 const PropertyHandle&) const = 0; |
| 116 | 116 |
| 117 protected: | 117 protected: |
| 118 Keyframe() | 118 Keyframe() |
| 119 : m_offset(nullValue()), | 119 : m_offset(nullValue()), |
| 120 m_composite(EffectModel::CompositeReplace), | 120 m_composite(EffectModel::CompositeReplace), |
| 121 m_easing(LinearTimingFunction::shared()) {} | 121 m_easing(LinearTimingFunction::shared()) {} |
| 122 Keyframe(double offset, | 122 Keyframe(double offset, |
| 123 EffectModel::CompositeOperation composite, | 123 EffectModel::CompositeOperation composite, |
| 124 PassRefPtr<TimingFunction> easing) | 124 PassRefPtr<TimingFunction> easing) |
| 125 : m_offset(offset), m_composite(composite), m_easing(easing) {} | 125 : m_offset(offset), m_composite(composite), m_easing(easing) {} |
| 126 | 126 |
| 127 double m_offset; | 127 double m_offset; |
| 128 EffectModel::CompositeOperation m_composite; | 128 EffectModel::CompositeOperation m_composite; |
| 129 RefPtr<TimingFunction> m_easing; | 129 RefPtr<TimingFunction> m_easing; |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 using PropertySpecificKeyframe = Keyframe::PropertySpecificKeyframe; | 132 using PropertySpecificKeyframe = Keyframe::PropertySpecificKeyframe; |
| 133 | 133 |
| 134 } // namespace blink | 134 } // namespace blink |
| 135 | 135 |
| 136 #endif // Keyframe_h | 136 #endif // Keyframe_h |
| OLD | NEW |