Bug 304759. Forgot to check in one hunk of the patch on branch.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@178569 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2005-08-21 21:32:20 +00:00
parent 1c17ed13e7
commit 2bdee9bb25

View File

@@ -3639,6 +3639,11 @@ nsDocument::ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild,
mChildren.RemoveObjectAt(indx);
if (nodeType == nsIDOMNode::ELEMENT_NODE) {
// This must be replacing the root node. Tear down the link map
// because we're going to unbind all content.
DestroyLinkMap();
}
ContentRemoved(nsnull, refContent, indx);
refContent->UnbindFromTree();