mContent->SetDocument(doc, PR_TRUE);
nsXBLBinding::SetAnonymousContent(nsIContent* aParent){  // First cache the element.  mContent = aParent;  // Now we need to ensure two things.  // (1) The anonymous content should be fooled into thinking it's in the bound  // element's document.  nsCOMPtr<nsIDocument> doc;  mBoundElement->GetDocument(*getter_AddRefs(doc));  mContent->SetDocument(doc, PR_TRUE);  // (2) The children's parent back pointer should not be to this synthetic root  // but should instead point to the bound element.  PRInt32 childCount;  mContent->ChildCount(childCount);  for (PRInt32 i = 0; i < childCount; i++) {    nsCOMPtr<nsIContent> child;    mContent->ChildAt(i, *getter_AddRefs(child));    child->SetParent(mBoundElement);  }  // (3) We need to insert entries into our attribute table for any elements  // that are inheriting attributes.  This table allows us to quickly determine   // which elements in our anonymous content need to be updated when attributes change.  ConstructAttributeTable(aParent);    return NS_OK;}