diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/HTMLStyleElement.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/html/HTMLStyleElement.h')
-rw-r--r-- | Source/WebCore/html/HTMLStyleElement.h | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/Source/WebCore/html/HTMLStyleElement.h b/Source/WebCore/html/HTMLStyleElement.h index 9957ba507..a00d13360 100644 --- a/Source/WebCore/html/HTMLStyleElement.h +++ b/Source/WebCore/html/HTMLStyleElement.h @@ -20,8 +20,7 @@ * */ -#ifndef HTMLStyleElement_h -#define HTMLStyleElement_h +#pragma once #include "HTMLElement.h" #include "InlineStyleSheetOwner.h" @@ -32,46 +31,43 @@ class HTMLStyleElement; class StyleSheet; template<typename T> class EventSender; -typedef EventSender<HTMLStyleElement> StyleEventSender; + +using StyleEventSender = EventSender<HTMLStyleElement>; class HTMLStyleElement final : public HTMLElement { public: - static PassRefPtr<HTMLStyleElement> create(const QualifiedName&, Document&, bool createdByParser); + static Ref<HTMLStyleElement> create(Document&); + static Ref<HTMLStyleElement> create(const QualifiedName&, Document&, bool createdByParser); virtual ~HTMLStyleElement(); CSSStyleSheet* sheet() const { return m_styleSheetOwner.sheet(); } - bool disabled() const; - void setDisabled(bool); + WEBCORE_EXPORT bool disabled() const; + WEBCORE_EXPORT void setDisabled(bool); void dispatchPendingEvent(StyleEventSender*); static void dispatchPendingLoadEvents(); + void finishParsingChildren() final; + private: HTMLStyleElement(const QualifiedName&, Document&, bool createdByParser); - // overload from HTMLElement - virtual void parseAttribute(const QualifiedName&, const AtomicString&) override; - virtual InsertionNotificationRequest insertedInto(ContainerNode&) override; - virtual void removedFrom(ContainerNode&) override; - virtual void childrenChanged(const ChildChange&) override; - - virtual void finishParsingChildren() override; + void parseAttribute(const QualifiedName&, const AtomicString&) final; + InsertionNotificationRequest insertedInto(ContainerNode&) final; + void removedFrom(ContainerNode&) final; + void childrenChanged(const ChildChange&) final; - virtual bool isLoading() const { return m_styleSheetOwner.isLoading(); } - virtual bool sheetLoaded() override { return m_styleSheetOwner.sheetLoaded(document()); } - virtual void notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred) override; - virtual void startLoadingDynamicSheet() override { m_styleSheetOwner.startLoadingDynamicSheet(document()); } + 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); } - virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const override; + void addSubresourceAttributeURLs(ListHashSet<URL>&) const final; InlineStyleSheetOwner m_styleSheetOwner; - bool m_firedLoad; - bool m_loadedSheet; + bool m_firedLoad { false }; + bool m_loadedSheet { false }; }; -NODE_TYPE_CASTS(HTMLStyleElement) - } //namespace - -#endif |