NS_PRECONDITION((nsnull != aKid) && (aKid != this), "null ptr");
NS_PRECONDITION((nsnull != aKid) && (aKid != NS_STATIC_CAST(nsIStyledContent*, this)), "null ptr");
RDFElementImpl::AppendChildTo(nsIContent* aKid, PRBool aNotify){    nsresult rv;    if (NS_FAILED(rv = EnsureContentsGenerated()))        return rv;    NS_PRECONDITION((nsnull != aKid) && (aKid != this), "null ptr");    if (! mChildren) {        if (NS_FAILED(NS_NewISupportsArray(&mChildren)))            return NS_ERROR_OUT_OF_MEMORY;    }    PRBool appendOk = mChildren->AppendElement(aKid);    if (appendOk) {        NS_ADDREF(aKid);        aKid->SetParent(this);        // ranges don't need adjustment since new child is at end of list        nsIDocument* doc = mDocument;        if (nsnull != doc) {            aKid->SetDocument(doc, PR_TRUE);            if (aNotify) {                doc->ContentInserted(this, aKid, mChildren->Count() - 1);            }        }    }    return NS_OK;}