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 StringKeyframe_h | 5 #ifndef StringKeyframe_h |
6 #define StringKeyframe_h | 6 #define StringKeyframe_h |
7 | 7 |
8 #include "core/animation/Keyframe.h" | 8 #include "core/animation/Keyframe.h" |
9 #include "core/css/StylePropertySet.h" | 9 #include "core/css/StylePropertySet.h" |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 class CSSPropertySpecificKeyframe : public Keyframe::PropertySpecificKeyfram
e { | 42 class CSSPropertySpecificKeyframe : public Keyframe::PropertySpecificKeyfram
e { |
43 public: | 43 public: |
44 CSSPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> ea
sing, CSSValue*, EffectModel::CompositeOperation); | 44 CSSPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> ea
sing, CSSValue*, EffectModel::CompositeOperation); |
45 | 45 |
46 CSSValue* value() const { return m_value.get(); } | 46 CSSValue* value() const { return m_value.get(); } |
47 | 47 |
48 virtual void populateAnimatableValue(CSSPropertyID, Element&, const Comp
utedStyle* baseStyle) const; | 48 virtual void populateAnimatableValue(CSSPropertyID, Element&, const Comp
utedStyle* baseStyle) const; |
49 const PassRefPtrWillBeRawPtr<AnimatableValue> getAnimatableValue() const
final { return m_animatableValueCache.get(); } | 49 const PassRefPtrWillBeRawPtr<AnimatableValue> getAnimatableValue() const
final { return m_animatableValueCache.get(); } |
50 void setAnimatableValue(PassRefPtrWillBeRawPtr<AnimatableValue> value) {
m_animatableValueCache = value; } | 50 void setAnimatableValue(PassRefPtrWillBeRawPtr<AnimatableValue> value) {
m_animatableValueCache = value; } |
51 | 51 |
| 52 bool isNeutral() const final { return !m_value; } |
52 PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> neutralKeyfra
me(double offset, PassRefPtr<TimingFunction> easing) const final; | 53 PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> neutralKeyfra
me(double offset, PassRefPtr<TimingFunction> easing) const final; |
53 PassRefPtrWillBeRawPtr<Interpolation> maybeCreateInterpolation(PropertyH
andle, Keyframe::PropertySpecificKeyframe& end, Element*, const ComputedStyle* b
aseStyle) const final; | 54 PassRefPtrWillBeRawPtr<Interpolation> maybeCreateInterpolation(PropertyH
andle, Keyframe::PropertySpecificKeyframe& end, Element*, const ComputedStyle* b
aseStyle) const final; |
54 | 55 |
55 DECLARE_VIRTUAL_TRACE(); | 56 DECLARE_VIRTUAL_TRACE(); |
56 | 57 |
57 private: | 58 private: |
58 CSSPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> ea
sing, CSSValue*); | 59 CSSPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> ea
sing, CSSValue*); |
59 | 60 |
60 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> clone
WithOffset(double offset) const; | 61 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> clone
WithOffset(double offset) const; |
61 bool isCSSPropertySpecificKeyframe() const override { return true; } | 62 bool isCSSPropertySpecificKeyframe() const override { return true; } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 using CSSPropertySpecificKeyframe = StringKeyframe::CSSPropertySpecificKeyframe; | 111 using CSSPropertySpecificKeyframe = StringKeyframe::CSSPropertySpecificKeyframe; |
111 using SVGPropertySpecificKeyframe = StringKeyframe::SVGPropertySpecificKeyframe; | 112 using SVGPropertySpecificKeyframe = StringKeyframe::SVGPropertySpecificKeyframe; |
112 | 113 |
113 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va
lue.isStringKeyframe()); | 114 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va
lue.isStringKeyframe()); |
114 DEFINE_TYPE_CASTS(CSSPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram
e, value, value->isCSSPropertySpecificKeyframe(), value.isCSSPropertySpecificKey
frame()); | 115 DEFINE_TYPE_CASTS(CSSPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram
e, value, value->isCSSPropertySpecificKeyframe(), value.isCSSPropertySpecificKey
frame()); |
115 DEFINE_TYPE_CASTS(SVGPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram
e, value, value->isSVGPropertySpecificKeyframe(), value.isSVGPropertySpecificKey
frame()); | 116 DEFINE_TYPE_CASTS(SVGPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram
e, value, value->isSVGPropertySpecificKeyframe(), value.isSVGPropertySpecificKey
frame()); |
116 | 117 |
117 } | 118 } |
118 | 119 |
119 #endif | 120 #endif |
OLD | NEW |