rv = AddElementToMap(aChild, PR_TRUE);
rv = DoForSubtree(aChild, AddElementToDocument, nsnull);
XULDocumentImpl::ContentInserted(nsIContent* aContainer,                                 nsIContent* aChild,                                 PRInt32 aIndexInContainer){    // First update our element map    {        nsresult rv;        rv = AddElementToMap(aChild, PR_TRUE);        if (NS_FAILED(rv)) return rv;    }    // Now notify external observers    for (PRInt32 i = 0; i < mObservers.Count(); i++) {        nsIDocumentObserver*  observer = (nsIDocumentObserver*)mObservers[i];        observer->ContentInserted(this, aContainer, aChild, aIndexInContainer);        if (observer != (nsIDocumentObserver*)mObservers.ElementAt(i)) {          i--;        }    }    return NS_OK;}