*getter_AddRefs(nodeInfo));
getter_AddRefs(nodeInfo));
nsImageDocument::CreateSyntheticDocument(){  // Synthesize an html document that refers to the image  nsresult rv = nsMediaDocument::CreateSyntheticDocument();  NS_ENSURE_SUCCESS(rv, rv);  nsCOMPtr<nsIHTMLContent> body = do_QueryInterface(mBodyContent);  if (!body) {    NS_WARNING("no body on image document!");    return NS_ERROR_FAILURE;  }  nsCOMPtr<nsINodeInfo> nodeInfo;  rv = mNodeInfoManager->GetNodeInfo(nsHTMLAtoms::img, nsnull,                                     kNameSpaceID_None,                                     *getter_AddRefs(nodeInfo));  NS_ENSURE_SUCCESS(rv, rv);  nsCOMPtr<nsIHTMLContent> image;  rv = NS_NewHTMLImageElement(getter_AddRefs(image), nodeInfo);  if (NS_FAILED(rv)) {    return rv;  }  image->SetDocument(this, PR_FALSE, PR_TRUE);  mImageElement = do_QueryInterface(image);  nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(image);  NS_ENSURE_TRUE(imageLoader, NS_ERROR_UNEXPECTED);  nsCAutoString src;  mDocumentURL->GetSpec(src);  NS_ConvertUTF8toUCS2 srcString(src);  // Make sure not to start the image load from here...  imageLoader->SetLoadingEnabled(PR_FALSE);  image->SetAttr(kNameSpaceID_None, nsHTMLAtoms::src, srcString, PR_FALSE);  imageLoader->SetLoadingEnabled(PR_TRUE);  if (mStringBundle) {    const PRUnichar* formatString[1] = { srcString.get() };    nsXPIDLString errorMsg;    NS_NAMED_LITERAL_STRING(str, "InvalidImage");    mStringBundle->FormatStringFromName(str.get(), formatString, 1,                                        getter_Copies(errorMsg));    image->SetAttr(kNameSpaceID_None, nsHTMLAtoms::alt, errorMsg, PR_FALSE);  }  body->AppendChildTo(image, PR_FALSE, PR_FALSE);  return NS_OK;}