mNodeInfo->NameChanged(nsHTMLAtoms::thead, *getter_AddRefs(nodeInfo));
mNodeInfo->NameChanged(nsHTMLAtoms::thead, getter_AddRefs(nodeInfo));
nsHTMLTableElement::CreateTHead(nsIDOMHTMLElement** aValue){  *aValue = nsnull;  nsresult rv = NS_OK;  nsCOMPtr<nsIDOMHTMLTableSectionElement> head;  GetTHead(getter_AddRefs(head));  if (head) { // return the existing thead    CallQueryInterface(head, aValue);    NS_ASSERTION(*aValue, "head must be a DOMHTMLElement");  }  else  { // create a new head rowgroup    nsCOMPtr<nsIHTMLContent> newHead;    nsCOMPtr<nsINodeInfo> nodeInfo;    mNodeInfo->NameChanged(nsHTMLAtoms::thead, *getter_AddRefs(nodeInfo));    rv = NS_NewHTMLTableSectionElement(getter_AddRefs(newHead),nodeInfo);    if (NS_SUCCEEDED(rv) && newHead) {      nsCOMPtr<nsIDOMNode> child;      rv = GetFirstChild(getter_AddRefs(child));      if (NS_FAILED(rv)) {        return rv;      }      CallQueryInterface(newHead, aValue);      nsCOMPtr<nsIDOMNode> resultChild;      rv = InsertBefore(*aValue, child, getter_AddRefs(resultChild));    }  }  return NS_OK;}