HTMLStyleElement.h [plain text]
#ifndef HTMLStyleElement_h
#define HTMLStyleElement_h
#include "HTMLElement.h"
#include "InlineStyleSheetOwner.h"
namespace WebCore {
class HTMLStyleElement;
class StyleSheet;
template<typename T> class EventSender;
typedef EventSender<HTMLStyleElement> StyleEventSender;
class HTMLStyleElement final : public HTMLElement {
public:
static Ref<HTMLStyleElement> create(const QualifiedName&, Document&, bool createdByParser);
virtual ~HTMLStyleElement();
CSSStyleSheet* sheet() const { return m_styleSheetOwner.sheet(); }
bool disabled() const;
void setDisabled(bool);
void dispatchPendingEvent(StyleEventSender*);
static void dispatchPendingLoadEvents();
private:
HTMLStyleElement(const QualifiedName&, Document&, bool createdByParser);
void parseAttribute(const QualifiedName&, const AtomicString&) final;
InsertionNotificationRequest insertedInto(ContainerNode&) final;
void removedFrom(ContainerNode&) final;
void childrenChanged(const ChildChange&) final;
void finishParsingChildren() final;
bool isLoading() const { return m_styleSheetOwner.isLoading(); }
bool sheetLoaded() final { return m_styleSheetOwner.sheetLoaded(*this); }
void notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred) final;
void startLoadingDynamicSheet() final { m_styleSheetOwner.startLoadingDynamicSheet(*this); }
void addSubresourceAttributeURLs(ListHashSet<URL>&) const final;
InlineStyleSheetOwner m_styleSheetOwner;
bool m_firedLoad;
bool m_loadedSheet;
};
}
#endif