Index: Source/core/animation/AnimatableValue.h |
diff --git a/Source/core/animation/AnimatableValue.h b/Source/core/animation/AnimatableValue.h |
index 7a46e1fc23a745aa891e3ab21a3009561ffac505..1a954fbfb9a6add42d55162a31707c43cd4852ba 100644 |
--- a/Source/core/animation/AnimatableValue.h |
+++ b/Source/core/animation/AnimatableValue.h |
@@ -31,12 +31,13 @@ |
#ifndef AnimatableValue_h |
#define AnimatableValue_h |
+#include "core/animation/AnimationEffect.h" |
#include "core/css/CSSValue.h" |
#include "wtf/RefCounted.h" |
namespace WebCore { |
-class AnimatableValue : public RefCounted<AnimatableValue> { |
+class AnimatableValue : public AnimationEffect::CompositableValue { |
public: |
virtual ~AnimatableValue() { } |
@@ -59,6 +60,10 @@ public: |
return equals(&value); |
} |
+ virtual bool dependsOnUnderlyingValue() const OVERRIDE FINAL { return false; } |
+ virtual PassRefPtr<AnimatableValue> compositeOnto(const AnimatableValue*) const OVERRIDE FINAL { return takeConstRef(this); } |
+ virtual bool isAnimatableValue() const { return true; } |
+ |
bool isClipPathOperation() const { return type() == TypeClipPathOperation; } |
bool isColor() const { return type() == TypeColor; } |
bool isDouble() const { return type() == TypeDouble; } |
@@ -127,11 +132,15 @@ private: |
virtual AnimatableType type() const = 0; |
// 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; |
+ |
+ friend class KeyframeEffectModel; |
}; |
#define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \ |
DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, value.predicate) |
+DEFINE_TYPE_CASTS(AnimatableValue, AnimationEffect::CompositableValue, value, value->isAnimatableValue(), value.isAnimatableValue()); |
+ |
} // namespace WebCore |
#endif // AnimatableValue_h |