summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLFrameOwnerElement.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/HTMLFrameOwnerElement.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/HTMLFrameOwnerElement.h')
-rw-r--r--Source/WebCore/html/HTMLFrameOwnerElement.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/Source/WebCore/html/HTMLFrameOwnerElement.h b/Source/WebCore/html/HTMLFrameOwnerElement.h
index 4e4f973df..7b184b622 100644
--- a/Source/WebCore/html/HTMLFrameOwnerElement.h
+++ b/Source/WebCore/html/HTMLFrameOwnerElement.h
@@ -18,11 +18,11 @@
*
*/
-#ifndef HTMLFrameOwnerElement_h
-#define HTMLFrameOwnerElement_h
+#pragma once
#include "HTMLElement.h"
#include <wtf/HashCountedSet.h>
+#include <wtf/NeverDestroyed.h>
namespace WebCore {
@@ -36,8 +36,8 @@ public:
virtual ~HTMLFrameOwnerElement();
Frame* contentFrame() const { return m_contentFrame; }
- DOMWindow* contentWindow() const;
- Document* contentDocument() const;
+ WEBCORE_EXPORT DOMWindow* contentWindow() const;
+ WEBCORE_EXPORT Document* contentDocument() const;
void setContentFrame(Frame*);
void clearContentFrame();
@@ -49,43 +49,41 @@ public:
// RenderElement when using fallback content.
RenderWidget* renderWidget() const;
-#if ENABLE(SVG)
- SVGDocument* getSVGDocument(ExceptionCode&) const;
-#endif
+ ExceptionOr<Document&> getSVGDocument() const;
virtual ScrollbarMode scrollingMode() const { return ScrollbarAuto; }
SandboxFlags sandboxFlags() const { return m_sandboxFlags; }
- void scheduleSetNeedsStyleRecalc(StyleChangeType = FullStyleChange);
+ void scheduleinvalidateStyleAndLayerComposition();
+
+ virtual bool isURLAllowed(const URL&) const { return true; }
protected:
HTMLFrameOwnerElement(const QualifiedName& tagName, Document&);
void setSandboxFlags(SandboxFlags);
private:
- virtual bool isKeyboardFocusable(KeyboardEvent*) const override;
- virtual bool isFrameOwnerElement() const override { return true; }
+ bool isKeyboardFocusable(KeyboardEvent&) const override;
+ bool isFrameOwnerElement() const final { return true; }
Frame* m_contentFrame;
SandboxFlags m_sandboxFlags;
};
-void isHTMLFrameOwnerElement(const HTMLFrameOwnerElement&); // Catch unnecessary runtime check of type known at compile time.
-inline bool isHTMLFrameOwnerElement(const Node& node) { return node.isFrameOwnerElement(); }
-NODE_TYPE_CASTS(HTMLFrameOwnerElement)
-
class SubframeLoadingDisabler {
public:
- explicit SubframeLoadingDisabler(ContainerNode& root)
+ explicit SubframeLoadingDisabler(ContainerNode* root)
: m_root(root)
{
- disabledSubtreeRoots().add(&m_root);
+ if (m_root)
+ disabledSubtreeRoots().add(m_root);
}
~SubframeLoadingDisabler()
{
- disabledSubtreeRoots().remove(&m_root);
+ if (m_root)
+ disabledSubtreeRoots().remove(m_root);
}
static bool canLoadFrame(HTMLFrameOwnerElement&);
@@ -93,13 +91,15 @@ public:
private:
static HashCountedSet<ContainerNode*>& disabledSubtreeRoots()
{
- DEFINE_STATIC_LOCAL(HashCountedSet<ContainerNode*>, nodes, ());
+ static NeverDestroyed<HashCountedSet<ContainerNode*>> nodes;
return nodes;
}
- ContainerNode& m_root;
+ ContainerNode* m_root;
};
} // namespace WebCore
-#endif // HTMLFrameOwnerElement_h
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::HTMLFrameOwnerElement)
+ static bool isType(const WebCore::Node& node) { return node.isFrameOwnerElement(); }
+SPECIALIZE_TYPE_TRAITS_END()