Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Unified Diff: Source/core/dom/DocumentFragment.cpp

Issue 23453033: Have DOMPatchSupport and DocumentFragment deal with Document references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/DocumentFragment.h ('k') | Source/core/dom/Range.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentFragment.cpp
diff --git a/Source/core/dom/DocumentFragment.cpp b/Source/core/dom/DocumentFragment.cpp
index 3bbb750237007f8c822a807bc81d55fb0b907e39..141d571fe3f943fd86ff74a1ad0815be3c403994 100644
--- a/Source/core/dom/DocumentFragment.cpp
+++ b/Source/core/dom/DocumentFragment.cpp
@@ -35,10 +35,9 @@ DocumentFragment::DocumentFragment(Document* document, ConstructionType construc
ScriptWrappable::init(this);
}
-PassRefPtr<DocumentFragment> DocumentFragment::create(Document* document)
+PassRefPtr<DocumentFragment> DocumentFragment::create(Document& document)
{
- ASSERT(document);
- return adoptRef(new DocumentFragment(document, Node::CreateDocumentFragment));
+ return adoptRef(new DocumentFragment(&document, Node::CreateDocumentFragment));
}
String DocumentFragment::nodeName() const
@@ -67,7 +66,7 @@ bool DocumentFragment::childTypeAllowed(NodeType type) const
PassRefPtr<Node> DocumentFragment::cloneNode(bool deep)
{
- RefPtr<DocumentFragment> clone = create(&document());
+ RefPtr<DocumentFragment> clone = create(document());
if (deep)
cloneChildNodes(clone.get());
return clone.release();
« no previous file with comments | « Source/core/dom/DocumentFragment.h ('k') | Source/core/dom/Range.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698