Chromium Code Reviews| Index: Source/core/animation/AnimatableValue.cpp |
| diff --git a/Source/core/animation/AnimatableValue.cpp b/Source/core/animation/AnimatableValue.cpp |
| index 1c9d1751ca0e3f590d09d652469a178946219624..ff5b56657d2c8c4269d386843f0bf7a4d91e0010 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() |
| @@ -71,9 +77,26 @@ PassRefPtr<AnimatableValue> AnimatableValue::add(const AnimatableValue* left, co |
| return defaultAddWith(left, right); |
| } |
| + |
|
dstockwell
2014/03/05 03:16:57
extra line added
Eric Willigers
2014/03/05 03:54:49
Done.
|
| PassRefPtr<AnimatableValue> AnimatableValue::addWith(const AnimatableValue* value) const |
| { |
| 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 |