summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/Attribute.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/dom/Attribute.cpp')
-rw-r--r--WebCore/dom/Attribute.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/WebCore/dom/Attribute.cpp b/WebCore/dom/Attribute.cpp
index 048ac6a..0ab0bb6 100644
--- a/WebCore/dom/Attribute.cpp
+++ b/WebCore/dom/Attribute.cpp
@@ -37,10 +37,8 @@ PassRefPtr<Attribute> Attribute::clone() const
PassRefPtr<Attr> Attribute::createAttrIfNeeded(Element* e)
{
RefPtr<Attr> r = m_impl;
- if (!r) {
- r = new Attr(e, e->document(), this);
- r->createTextChild();
- }
+ if (!r)
+ r = Attr::create(e, e->document(), this);
return r.release();
}