From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/html/HTMLStyleElement.h | 44 ++++++++++++++++------------------ 1 file changed, 20 insertions(+), 24 deletions(-) (limited to 'Source/WebCore/html/HTMLStyleElement.h') 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 class EventSender; -typedef EventSender StyleEventSender; + +using StyleEventSender = EventSender; class HTMLStyleElement final : public HTMLElement { public: - static PassRefPtr create(const QualifiedName&, Document&, bool createdByParser); + static Ref create(Document&); + static Ref 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&) const override; + void addSubresourceAttributeURLs(ListHashSet&) 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 -- cgit v1.2.1