summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLFrameElementBase.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/HTMLFrameElementBase.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/HTMLFrameElementBase.h')
-rw-r--r--Source/WebCore/html/HTMLFrameElementBase.h61
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()