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

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

Issue 196573030: Web Animations API: Load resources referenced in element.animate() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed asserts. Created 6 years, 9 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
Index: Source/core/animation/AnimatableImage.h
diff --git a/Source/core/animation/AnimatableImage.h b/Source/core/animation/AnimatableImage.h
index 1c88d4c736948be5f05e7268b11a7797af73a202..f8b1f5cee3c85b6fb582b27aabc84b2d20344dbc 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(PassRefPtr<CSSValue> value)
{
- return adoptRef(new AnimatableImage(image));
+ return adoptRef(new AnimatableImage(value));
}
- 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,16 @@ protected:
virtual bool usesDefaultInterpolationWith(const AnimatableValue*) const OVERRIDE;
private:
- AnimatableImage(StyleImage* image)
- : m_image(image)
+ AnimatableImage(PassRefPtr<CSSValue> value)
+ : m_value(value)
{
- ASSERT(m_image);
+ ASSERT(m_value);
+ ASSERT(m_value->isImageValue() || m_value->isImageSetValue() || m_value->isGradientValue() || m_value->isCrossfadeValue() || m_value->isCursorImageValue());
}
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());

Powered by Google App Engine
This is Rietveld 408576698