summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/EntityReference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/dom/EntityReference.cpp')
-rw-r--r--WebCore/dom/EntityReference.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/WebCore/dom/EntityReference.cpp b/WebCore/dom/EntityReference.cpp
index 012605c..c4c292a 100644
--- a/WebCore/dom/EntityReference.cpp
+++ b/WebCore/dom/EntityReference.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2000 Peter Kelly (pmk@post.com)
- * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -23,12 +23,17 @@
namespace WebCore {
-EntityReference::EntityReference(Document* document, const String& entityName)
+inline EntityReference::EntityReference(Document* document, const String& entityName)
: ContainerNode(document)
, m_entityName(entityName)
{
}
+PassRefPtr<EntityReference> EntityReference::create(Document* document, const String& entityName)
+{
+ return adoptRef(new EntityReference(document, entityName));
+}
+
String EntityReference::nodeName() const
{
return m_entityName;
@@ -41,7 +46,7 @@ Node::NodeType EntityReference::nodeType() const
PassRefPtr<Node> EntityReference::cloneNode(bool)
{
- return new EntityReference(document(), m_entityName);
+ return create(document(), m_entityName);
}
} // namespace