diff options
Diffstat (limited to 'Source/WebCore/dom/Comment.h')
-rw-r--r-- | Source/WebCore/dom/Comment.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/Source/WebCore/dom/Comment.h b/Source/WebCore/dom/Comment.h index 48729b6ac..fe7d34834 100644 --- a/Source/WebCore/dom/Comment.h +++ b/Source/WebCore/dom/Comment.h @@ -20,8 +20,7 @@ * */ -#ifndef Comment_h -#define Comment_h +#pragma once #include "CharacterData.h" @@ -29,24 +28,19 @@ namespace WebCore { class Comment final : public CharacterData { public: - static PassRefPtr<Comment> create(Document&, const String&); - static PassRefPtr<Comment> create(ScriptExecutionContext&, const String&); + static Ref<Comment> create(Document&, const String&); private: Comment(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; + String nodeName() const override; + NodeType nodeType() const override; + Ref<Node> cloneNodeInternal(Document&, CloningOperation) override; + bool childTypeAllowed(NodeType) const override; }; -inline bool isComment(const Node& node) { return node.nodeType() == Node::COMMENT_NODE; } -void isComment(const Comment&); // Catch unnecessary runtime check of type known at compile time. -void isComment(const ContainerNode&); // Catch unnecessary runtime check of type known at compile time. - -NODE_TYPE_CASTS(Comment) - } // namespace WebCore -#endif // Comment_h +SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::Comment) + static bool isType(const WebCore::Node& node) { return node.nodeType() == WebCore::Node::COMMENT_NODE; } +SPECIALIZE_TYPE_TRAITS_END() |