Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: Source/core/animation/ShadowStyleInterpolation.h

Issue 851633002: Animation: Add template for ListStyleInterpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add else to shadowToInterpolableValue Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/animation/ShadowStyleInterpolation.h
diff --git a/Source/core/animation/ShadowStyleInterpolation.h b/Source/core/animation/ShadowStyleInterpolation.h
index 7bd2967f77767dd0b303643316c03416429f70c7..6b44e59b99d261fa2df4aba815e3dab16187ae4d 100644
--- a/Source/core/animation/ShadowStyleInterpolation.h
+++ b/Source/core/animation/ShadowStyleInterpolation.h
@@ -14,26 +14,33 @@ 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>);
friend class AnimationShadowStyleInterpolationTest;
};
« no previous file with comments | « Source/core/animation/ListStyleInterpolationTest.cpp ('k') | Source/core/animation/ShadowStyleInterpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698