From b1c3df0cf16138787ad9e07e187ee889f8a01277 Mon Sep 17 00:00:00 2001 From: "peterv%netscape.com" Date: Fri, 8 Feb 2002 11:28:15 +0000 Subject: [PATCH] Fix importNode, need to set the document before notifying. Bug 124358. r=Pike, sr=jst. git-svn-id: svn://10.0.0.236/trunk@114021 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsDocument.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mozilla/content/base/src/nsDocument.cpp b/mozilla/content/base/src/nsDocument.cpp index 2f238c7db52..93aa6e77420 100644 --- a/mozilla/content/base/src/nsDocument.cpp +++ b/mozilla/content/base/src/nsDocument.cpp @@ -3004,9 +3004,11 @@ nsDocument::InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, // index-th spot in mChildren. if (ELEMENT_NODE == nodeType) mRootContent = content; - ContentInserted(nsnull, content, indx); content->SetDocument(this, PR_TRUE, PR_TRUE); + + ContentInserted(nsnull, content, indx); + *aReturn = aNewChild; NS_ADDREF(aNewChild);