summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGScriptElement.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/SVGScriptElement.h')
-rw-r--r--Source/WebCore/svg/SVGScriptElement.h84
1 files changed, 39 insertions, 45 deletions
diff --git a/Source/WebCore/svg/SVGScriptElement.h b/Source/WebCore/svg/SVGScriptElement.h
index 7dce93b15..23277f777 100644
--- a/Source/WebCore/svg/SVGScriptElement.h
+++ b/Source/WebCore/svg/SVGScriptElement.h
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
* Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
+ * Copyright (C) 2008-2017 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -18,10 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef SVGScriptElement_h
-#define SVGScriptElement_h
+#pragma once
-#if ENABLE(SVG)
#include "SVGAnimatedBoolean.h"
#include "SVGAnimatedString.h"
#include "SVGElement.h"
@@ -31,66 +30,61 @@
namespace WebCore {
-class SVGScriptElement final : public SVGElement
- , public SVGURIReference
- , public SVGExternalResourcesRequired
- , public ScriptElement {
+class SVGScriptElement final : public SVGElement, public SVGURIReference, public SVGExternalResourcesRequired, public ScriptElement {
public:
- static PassRefPtr<SVGScriptElement> create(const QualifiedName&, Document&, bool wasInsertedByParser);
+ static Ref<SVGScriptElement> create(const QualifiedName&, Document&, bool wasInsertedByParser);
-#ifndef NDEBUG
- virtual bool isAnimatableAttribute(const QualifiedName&) const override;
-#endif
+ using SVGElement::ref;
+ using SVGElement::deref;
private:
SVGScriptElement(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted);
- bool isSupportedAttribute(const QualifiedName&);
- virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
- virtual InsertionNotificationRequest insertedInto(ContainerNode&) override;
- virtual void didNotifySubtreeInsertions(ContainerNode*) override;
- virtual void childrenChanged(const ChildChange&) override;
+ void parseAttribute(const QualifiedName&, const AtomicString&) final;
+ InsertionNotificationRequest insertedInto(ContainerNode&) final;
+ void finishedInsertingSubtree() final;
+ void childrenChanged(const ChildChange&) final;
- virtual void svgAttributeChanged(const QualifiedName&) override;
- virtual bool isURLAttribute(const Attribute&) const override;
- virtual void finishParsingChildren() override;
+ void svgAttributeChanged(const QualifiedName&) final;
+ bool isURLAttribute(const Attribute&) const final;
+ void finishParsingChildren() final;
- virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
+ void addSubresourceAttributeURLs(ListHashSet<URL>&) const final;
- virtual bool haveLoadedRequiredResources() override { return SVGExternalResourcesRequired::haveLoadedRequiredResources(); }
+ bool haveLoadedRequiredResources() final { return SVGExternalResourcesRequired::haveLoadedRequiredResources(); }
- virtual String sourceAttributeValue() const override;
- virtual String charsetAttributeValue() const override;
- virtual String typeAttributeValue() const override;
- virtual String languageAttributeValue() const override;
- virtual String forAttributeValue() const override;
- virtual String eventAttributeValue() const override;
- virtual bool asyncAttributeValue() const override;
- virtual bool deferAttributeValue() const override;
- virtual bool hasSourceAttribute() const override;
+ String sourceAttributeValue() const final;
+ String charsetAttributeValue() const final;
+ String typeAttributeValue() const final;
+ String languageAttributeValue() const final;
+ String forAttributeValue() const final;
+ String eventAttributeValue() const final;
+ bool hasAsyncAttribute() const final;
+ bool hasDeferAttribute() const final;
+ bool hasNoModuleAttribute() const final;
+ bool hasSourceAttribute() const final;
- virtual void dispatchLoadEvent() override { SVGExternalResourcesRequired::dispatchLoadEvent(this); }
+ void dispatchLoadEvent() final { SVGExternalResourcesRequired::dispatchLoadEvent(this); }
- virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() override;
- virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
+ Ref<Element> cloneElementWithoutAttributesAndChildren(Document&) final;
+ bool rendererIsNeeded(const RenderStyle&) final { return false; }
// SVGExternalResourcesRequired
- virtual void setHaveFiredLoadEvent(bool haveFiredLoadEvent) override { ScriptElement::setHaveFiredLoadEvent(haveFiredLoadEvent); }
- virtual bool isParserInserted() const override { return ScriptElement::isParserInserted(); }
- virtual bool haveFiredLoadEvent() const override { return ScriptElement::haveFiredLoadEvent(); }
- virtual Timer<SVGElement>* svgLoadEventTimer() override { return &m_svgLoadEventTimer; }
+ void setHaveFiredLoadEvent(bool haveFiredLoadEvent) final { ScriptElement::setHaveFiredLoadEvent(haveFiredLoadEvent); }
+ bool isParserInserted() const final { return ScriptElement::isParserInserted(); }
+ bool haveFiredLoadEvent() const final { return ScriptElement::haveFiredLoadEvent(); }
+ Timer* svgLoadEventTimer() final { return &m_svgLoadEventTimer; }
+
+#ifndef NDEBUG
+ bool filterOutAnimatableAttribute(const QualifiedName&) const final;
+#endif
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGScriptElement)
- 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
- Timer<SVGElement> m_svgLoadEventTimer;
+ Timer m_svgLoadEventTimer;
};
-NODE_TYPE_CASTS(SVGScriptElement)
-
} // namespace WebCore
-
-#endif // ENABLE(SVG)
-#endif