#pragma once
#include "InlineStyleSheetOwner.h"
#include "SVGElement.h"
namespace WebCore {
class SVGStyleElement final : public SVGElement {
WTF_MAKE_ISO_ALLOCATED(SVGStyleElement);
public:
static Ref<SVGStyleElement> create(const QualifiedName&, Document&, bool createdByParser);
virtual ~SVGStyleElement();
CSSStyleSheet* sheet() const { return m_styleSheetOwner.sheet(); }
bool disabled() const;
void setDisabled(bool);
const AtomString& type() const;
void setType(const AtomString&);
const AtomString& media() const;
void setMedia(const AtomString&);
private:
SVGStyleElement(const QualifiedName&, Document&, bool createdByParser);
void parseAttribute(const QualifiedName&, const AtomString&) final;
InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
void removedFromAncestor(RemovalType, ContainerNode&) final;
void childrenChanged(const ChildChange&) final;
bool rendererIsNeeded(const RenderStyle&) final { return false; }
void finishParsingChildren() final;
virtual bool isLoading() const { return m_styleSheetOwner.isLoading(); }
bool sheetLoaded() final { return m_styleSheetOwner.sheetLoaded(*this); }
void startLoadingDynamicSheet() final { m_styleSheetOwner.startLoadingDynamicSheet(*this); }
Timer* loadEventTimer() final { return &m_loadEventTimer; }
String title() const final;
InlineStyleSheetOwner m_styleSheetOwner;
Timer m_loadEventTimer;
};
}