SVGScriptElement.h [plain text]
#pragma once
#include "SVGAnimatedBoolean.h"
#include "SVGAnimatedString.h"
#include "SVGElement.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGURIReference.h"
#include "ScriptElement.h"
#include "XLinkNames.h"
namespace WebCore {
class SVGScriptElement final : public SVGElement, public SVGExternalResourcesRequired, public SVGURIReference, public ScriptElement {
WTF_MAKE_ISO_ALLOCATED(SVGScriptElement);
public:
static Ref<SVGScriptElement> create(const QualifiedName&, Document&, bool wasInsertedByParser);
using SVGElement::ref;
using SVGElement::deref;
private:
SVGScriptElement(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted);
using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGScriptElement, SVGElement, SVGExternalResourcesRequired, SVGURIReference>;
const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
void parseAttribute(const QualifiedName&, const AtomicString&) final;
void svgAttributeChanged(const QualifiedName&) final;
InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
void didFinishInsertingNode() final;
void childrenChanged(const ChildChange&) final;
bool isURLAttribute(const Attribute& attribute) const final { return attribute.name() == sourceAttributeValue(); }
void finishParsingChildren() final;
void addSubresourceAttributeURLs(ListHashSet<URL>&) const final;
bool haveLoadedRequiredResources() final { return SVGExternalResourcesRequired::haveLoadedRequiredResources(); }
String sourceAttributeValue() const final { return href(); }
String charsetAttributeValue() const final { return String(); }
String typeAttributeValue() const final { return getAttribute(SVGNames::typeAttr).string(); }
String languageAttributeValue() const final { return String(); }
String forAttributeValue() const final { return String(); }
String eventAttributeValue() const final { return String(); }
bool hasAsyncAttribute() const final { return false; }
bool hasDeferAttribute() const final { return false; }
bool hasNoModuleAttribute() const final { return false; }
bool hasSourceAttribute() const final { return hasAttribute(SVGNames::hrefAttr) || hasAttribute(XLinkNames::hrefAttr); }
void dispatchLoadEvent() final { SVGExternalResourcesRequired::dispatchLoadEvent(); }
Ref<Element> cloneElementWithoutAttributesAndChildren(Document&) final;
bool rendererIsNeeded(const RenderStyle&) final { return false; }
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& name) const final { return name == SVGNames::typeAttr; }
#endif
AttributeOwnerProxy m_attributeOwnerProxy { *this };
Timer m_svgLoadEventTimer;
};
}