| 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 Interpolation_h | 5 #ifndef Interpolation_h |
| 6 #define Interpolation_h | 6 #define Interpolation_h |
| 7 | 7 |
| 8 #include "CSSPropertyNames.h" | 8 #include "CSSPropertyNames.h" |
| 9 #include "core/animation/InterpolableValue.h" | 9 #include "core/animation/InterpolableValue.h" |
| 10 #include "heap/Handle.h" | 10 #include "heap/Handle.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 class LegacyStyleInterpolation : public StyleInterpolation { | 75 class LegacyStyleInterpolation : public StyleInterpolation { |
| 76 public: | 76 public: |
| 77 static PassRefPtrWillBeRawPtr<LegacyStyleInterpolation> create(PassRefPtrWil
lBeRawPtr<AnimatableValue> start, PassRefPtrWillBeRawPtr<AnimatableValue> end, C
SSPropertyID id) | 77 static PassRefPtrWillBeRawPtr<LegacyStyleInterpolation> create(PassRefPtrWil
lBeRawPtr<AnimatableValue> start, PassRefPtrWillBeRawPtr<AnimatableValue> end, C
SSPropertyID id) |
| 78 { | 78 { |
| 79 return adoptRefWillBeNoop(new LegacyStyleInterpolation(InterpolableAnima
tableValue::create(start), InterpolableAnimatableValue::create(end), id)); | 79 return adoptRefWillBeNoop(new LegacyStyleInterpolation(InterpolableAnima
tableValue::create(start), InterpolableAnimatableValue::create(end), id)); |
| 80 } | 80 } |
| 81 | 81 |
| 82 virtual void apply(StyleResolverState&) const; | 82 virtual void apply(StyleResolverState&) const; |
| 83 | 83 |
| 84 virtual bool isLegacyStyleInterpolation() const OVERRIDE FINAL { return true
; } | 84 virtual bool isLegacyStyleInterpolation() const OVERRIDE FINAL { return true
; } |
| 85 PassRefPtr<AnimatableValue> currentValue() const | 85 PassRefPtrWillBeRawPtr<AnimatableValue> currentValue() const |
| 86 { | 86 { |
| 87 InterpolableAnimatableValue* value = static_cast<InterpolableAnimatableV
alue*>(m_cachedValue.get()); | 87 InterpolableAnimatableValue* value = static_cast<InterpolableAnimatableV
alue*>(m_cachedValue.get()); |
| 88 return value->value(); | 88 return value->value(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 virtual void trace(Visitor*) OVERRIDE; | 91 virtual void trace(Visitor*) OVERRIDE; |
| 92 | 92 |
| 93 private: | 93 private: |
| 94 LegacyStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pa
ssOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id) | 94 LegacyStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pa
ssOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id) |
| 95 : StyleInterpolation(start, end, id) | 95 : StyleInterpolation(start, end, id) |
| 96 { | 96 { |
| 97 } | 97 } |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 DEFINE_TYPE_CASTS(StyleInterpolation, Interpolation, value, value->isStyleInterp
olation(), value.isStyleInterpolation()); | 100 DEFINE_TYPE_CASTS(StyleInterpolation, Interpolation, value, value->isStyleInterp
olation(), value.isStyleInterpolation()); |
| 101 DEFINE_TYPE_CASTS(LegacyStyleInterpolation, Interpolation, value, value->isLegac
yStyleInterpolation(), value.isLegacyStyleInterpolation()); | 101 DEFINE_TYPE_CASTS(LegacyStyleInterpolation, Interpolation, value, value->isLegac
yStyleInterpolation(), value.isLegacyStyleInterpolation()); |
| 102 | 102 |
| 103 } | 103 } |
| 104 #endif | 104 #endif |
| OLD | NEW |