| 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 AnimatableValueKeyframe_h | 5 #ifndef AnimatableValueKeyframe_h |
| 6 #define AnimatableValueKeyframe_h | 6 #define AnimatableValueKeyframe_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/animation/Keyframe.h" | 9 #include "core/animation/Keyframe.h" |
| 10 #include "core/animation/animatable/AnimatableValue.h" | 10 #include "core/animation/animatable/AnimatableValue.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 void setPropertyValue(CSSPropertyID property, | 22 void setPropertyValue(CSSPropertyID property, |
| 23 PassRefPtr<AnimatableValue> value) { | 23 PassRefPtr<AnimatableValue> value) { |
| 24 m_propertyValues.set(property, std::move(value)); | 24 m_propertyValues.set(property, std::move(value)); |
| 25 } | 25 } |
| 26 void clearPropertyValue(CSSPropertyID property) { | 26 void clearPropertyValue(CSSPropertyID property) { |
| 27 m_propertyValues.erase(property); | 27 m_propertyValues.erase(property); |
| 28 } | 28 } |
| 29 AnimatableValue* propertyValue(CSSPropertyID property) const { | 29 AnimatableValue* propertyValue(CSSPropertyID property) const { |
| 30 DCHECK(m_propertyValues.contains(property)); | 30 DCHECK(m_propertyValues.contains(property)); |
| 31 return m_propertyValues.get(property); | 31 return m_propertyValues.at(property); |
| 32 } | 32 } |
| 33 PropertyHandleSet properties() const override; | 33 PropertyHandleSet properties() const override; |
| 34 | 34 |
| 35 class PropertySpecificKeyframe : public Keyframe::PropertySpecificKeyframe { | 35 class PropertySpecificKeyframe : public Keyframe::PropertySpecificKeyframe { |
| 36 public: | 36 public: |
| 37 static PassRefPtr<PropertySpecificKeyframe> create( | 37 static PassRefPtr<PropertySpecificKeyframe> create( |
| 38 double offset, | 38 double offset, |
| 39 PassRefPtr<TimingFunction> easing, | 39 PassRefPtr<TimingFunction> easing, |
| 40 PassRefPtr<AnimatableValue> value, | 40 PassRefPtr<AnimatableValue> value, |
| 41 EffectModel::CompositeOperation composite) { | 41 EffectModel::CompositeOperation composite) { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 value.isAnimatableValueKeyframe()); | 100 value.isAnimatableValueKeyframe()); |
| 101 DEFINE_TYPE_CASTS(AnimatableValuePropertySpecificKeyframe, | 101 DEFINE_TYPE_CASTS(AnimatableValuePropertySpecificKeyframe, |
| 102 Keyframe::PropertySpecificKeyframe, | 102 Keyframe::PropertySpecificKeyframe, |
| 103 value, | 103 value, |
| 104 value->isAnimatableValuePropertySpecificKeyframe(), | 104 value->isAnimatableValuePropertySpecificKeyframe(), |
| 105 value.isAnimatableValuePropertySpecificKeyframe()); | 105 value.isAnimatableValuePropertySpecificKeyframe()); |
| 106 | 106 |
| 107 } // namespace blink | 107 } // namespace blink |
| 108 | 108 |
| 109 #endif | 109 #endif |
| OLD | NEW |