| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 DECLARE_VIRTUAL_TRACE(); | 33 DECLARE_VIRTUAL_TRACE(); |
| 34 | 34 |
| 35 class PropertySpecificKeyframe : public Keyframe::PropertySpecificKeyframe { | 35 class PropertySpecificKeyframe : public Keyframe::PropertySpecificKeyframe { |
| 36 public: | 36 public: |
| 37 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin
g, CSSValue*, AnimationEffect::CompositeOperation); | 37 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin
g, CSSValue*, AnimationEffect::CompositeOperation); |
| 38 | 38 |
| 39 CSSValue* value() const { return m_value.get(); } | 39 CSSValue* value() const { return m_value.get(); } |
| 40 void setEasing(PassRefPtrWillBeRawPtr<TimingFunction> easing) { m_easing
= easing; } | 40 void setEasing(PassRefPtrWillBeRawPtr<TimingFunction> easing) { m_easing
= easing; } |
| 41 | 41 |
| 42 virtual void populateAnimatableValue(CSSPropertyID, Element&, const Layo
utStyle* baseStyle) const; | 42 virtual void populateAnimatableValue(CSSPropertyID, Element&, const Comp
utedStyle* baseStyle) const; |
| 43 virtual const PassRefPtrWillBeRawPtr<AnimatableValue> getAnimatableValue
() const override final { return m_animatableValueCache.get(); } | 43 virtual const PassRefPtrWillBeRawPtr<AnimatableValue> getAnimatableValue
() const override final { return m_animatableValueCache.get(); } |
| 44 void setAnimatableValue(PassRefPtrWillBeRawPtr<AnimatableValue> value) {
m_animatableValueCache = value; } | 44 void setAnimatableValue(PassRefPtrWillBeRawPtr<AnimatableValue> value) {
m_animatableValueCache = value; } |
| 45 | 45 |
| 46 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> neutr
alKeyframe(double offset, PassRefPtr<TimingFunction> easing) const override fina
l; | 46 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> neutr
alKeyframe(double offset, PassRefPtr<TimingFunction> easing) const override fina
l; |
| 47 virtual PassRefPtrWillBeRawPtr<Interpolation> maybeCreateInterpolation(C
SSPropertyID, blink::Keyframe::PropertySpecificKeyframe& end, Element*, const La
youtStyle* baseStyle) const override final; | 47 virtual PassRefPtrWillBeRawPtr<Interpolation> maybeCreateInterpolation(C
SSPropertyID, blink::Keyframe::PropertySpecificKeyframe& end, Element*, const Co
mputedStyle* baseStyle) const override final; |
| 48 | 48 |
| 49 DECLARE_VIRTUAL_TRACE(); | 49 DECLARE_VIRTUAL_TRACE(); |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin
g, CSSValue*); | 52 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin
g, CSSValue*); |
| 53 | 53 |
| 54 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> clone
WithOffset(double offset) const; | 54 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> clone
WithOffset(double offset) const; |
| 55 virtual bool isStringPropertySpecificKeyframe() const override { return
true; } | 55 virtual bool isStringPropertySpecificKeyframe() const override { return
true; } |
| 56 | 56 |
| 57 static bool createInterpolationsFromCSSValues(CSSPropertyID, CSSValue* f
romCSSValue, CSSValue* toCSSValue, Element*, OwnPtrWillBeRawPtr<WillBeHeapVector
<RefPtrWillBeMember<Interpolation>>>& interpolations); | 57 static bool createInterpolationsFromCSSValues(CSSPropertyID, CSSValue* f
romCSSValue, CSSValue* toCSSValue, Element*, OwnPtrWillBeRawPtr<WillBeHeapVector
<RefPtrWillBeMember<Interpolation>>>& interpolations); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 using StringPropertySpecificKeyframe = StringKeyframe::PropertySpecificKeyframe; | 80 using StringPropertySpecificKeyframe = StringKeyframe::PropertySpecificKeyframe; |
| 81 | 81 |
| 82 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va
lue.isStringKeyframe()); | 82 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va
lue.isStringKeyframe()); |
| 83 DEFINE_TYPE_CASTS(StringPropertySpecificKeyframe, Keyframe::PropertySpecificKeyf
rame, value, value->isStringPropertySpecificKeyframe(), value.isStringPropertySp
ecificKeyframe()); | 83 DEFINE_TYPE_CASTS(StringPropertySpecificKeyframe, Keyframe::PropertySpecificKeyf
rame, value, value->isStringPropertySpecificKeyframe(), value.isStringPropertySp
ecificKeyframe()); |
| 84 | 84 |
| 85 } | 85 } |
| 86 | 86 |
| 87 #endif | 87 #endif |
| OLD | NEW |