Chromium Code Reviews| Index: Source/core/animation/Interpolation.h |
| diff --git a/Source/core/animation/Interpolation.h b/Source/core/animation/Interpolation.h |
| index e565da02192101eeae4bd8b366533dd1b98c70d1..2870340bdc19f27b32b6fc0935c032edc9fa9bc6 100644 |
| --- a/Source/core/animation/Interpolation.h |
| +++ b/Source/core/animation/Interpolation.h |
| @@ -45,7 +45,6 @@ private: |
| friend class AnimationInterpolableValueTest; |
| friend class AnimationInterpolationEffectTest; |
| - |
| }; |
| class StyleInterpolation : public Interpolation { |
| @@ -59,6 +58,18 @@ public: |
| virtual void apply(StyleResolverState&) const = 0; |
| virtual bool isStyleInterpolation() const OVERRIDE FINAL { return true; } |
| + // FIXME: This method exists for two reasons: |
| + // * tests use it to extract values without applying them |
| + // * interrupted compositor transitions use it to generate a new set of |
| + // keyframes representing the retargeted transition. |
| + // Once KeyframeEffectModel objects can be generated from |
| + // InterpolationEffect objects, we can use this approach in both cases, |
| + // and remove this method. |
| + virtual PassRefPtr<AnimatableValue> currentValue() const |
| + { |
| + ASSERT_NOT_REACHED(); |
| + return nullptr; |
| + } |
|
alancutter (OOO until 2018)
2014/04/01 03:12:48
Adding currentValue() to StyleInterpolation is lik
shans
2014/04/01 04:01:27
Done.
|
| CSSPropertyID id() const { return m_id; } |
| @@ -84,7 +95,7 @@ public: |
| virtual void apply(StyleResolverState&) const; |
| virtual bool isLegacyStyleInterpolation() const OVERRIDE FINAL { return true; } |
| - AnimatableValue* currentValue() const |
| + PassRefPtr<AnimatableValue> currentValue() const |
| { |
| InterpolableAnimatableValue* value = static_cast<InterpolableAnimatableValue*>(m_cachedValue.get()); |
| return value->value(); |