summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGScriptElement.h
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-08-25 19:20:41 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:30:55 +0000
commit6882a04fb36642862b11efe514251d32070c3d65 (patch)
treeb7959826000b061fd5ccc7512035c7478742f7b0 /Source/WebCore/svg/SVGScriptElement.h
parentab6df191029eeeb0b0f16f127d553265659f739e (diff)
downloadqtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebCore/svg/SVGScriptElement.h')
-rw-r--r--Source/WebCore/svg/SVGScriptElement.h83
1 files changed, 35 insertions, 48 deletions
diff --git a/Source/WebCore/svg/SVGScriptElement.h b/Source/WebCore/svg/SVGScriptElement.h
index 43c241176..535e42e6f 100644
--- a/Source/WebCore/svg/SVGScriptElement.h
+++ b/Source/WebCore/svg/SVGScriptElement.h
@@ -21,84 +21,71 @@
#ifndef SVGScriptElement_h
#define SVGScriptElement_h
-#if ENABLE(SVG)
#include "SVGAnimatedBoolean.h"
#include "SVGAnimatedString.h"
#include "SVGElement.h"
#include "SVGExternalResourcesRequired.h"
-#include "SVGNames.h"
#include "SVGURIReference.h"
#include "ScriptElement.h"
namespace WebCore {
-class SVGScriptElement FINAL : public SVGElement
+class SVGScriptElement final : public SVGElement
, public SVGURIReference
, public SVGExternalResourcesRequired
, public ScriptElement {
public:
- static PassRefPtr<SVGScriptElement> create(const QualifiedName&, Document*, bool wasInsertedByParser);
-
- String type() const;
- void setType(const String&);
+ static Ref<SVGScriptElement> create(const QualifiedName&, Document&, bool wasInsertedByParser);
private:
- SVGScriptElement(const QualifiedName&, Document*, bool wasInsertedByParser, bool alreadyStarted);
+ 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 childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+ virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
+ virtual InsertionNotificationRequest insertedInto(ContainerNode&) override;
+ virtual void finishedInsertingSubtree() override;
+ virtual void childrenChanged(const ChildChange&) override;
- virtual void svgAttributeChanged(const QualifiedName&);
- virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
- virtual void finishParsingChildren();
+ virtual void svgAttributeChanged(const QualifiedName&) override;
+ virtual bool isURLAttribute(const Attribute&) const override;
+ virtual void finishParsingChildren() override;
- virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
+ virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
- virtual bool haveLoadedRequiredResources() { return SVGExternalResourcesRequired::haveLoadedRequiredResources(); }
+ virtual bool haveLoadedRequiredResources() override { return SVGExternalResourcesRequired::haveLoadedRequiredResources(); }
- virtual String sourceAttributeValue() const;
- virtual String charsetAttributeValue() const;
- virtual String typeAttributeValue() const;
- virtual String languageAttributeValue() const;
- virtual String forAttributeValue() const;
- virtual String eventAttributeValue() const;
- virtual bool asyncAttributeValue() const;
- virtual bool deferAttributeValue() const;
- virtual bool hasSourceAttribute() const;
+ 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;
- virtual void dispatchLoadEvent() { SVGExternalResourcesRequired::dispatchLoadEvent(this); }
+ virtual void dispatchLoadEvent() override { SVGExternalResourcesRequired::dispatchLoadEvent(this); }
- virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren();
+ virtual Ref<Element> cloneElementWithoutAttributesAndChildren(Document&) override;
+ virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
// SVGExternalResourcesRequired
- virtual void setHaveFiredLoadEvent(bool haveFiredLoadEvent) { ScriptElement::setHaveFiredLoadEvent(haveFiredLoadEvent); }
- virtual bool isParserInserted() const { return ScriptElement::isParserInserted(); }
- virtual bool haveFiredLoadEvent() const { return ScriptElement::haveFiredLoadEvent(); }
- virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadEventTimer; }
+ 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* svgLoadEventTimer() override { return &m_svgLoadEventTimer; }
+
+#ifndef NDEBUG
+ virtual bool filterOutAnimatableAttribute(const QualifiedName&) const override;
+#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
- String m_type;
- Timer<SVGElement> m_svgLoadEventTimer;
+ Timer m_svgLoadEventTimer;
};
-inline bool isSVGScriptElement(Node* node)
-{
- return node->hasTagName(SVGNames::scriptTag);
-}
-
-inline SVGScriptElement* toSVGScriptElement(Node* node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::scriptTag));
- return static_cast<SVGScriptElement*>(node);
-}
-
} // namespace WebCore
-#endif // ENABLE(SVG)
#endif