Fix importNode, need to set the document before notifying. Bug 124358. r=Pike, sr=jst.

This commit is contained in:
peterv%netscape.com 2002-02-08 11:28:15 +00:00
parent cf8e2d560b
commit ea840e446a

View File

@ -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);