Chromium Code Reviews| Index: Source/core/animation/ShadowStyleInterpolation.h |
| diff --git a/Source/core/animation/ShadowStyleInterpolation.h b/Source/core/animation/ShadowStyleInterpolation.h |
| index 7bd2967f77767dd0b303643316c03416429f70c7..10819341dc2944800c52afb981a2cb79b188d18b 100644 |
| --- a/Source/core/animation/ShadowStyleInterpolation.h |
| +++ b/Source/core/animation/ShadowStyleInterpolation.h |
| @@ -14,26 +14,34 @@ namespace blink { |
| class ShadowStyleInterpolation : public StyleInterpolation { |
| public: |
| - static PassRefPtrWillBeRawPtr<ShadowStyleInterpolation> create(const CSSValue& start, const CSSValue& end, CSSPropertyID id, bool styleFlag) |
| - { |
| - return adoptRefWillBeNoop(new ShadowStyleInterpolation(shadowToInterpolableValue(start), shadowToInterpolableValue(end), id, styleFlag)); |
| - } |
| + typedef bool NonInterpolableType; |
| + |
| + static bool canCreateFrom(const CSSValue& start, const CSSValue& end); |
| - static bool canCreateFrom(const CSSValue&); |
| + static bool usesDefaultStyleInterpolation(const CSSValue& start, const CSSValue& end); |
| - virtual void apply(StyleResolverState&) const override; |
| - virtual void trace(Visitor*); |
| + static PassOwnPtrWillBeRawPtr<InterpolableValue> toInterpolableValue(const CSSValue&, NonInterpolableType&); |
| + static PassRefPtrWillBeRawPtr<CSSValue> fromInterpolableValue(const InterpolableValue&, NonInterpolableType, InterpolationRange = RangeAll); |
| - static PassRefPtrWillBeRawPtr<ShadowStyleInterpolation> maybeCreateFromShadow(const CSSValue& start, const CSSValue& end, CSSPropertyID); |
| private: |
| - ShadowStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id, bool styleFlag) |
| - : StyleInterpolation(start, end, id), m_styleFlag(styleFlag) |
| - { } |
| + ShadowStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id) |
| + : StyleInterpolation(start, end, id) |
| + { |
| + } |
| - bool m_styleFlag; |
| + friend class AnimationShadowStyleInterpolationTest; |
| + |
| + static PassOwnPtrWillBeRawPtr<InterpolableValue> shadowToInterpolableValue(const CSSValue& value, NonInterpolableType& type) |
| + { |
| + return toInterpolableValue(value, type); |
| + } |
| + static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToShadow(const InterpolableValue& value, NonInterpolableType type, InterpolationRange range = RangeAll) |
| + { |
| + return fromInterpolableValue(value, type, range); |
| + } |
| - static PassOwnPtrWillBeRawPtr<InterpolableValue> shadowToInterpolableValue(const CSSValue&); |
| - static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToShadow(InterpolableValue*, bool styleFlag); |
| + static PassOwnPtrWillBeRawPtr<InterpolableValue> lengthToInterpolableValue(PassRefPtrWillBeRawPtr<CSSPrimitiveValue>); |
| + static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> interpolableValueToLength(const InterpolableValue*, InterpolationRange = RangeAll); |
|
dstockwell
2015/02/02 06:10:12
I think the interpolable value can be a reference
evemj (not active)
2015/02/03 00:25:56
Done.
|
| friend class AnimationShadowStyleInterpolationTest; |
| }; |