*getter_AddRefs(nodeInfo));
getter_AddRefs(nodeInfo));
nsPluginDocument::CreateSyntheticPluginDocument(){  // do not allow message panes to host full-page plugins  // returning an error causes helper apps to take over  nsCOMPtr<nsIDocShellTreeItem> dsti (do_QueryReferent(mDocumentContainer));  if (dsti) {    PRBool isMsgPane = PR_FALSE;    dsti->NameEquals(NS_LITERAL_STRING("messagepane").get(), &isMsgPane);    if (isMsgPane)      return NS_ERROR_FAILURE;  }  // make our generic document  nsresult rv = nsMediaDocument::CreateSyntheticDocument();  NS_ENSURE_SUCCESS(rv, rv);  // then attach our plugin  nsCOMPtr<nsIHTMLContent> body = do_QueryInterface(mBodyContent);  if (!body) {    NS_WARNING("no body on plugin document!");    return NS_ERROR_FAILURE;  }  // remove margins from body  nsHTMLValue zero(0, eHTMLUnit_Pixel);  body->SetHTMLAttribute(nsHTMLAtoms::marginwidth, zero, PR_FALSE);  body->SetHTMLAttribute(nsHTMLAtoms::marginheight, zero, PR_FALSE);  // make plugin content  nsCOMPtr<nsINodeInfo> nodeInfo;  rv = mNodeInfoManager->GetNodeInfo(nsHTMLAtoms::embed, nsnull,                                     kNameSpaceID_None,                                    *getter_AddRefs(nodeInfo));  NS_ENSURE_SUCCESS(rv, rv);  rv = NS_NewHTMLSharedLeafElement(getter_AddRefs(mPluginContent), nodeInfo);  if (NS_FAILED(rv)) {    return rv;  }  mPluginContent->SetDocument(this, PR_FALSE, PR_TRUE);  // make it a named element  nsHTMLValue name(NS_ConvertUTF8toUCS2("plugin"));  mPluginContent->SetHTMLAttribute(nsHTMLAtoms::name, name, PR_FALSE);  // fill viewport and auto-reize  nsHTMLValue percent100 ((float)1.0);  mPluginContent->SetHTMLAttribute(nsHTMLAtoms::width, percent100, PR_FALSE);  mPluginContent->SetHTMLAttribute(nsHTMLAtoms::height, percent100, PR_FALSE);  // set URL  nsCAutoString src;  mDocumentURL->GetSpec(src);  NS_ConvertUTF8toUCS2 srcString(src);  nsHTMLValue val(srcString);  mPluginContent->SetHTMLAttribute(nsHTMLAtoms::src, val, PR_FALSE);  // set mime type  val.SetStringValue(NS_ConvertUTF8toUCS2(mMimeType));  mPluginContent->SetHTMLAttribute(nsHTMLAtoms::type, val, PR_FALSE);  body->AppendChildTo(mPluginContent, PR_FALSE, PR_FALSE);  return NS_OK;}