Index: Source/core/dom/Attr.cpp |
diff --git a/Source/core/dom/Attr.cpp b/Source/core/dom/Attr.cpp |
index e95f8caccf713ff267fbe5606190543d2d7dcd99..0d20c05a43f440b6aed7bf8616e12d0708ca5563 100644 |
--- a/Source/core/dom/Attr.cpp |
+++ b/Source/core/dom/Attr.cpp |
@@ -37,9 +37,9 @@ namespace WebCore { |
using namespace HTMLNames; |
-Attr::Attr(Element* element, const QualifiedName& name) |
- : ContainerNode(&element->document()) |
- , m_element(element) |
+Attr::Attr(Element& element, const QualifiedName& name) |
+ : ContainerNode(&element.document()) |
+ , m_element(&element) |
, m_name(name) |
, m_ignoreChildrenChanged(0) |
, m_specified(true) |
@@ -47,8 +47,8 @@ Attr::Attr(Element* element, const QualifiedName& name) |
ScriptWrappable::init(this); |
} |
-Attr::Attr(Document* document, const QualifiedName& name, const AtomicString& standaloneValue) |
- : ContainerNode(document) |
+Attr::Attr(Document& document, const QualifiedName& name, const AtomicString& standaloneValue) |
+ : ContainerNode(&document) |
, m_element(0) |
, m_name(name) |
, m_standaloneValue(standaloneValue) |
@@ -58,14 +58,14 @@ Attr::Attr(Document* document, const QualifiedName& name, const AtomicString& st |
ScriptWrappable::init(this); |
} |
-PassRefPtr<Attr> Attr::create(Element* element, const QualifiedName& name) |
+PassRefPtr<Attr> Attr::create(Element& element, const QualifiedName& name) |
{ |
RefPtr<Attr> attr = adoptRef(new Attr(element, name)); |
attr->createTextChild(); |
return attr.release(); |
} |
-PassRefPtr<Attr> Attr::create(Document* document, const QualifiedName& name, const AtomicString& value) |
+PassRefPtr<Attr> Attr::create(Document& document, const QualifiedName& name, const AtomicString& value) |
{ |
RefPtr<Attr> attr = adoptRef(new Attr(document, name, value)); |
attr->createTextChild(); |
@@ -143,7 +143,7 @@ void Attr::setNodeValue(const String& v) |
PassRefPtr<Node> Attr::cloneNode(bool /*deep*/) |
{ |
- RefPtr<Attr> clone = adoptRef(new Attr(&document(), qualifiedName(), value())); |
+ RefPtr<Attr> clone = adoptRef(new Attr(document(), qualifiedName(), value())); |
cloneChildNodes(clone.get()); |
return clone.release(); |
} |