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

Unified Diff: Source/core/animation/LengthStyleInterpolation.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/LengthStyleInterpolation.h
diff --git a/Source/core/animation/LengthStyleInterpolation.h b/Source/core/animation/LengthStyleInterpolation.h
index cd8ab4cd89f4b812b33acf9dcfe442d295e52387..35401806cf657de17e86260261382a417064a3dd 100644
--- a/Source/core/animation/LengthStyleInterpolation.h
+++ b/Source/core/animation/LengthStyleInterpolation.h
@@ -13,9 +13,12 @@ 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));
+ return adoptRefWillBeNoop(new LengthStyleInterpolation(toInterpolableValue(start), toInterpolableValue(end), id, range));
}
static bool canCreateFrom(const CSSValue&);
@@ -24,22 +27,16 @@ public:
virtual void trace(Visitor*) override;
+ static PassOwnPtrWillBeRawPtr<InterpolableValue> toInterpolableValue(const CSSValue&);
+ static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> fromInterpolableValue(const InterpolableValue&, InterpolationRange);
+
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;
};
}
« no previous file with comments | « Source/core/animation/LengthPoint3DStyleInterpolationTest.cpp ('k') | Source/core/animation/LengthStyleInterpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698