#ifndef SVGImageElement_h
#define SVGImageElement_h
#include "SVGNames.h"
#include "core/svg/SVGAnimatedBoolean.h"
#include "core/svg/SVGAnimatedLength.h"
#include "core/svg/SVGAnimatedPreserveAspectRatio.h"
#include "core/svg/SVGGraphicsElement.h"
#include "core/svg/SVGImageLoader.h"
#include "core/svg/SVGURIReference.h"
namespace WebCore {
class SVGImageElement FINAL : public SVGGraphicsElement,
public SVGURIReference {
public:
static PassRefPtr<SVGImageElement> create(Document&);
bool currentFrameHasSingleSecurityOrigin() const;
SVGAnimatedLength* x() const { return m_x.get(); }
SVGAnimatedLength* y() const { return m_y.get(); }
SVGAnimatedLength* width() const { return m_width.get(); }
SVGAnimatedLength* height() const { return m_height.get(); }
SVGAnimatedPreserveAspectRatio* preserveAspectRatio() { return m_preserveAspectRatio.get(); }
private:
explicit SVGImageElement(Document&);
virtual bool isStructurallyExternal() const OVERRIDE { return !hrefString().isNull(); }
virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(); }
bool isSupportedAttribute(const QualifiedName&);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
virtual const AtomicString imageSourceURL() const OVERRIDE;
virtual bool haveLoadedRequiredResources() OVERRIDE;
virtual bool selfHasRelativeLengths() const OVERRIDE;
virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE;
RefPtr<SVGAnimatedLength> m_x;
RefPtr<SVGAnimatedLength> m_y;
RefPtr<SVGAnimatedLength> m_width;
RefPtr<SVGAnimatedLength> m_height;
RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio;
SVGImageLoader m_imageLoader;
bool m_needsLoaderURIUpdate : 1;
};
}
#endif