summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/CDATASection.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/CDATASection.h')
-rw-r--r--Source/WebCore/dom/CDATASection.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/Source/WebCore/dom/CDATASection.h b/Source/WebCore/dom/CDATASection.h
index a93dc496c..bdb9db7b3 100644
--- a/Source/WebCore/dom/CDATASection.h
+++ b/Source/WebCore/dom/CDATASection.h
@@ -20,8 +20,7 @@
*
*/
-#ifndef CDATASection_h
-#define CDATASection_h
+#pragma once
#include "Text.h"
@@ -29,24 +28,20 @@ namespace WebCore {
class CDATASection final : public Text {
public:
- static PassRefPtr<CDATASection> create(Document&, const String&);
+ static Ref<CDATASection> create(Document&, const String&);
private:
CDATASection(Document&, const String&);
- virtual String nodeName() const override;
- virtual NodeType nodeType() const override;
- virtual PassRefPtr<Node> cloneNode(bool deep) override;
- virtual bool childTypeAllowed(NodeType) const override;
- virtual PassRefPtr<Text> virtualCreate(const String&) override;
+ String nodeName() const override;
+ NodeType nodeType() const override;
+ Ref<Node> cloneNodeInternal(Document&, CloningOperation) override;
+ bool childTypeAllowed(NodeType) const override;
+ Ref<Text> virtualCreate(const String&) override;
};
-inline bool isCDATASection(const Node& node) { return node.nodeType() == Node::CDATA_SECTION_NODE; }
-void isCDATASection(const CDATASection&); // Catch unnecessary runtime check of type known at compile time.
-void isCDATASection(const ContainerNode&); // Catch unnecessary runtime check of type known at compile time.
-
-NODE_TYPE_CASTS(CDATASection)
-
} // namespace WebCore
-#endif // CDATASection_h
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::CDATASection)
+ static bool isType(const WebCore::Node& node) { return node.nodeType() == WebCore::Node::CDATA_SECTION_NODE; }
+SPECIALIZE_TYPE_TRAITS_END()