Index: Source/core/animation/AnimatableValue.cpp |
diff --git a/Source/core/animation/AnimatableValue.cpp b/Source/core/animation/AnimatableValue.cpp |
index 1c9d1751ca0e3f590d09d652469a178946219624..a8b9557f2dc6868209555e7efac2bc85482af7f9 100644 |
--- a/Source/core/animation/AnimatableValue.cpp |
+++ b/Source/core/animation/AnimatableValue.cpp |
@@ -34,6 +34,12 @@ |
#include "wtf/StdLibExtras.h" |
#include <algorithm> |
+namespace { |
+ |
+const double defaultDistance = 1; |
+ |
+} // namespace |
+ |
namespace WebCore { |
const AnimatableValue* AnimatableValue::neutralValue() |
@@ -76,4 +82,20 @@ PassRefPtr<AnimatableValue> AnimatableValue::addWith(const AnimatableValue* valu |
return defaultAddWith(this, value); |
} |
+double AnimatableValue::distance(const AnimatableValue* left, const AnimatableValue* right) |
+{ |
+ ASSERT(left); |
+ ASSERT(right); |
+ |
+ if (left->isSameType(right)) |
+ return left->distanceTo(right); |
+ |
+ return defaultDistance; |
+} |
+ |
+double AnimatableValue::distanceTo(const AnimatableValue*) const |
+{ |
+ return defaultDistance; |
+} |
+ |
} // namespace WebCore |