nsresult rv = NS_NewHTMLTableRowElement(&rowContent, nsHTMLAtoms::tr);
nsCOMPtr<nsINodeInfo> nodeInfo; mInner.mNodeInfo->NameChanged(nsHTMLAtoms::tr, *getter_AddRefs(nodeInfo));  nsresult rv = NS_NewHTMLTableRowElement(&rowContent, nodeInfo);
nsHTMLTableSectionElement::InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aValue){  *aValue = nsnull;  nsCOMPtr<nsIDOMHTMLCollection> rows;  GetRows(getter_AddRefs(rows));  PRUint32 rowCount;  rows->GetLength(&rowCount);  PRBool doInsert = (aIndex < PRInt32(rowCount));  // create the row  nsIHTMLContent* rowContent = nsnull;  nsresult rv = NS_NewHTMLTableRowElement(&rowContent, nsHTMLAtoms::tr);  if (NS_SUCCEEDED(rv) && (nsnull != rowContent)) {    nsIDOMNode* rowNode = nsnull;    rv = rowContent->QueryInterface(kIDOMNodeIID, (void **)&rowNode);     if (NS_SUCCEEDED(rv) && (nsnull != rowNode)) {      if (doInsert) {        PRInt32 refIndex = PR_MAX(aIndex, 0);           nsCOMPtr<nsIDOMNode> refRow;        rows->Item(refIndex, getter_AddRefs(refRow));        rv = InsertBefore(rowNode, refRow, (nsIDOMNode **)aValue);      } else {        rv = AppendChild(rowNode, (nsIDOMNode **)aValue);      }      NS_RELEASE(rowNode);    }    NS_RELEASE(rowContent);  }   return NS_OK;}