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

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

Issue 186463002: Web Animations: define distance for AnimatableColor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove blank line Created 6 years, 10 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
« no previous file with comments | « Source/core/animation/AnimatableDoubleTest.cpp ('k') | Source/core/animation/AnimatableValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimatableValue.h
diff --git a/Source/core/animation/AnimatableValue.h b/Source/core/animation/AnimatableValue.h
index 3771fb4354dba85e61731320be796f5fff54a9d1..de043f52914d008fa49735beb49afe5c769ffdbd 100644
--- a/Source/core/animation/AnimatableValue.h
+++ b/Source/core/animation/AnimatableValue.h
@@ -46,6 +46,7 @@ public:
static PassRefPtr<AnimatableValue> interpolate(const AnimatableValue*, const AnimatableValue*, double fraction);
// For noncommutative values read add(A, B) to mean the value A with B composed onto it.
static PassRefPtr<AnimatableValue> add(const AnimatableValue*, const AnimatableValue*);
+ static double distance(const AnimatableValue* from, const AnimatableValue* to);
static bool usesDefaultInterpolation(const AnimatableValue* from, const AnimatableValue* to)
{
return !from->isSameType(to) || from->usesDefaultInterpolationWith(to);
@@ -132,6 +133,8 @@ private:
// Implementations can assume that the object being compared has the same type as the object this is called on
virtual bool equalTo(const AnimatableValue*) const = 0;
+ virtual double distanceTo(const AnimatableValue*) const;
+
friend class KeyframeEffectModel;
};
« no previous file with comments | « Source/core/animation/AnimatableDoubleTest.cpp ('k') | Source/core/animation/AnimatableValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698