PRBool rv = mChildren.InsertElementAt(aKid, aIndex); if (rv) { NS_ADDREF(aKid); aKid->SetParent(this); nsRange::OwnerChildInserted(this, aIndex); if (nsnull != doc) { aKid->SetDocument(doc, aDeepSetDocument, PR_TRUE); if (aNotify) { doc->ContentInserted(this, aKid, aIndex); }  if (nsGenericElement::HasMutationListeners(this, NS_EVENT_BITS_MUTATION_NODEINSERTED)) { nsCOMPtr<nsIDOMEventTarget> node(do_QueryInterface(aKid)); nsMutationEvent mutation; mutation.eventStructType = NS_MUTATION_EVENT; mutation.message = NS_MUTATION_NODEINSERTED; mutation.mTarget = node;  nsCOMPtr<nsIDOMNode> relNode(do_QueryInterface(NS_STATIC_CAST(nsIContent *, this))); mutation.mRelatedNode = relNode;  nsEventStatus status = nsEventStatus_eIgnore; aKid->HandleDOMEvent(nsnull, &mutation, nsnull, NS_EVENT_FLAG_INIT, &status); } } } if (aNotify && (nsnull != doc)) { doc->EndUpdate(); } return NS_OK; }
  nsresult InsertChildAt(nsIContent* aKid, PRInt32 aIndex, PRBool aNotify) {    return NS_OK;  }