summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGImageElement.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/SVGImageElement.h')
-rw-r--r--Source/WebCore/svg/SVGImageElement.h44
1 files changed, 18 insertions, 26 deletions
diff --git a/Source/WebCore/svg/SVGImageElement.h b/Source/WebCore/svg/SVGImageElement.h
index a89ac5641..683db4a89 100644
--- a/Source/WebCore/svg/SVGImageElement.h
+++ b/Source/WebCore/svg/SVGImageElement.h
@@ -18,10 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef SVGImageElement_h
-#define SVGImageElement_h
+#pragma once
-#if ENABLE(SVG)
#include "SVGAnimatedBoolean.h"
#include "SVGAnimatedLength.h"
#include "SVGAnimatedPreserveAspectRatio.h"
@@ -36,32 +34,31 @@ class SVGImageElement final : public SVGGraphicsElement,
public SVGExternalResourcesRequired,
public SVGURIReference {
public:
- static PassRefPtr<SVGImageElement> create(const QualifiedName&, Document&);
+ static Ref<SVGImageElement> create(const QualifiedName&, Document&);
+
+ bool hasSingleSecurityOrigin() const;
private:
SVGImageElement(const QualifiedName&, Document&);
- virtual bool isValid() const override { return SVGTests::isValid(); }
- virtual bool supportsFocus() const override { return true; }
+ bool isValid() const final { return SVGTests::isValid(); }
- 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&, MutableStyleProperties&) override;
- virtual void svgAttributeChanged(const QualifiedName&) override;
+ static bool isSupportedAttribute(const QualifiedName&);
+ void parseAttribute(const QualifiedName&, const AtomicString&) final;
+ void svgAttributeChanged(const QualifiedName&) final;
- virtual void didAttachRenderers() override;
- virtual InsertionNotificationRequest insertedInto(ContainerNode&) override;
+ void didAttachRenderers() final;
+ InsertionNotificationRequest insertedInto(ContainerNode&) final;
- virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) override;
+ RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
- virtual const AtomicString& imageSourceURL() const override;
- virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
+ const AtomicString& imageSourceURL() const final;
+ void addSubresourceAttributeURLs(ListHashSet<URL>&) const final;
- virtual bool haveLoadedRequiredResources() override;
+ bool haveLoadedRequiredResources() final;
- virtual bool selfHasRelativeLengths() const override;
- virtual void didMoveToNewDocument(Document* oldDocument) override;
+ bool selfHasRelativeLengths() const final { return true; }
+ void didMoveToNewDocument(Document& oldDocument) final;
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGImageElement)
DECLARE_ANIMATED_LENGTH(X, x)
@@ -69,16 +66,11 @@ private:
DECLARE_ANIMATED_LENGTH(Width, width)
DECLARE_ANIMATED_LENGTH(Height, height)
DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio)
- DECLARE_ANIMATED_STRING(Href, href)
- DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STRING_OVERRIDE(Href, href)
+ DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
END_DECLARE_ANIMATED_PROPERTIES
SVGImageLoader m_imageLoader;
};
-NODE_TYPE_CASTS(SVGImageElement)
-
} // namespace WebCore
-
-#endif // ENABLE(SVG)
-#endif