summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/DocumentFragment.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/DocumentFragment.h')
-rw-r--r--Source/WebCore/dom/DocumentFragment.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/Source/WebCore/dom/DocumentFragment.h b/Source/WebCore/dom/DocumentFragment.h
index 9f1b1afa9..9d00c6c50 100644
--- a/Source/WebCore/dom/DocumentFragment.h
+++ b/Source/WebCore/dom/DocumentFragment.h
@@ -21,42 +21,38 @@
*
*/
-#ifndef DocumentFragment_h
-#define DocumentFragment_h
+#pragma once
#include "ContainerNode.h"
#include "FragmentScriptingPermission.h"
namespace WebCore {
-class ScriptExecutionContext;
-
class DocumentFragment : public ContainerNode {
public:
- static PassRefPtr<DocumentFragment> create(Document&);
- static PassRefPtr<DocumentFragment> create(ScriptExecutionContext&);
+ static Ref<DocumentFragment> create(Document&);
void parseHTML(const String&, Element* contextElement, ParserContentPolicy = AllowScriptingContent);
bool parseXML(const String&, Element* contextElement, ParserContentPolicy = AllowScriptingContent);
- virtual bool canContainRangeEndPoint() const override { return true; }
+ bool canContainRangeEndPoint() const final { return true; }
virtual bool isTemplateContent() const { return false; }
+ // From the NonElementParentNode interface - https://dom.spec.whatwg.org/#interface-nonelementparentnode
+ WEBCORE_EXPORT Element* getElementById(const AtomicString&) const;
+
protected:
- DocumentFragment(Document*, ConstructionType = CreateContainer);
- virtual String nodeName() const override;
+ DocumentFragment(Document&, ConstructionType = CreateContainer);
+ String nodeName() const final;
private:
- virtual NodeType nodeType() const override;
- virtual PassRefPtr<Node> cloneNode(bool deep) override;
- virtual bool childTypeAllowed(NodeType) const override;
+ NodeType nodeType() const final;
+ Ref<Node> cloneNodeInternal(Document&, CloningOperation) override;
+ bool childTypeAllowed(NodeType) const override;
};
-inline bool isDocumentFragment(const Node& node) { return node.isDocumentFragment(); }
-void isDocumentFragment(const DocumentFragment&); // Catch unnecessary runtime check of type known at compile time.
-
-NODE_TYPE_CASTS(DocumentFragment)
-
-} //namespace
+} // namespace WebCore
-#endif
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::DocumentFragment)
+ static bool isType(const WebCore::Node& node) { return node.isDocumentFragment(); }
+SPECIALIZE_TYPE_TRAITS_END()