summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/Comment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/Comment.cpp')
-rw-r--r--Source/WebCore/dom/Comment.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/Source/WebCore/dom/Comment.cpp b/Source/WebCore/dom/Comment.cpp
index 51300e9e8..731436894 100644
--- a/Source/WebCore/dom/Comment.cpp
+++ b/Source/WebCore/dom/Comment.cpp
@@ -31,19 +31,14 @@ inline Comment::Comment(Document& document, const String& text)
{
}
-PassRefPtr<Comment> Comment::create(Document& document, const String& text)
+Ref<Comment> Comment::create(Document& document, const String& text)
{
- return adoptRef(new Comment(document, text));
-}
-
-PassRefPtr<Comment> Comment::create(ScriptExecutionContext& context, const String& text)
-{
- return adoptRef(new Comment(toDocument(context), text));
+ return adoptRef(*new Comment(document, text));
}
String Comment::nodeName() const
{
- return commentAtom.string();
+ return ASCIILiteral("#comment");
}
Node::NodeType Comment::nodeType() const
@@ -51,9 +46,9 @@ Node::NodeType Comment::nodeType() const
return COMMENT_NODE;
}
-PassRefPtr<Node> Comment::cloneNode(bool /*deep*/)
+Ref<Node> Comment::cloneNodeInternal(Document& targetDocument, CloningOperation)
{
- return create(document(), data());
+ return create(targetDocument, data());
}
bool Comment::childTypeAllowed(NodeType) const