if (!mForm && !mDocument) {
if (!mForm && !(mDocument && mParent)) {
nsHTMLInputElement::WillRemoveFromRadioGroup(){  //  // If the input element is not in a form and  // not in a document, we just need to return.  //  if (!mForm && !mDocument) {    return NS_OK;  }  //  // If this button was checked, we need to notify the group that there is no  // longer a selected radio button  //  PRBool checked = PR_FALSE;  GetChecked(&checked);  nsAutoString name;  PRBool gotName = PR_FALSE;  if (checked) {    if (!gotName) {      if (!GetNameIfExists(name)) {        // If the name doesn't exist, nothing is going to happen anyway        return NS_OK;      }      gotName = PR_TRUE;    }    nsCOMPtr<nsIRadioGroupContainer> container = GetRadioGroupContainer();    if (container) {      container->SetCurrentRadioButton(name, nsnull);    }  }    //  // Remove this radio from its group in the container  //  nsCOMPtr<nsIRadioGroupContainer> container = GetRadioGroupContainer();  if (container) {    if (!gotName) {      if (!GetNameIfExists(name)) {        // If the name doesn't exist, nothing is going to happen anyway        return NS_OK;      }      gotName = PR_TRUE;    }    container->RemoveFromRadioGroup(name,                                    NS_STATIC_CAST(nsIFormControl*, this));  }  return NS_OK;}