Index: Source/core/animation/AnimatableImage.h |
diff --git a/Source/core/animation/AnimatableImage.h b/Source/core/animation/AnimatableImage.h |
index 1c88d4c736948be5f05e7268b11a7797af73a202..eaf39d6c2521b2fb8faa9207019e60de58efe104 100644 |
--- a/Source/core/animation/AnimatableImage.h |
+++ b/Source/core/animation/AnimatableImage.h |
@@ -40,12 +40,11 @@ namespace WebCore { |
class AnimatableImage FINAL : public AnimatableValue { |
public: |
virtual ~AnimatableImage() { } |
- static PassRefPtr<AnimatableImage> create(StyleImage* image) |
+ static PassRefPtr<AnimatableImage> create(const StyleImage& image) |
{ |
- return adoptRef(new AnimatableImage(image)); |
+ return create(image.cssValue()); |
} |
- PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const { return m_image->cssValue(); } |
- StyleImage* toStyleImage() const { return m_image.get(); } |
+ CSSValue* toCSSValue() const { return m_value.get(); } |
protected: |
virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE; |
@@ -53,15 +52,18 @@ protected: |
virtual bool usesDefaultInterpolationWith(const AnimatableValue*) const OVERRIDE; |
private: |
- AnimatableImage(StyleImage* image) |
- : m_image(image) |
+ static PassRefPtr<AnimatableImage> create(PassRefPtr<CSSValue> value) |
+ { |
+ return adoptRef(new AnimatableImage(value)); |
+ } |
+ AnimatableImage(PassRefPtr<CSSValue> value) |
+ : m_value(value) |
{ |
- ASSERT(m_image); |
} |
virtual AnimatableType type() const OVERRIDE { return TypeImage; } |
virtual bool equalTo(const AnimatableValue*) const OVERRIDE; |
- const RefPtr<StyleImage> m_image; |
+ const RefPtr<CSSValue> m_value; |
}; |
DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableImage, isImage()); |