#define SVGImage_h
#include "platform/graphics/Image.h"
+#include "platform/heap/Handle.h"
+#include "platform/weborigin/KURL.h"
-namespace WebCore {
+namespace blink {
-class Element;
class FrameView;
-class ImageBuffer;
class Page;
class RenderBox;
class SVGImageChromeClient;
return adoptRef(new SVGImage(observer));
}
- static bool isInSVGImage(const Element*);
+ static bool isInSVGImage(const Node*);
RenderBox* embeddedContentBox() const;
virtual bool isSVGImage() const OVERRIDE { return true; }
virtual IntSize size() const OVERRIDE { return m_intrinsicSize; }
+ void setURL(const KURL& url) { m_url = url; }
virtual bool currentFrameHasSingleSecurityOrigin() const OVERRIDE;
- virtual bool hasRelativeWidth() const OVERRIDE;
- virtual bool hasRelativeHeight() const OVERRIDE;
-
- virtual void startAnimation(bool /*catchUpIfNecessary*/ = true) OVERRIDE;
+ virtual void startAnimation(CatchUpAnimation = CatchUp) OVERRIDE;
virtual void stopAnimation() OVERRIDE;
virtual void resetAnimation() OVERRIDE;
virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() OVERRIDE;
+ // Returns the SVG image document's frame.
+ FrameView* frameView() const;
+
+ // Does the SVG image/document contain any animations?
+ bool hasAnimations() const;
+
private:
friend class AXRenderObject;
friend class SVGImageChromeClient;
virtual ~SVGImage();
- // Returns the SVG image document's frame.
- FrameView* frameView() const;
virtual String filenameExtension() const OVERRIDE;
CompositeOperator, const FloatRect&, blink::WebBlendMode, const IntSize& repeatSpacing);
OwnPtr<SVGImageChromeClient> m_chromeClient;
- OwnPtr<Page> m_page;
+ OwnPtrWillBePersistent<Page> m_page;
IntSize m_intrinsicSize;
+ KURL m_url;
};
DEFINE_IMAGE_TYPE_CASTS(SVGImage);