diff options
Diffstat (limited to 'Source/WebCore/html/HTMLFrameElementBase.h')
-rw-r--r-- | Source/WebCore/html/HTMLFrameElementBase.h | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/Source/WebCore/html/HTMLFrameElementBase.h b/Source/WebCore/html/HTMLFrameElementBase.h index 007ff548a..8126b9e48 100644 --- a/Source/WebCore/html/HTMLFrameElementBase.h +++ b/Source/WebCore/html/HTMLFrameElementBase.h @@ -21,54 +21,56 @@ * */ -#ifndef HTMLFrameElementBase_h -#define HTMLFrameElementBase_h +#pragma once +#include "FrameLoaderTypes.h" #include "HTMLFrameOwnerElement.h" -#include "ScrollTypes.h" + +namespace JSC { +class ExecState; +} namespace WebCore { class HTMLFrameElementBase : public HTMLFrameOwnerElement { public: - URL location() const; - void setLocation(const String&); + WEBCORE_EXPORT URL location() const; + WEBCORE_EXPORT void setLocation(const String&); + void setLocation(JSC::ExecState&, const String&); - virtual ScrollbarMode scrollingMode() const override { return m_scrolling; } + ScrollbarMode scrollingMode() const final { return m_scrolling; } int marginWidth() const { return m_marginWidth; } int marginHeight() const { return m_marginHeight; } - int width(); - int height(); + WEBCORE_EXPORT int width(); + WEBCORE_EXPORT int height(); + + bool canContainRangeEndPoint() const final { return false; } - virtual bool canContainRangeEndPoint() const override { return false; } + bool isURLAllowed(const URL&) const override; protected: HTMLFrameElementBase(const QualifiedName&, Document&); bool isURLAllowed() const; - virtual void parseAttribute(const QualifiedName&, const AtomicString&) override; - virtual InsertionNotificationRequest insertedInto(ContainerNode&) override; - virtual void didNotifySubtreeInsertions(ContainerNode*) override; - virtual void didAttachRenderers() override; + void parseAttribute(const QualifiedName&, const AtomicString&) override; + InsertionNotificationRequest insertedInto(ContainerNode&) final; + void finishedInsertingSubtree() final; + void didAttachRenderers() override; private: - virtual bool supportsFocus() const override; - virtual void setFocus(bool) override; + bool supportsFocus() const final; + void setFocus(bool) final; - virtual bool isURLAttribute(const Attribute&) const override; - virtual bool isHTMLContentAttribute(const Attribute&) const override; - - virtual bool isFrameElementBase() const override { return true; } - - virtual bool areAuthorShadowsAllowed() const override { return false; } + bool isURLAttribute(const Attribute&) const final; + bool isHTMLContentAttribute(const Attribute&) const final; - bool viewSourceMode() const { return m_viewSource; } + bool isFrameElementBase() const final { return true; } void setNameAndOpenURL(); - void openURL(bool lockHistory = true, bool lockBackForwardList = true); + void openURL(LockHistory = LockHistory::Yes, LockBackForwardList = LockBackForwardList::Yes); AtomicString m_URL; AtomicString m_frameName; @@ -77,16 +79,11 @@ private: int m_marginWidth; int m_marginHeight; - - bool m_viewSource; }; -void isHTMLFrameElementBase(const HTMLFrameElementBase&); // Catch unnecessary runtime check of type known at compile time. -inline bool isHTMLFrameElementBase(const Element& element) { return isHTMLFrameElement(element) || isHTMLIFrameElement(element); } -inline bool isHTMLFrameElementBase(const Node& node) { return node.isElementNode() && isHTMLFrameElementBase(toElement(node)); } - -NODE_TYPE_CASTS(HTMLFrameElementBase) - } // namespace WebCore -#endif // HTMLFrameElementBase_h +SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::HTMLFrameElementBase) + static bool isType(const WebCore::HTMLElement& element) { return is<WebCore::HTMLFrameElement>(element) || is<WebCore::HTMLIFrameElement>(element); } + static bool isType(const WebCore::Node& node) { return is<WebCore::HTMLElement>(node) && isType(downcast<WebCore::HTMLElement>(node)); } +SPECIALIZE_TYPE_TRAITS_END() |