Chromium Code Reviews| Index: Source/core/animation/LengthStyleInterpolation.h |
| diff --git a/Source/core/animation/LengthStyleInterpolation.h b/Source/core/animation/LengthStyleInterpolation.h |
| index cd8ab4cd89f4b812b33acf9dcfe442d295e52387..0b5ad23a2bfe9190ac0a34a89e37f46ca6d094a1 100644 |
| --- a/Source/core/animation/LengthStyleInterpolation.h |
| +++ b/Source/core/animation/LengthStyleInterpolation.h |
| @@ -13,6 +13,9 @@ namespace blink { |
| class LengthStyleInterpolation : public StyleInterpolation { |
| public: |
| + |
| + typedef void NonInterpolableType; |
| + |
| static PassRefPtrWillBeRawPtr<LengthStyleInterpolation> create(const CSSValue& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range) |
| { |
| return adoptRefWillBeNoop(new LengthStyleInterpolation(lengthToInterpolableValue(start), lengthToInterpolableValue(end), id, range)); |
| @@ -24,22 +27,26 @@ public: |
| virtual void trace(Visitor*) override; |
| + static PassOwnPtrWillBeRawPtr<InterpolableValue> toInterpolableValue(const CSSValue&); |
| + static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> fromInterpolableValue(const InterpolableValue&, InterpolationRange); |
| + |
| + static PassOwnPtrWillBeRawPtr<InterpolableValue> lengthToInterpolableValue(const CSSValue& value) |
| + { |
| + return toInterpolableValue(value); |
| + } |
| + |
| + static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> interpolableValueToLength(const InterpolableValue& value, InterpolationRange range) |
| + { |
| + return fromInterpolableValue(value, range); |
| + } |
| + |
|
samli
2015/01/23 03:23:36
Don't think there is any value to having lengthToI
evemj (not active)
2015/01/28 00:41:13
Done.
|
| private: |
| LengthStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id, InterpolationRange range) |
| : StyleInterpolation(start, end, id) |
| , m_range(range) |
| { } |
| - static PassOwnPtrWillBeRawPtr<InterpolableValue> lengthToInterpolableValue(const CSSValue&); |
| - static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> interpolableValueToLength(const InterpolableValue*, InterpolationRange); |
| - |
| InterpolationRange m_range; |
| - |
| - friend class AnimationLengthStyleInterpolationTest; |
| - friend class LengthBoxStyleInterpolation; |
| - friend class ShadowStyleInterpolation; |
| - friend class LengthPairStyleInterpolation; |
| - friend class LengthPoint3DStyleInterpolation; |
| }; |
| } |