PRInt32 type; aChild->GetType(&type); if (type == NS_FORM_INPUT_RADIO) { nsCOMPtr<nsIRadioControlElement> radio = do_QueryInterface(aChild); nsresult rv = radio->RemovedFromRadioGroup(this, nsnull); NS_ENSURE_SUCCESS(rv, rv); }
nsHTMLFormElement::RemoveElement(nsIFormControl* aChild) {  NS_ENSURE_TRUE(mControls, NS_ERROR_UNEXPECTED);  mControls->mElements.RemoveElement(aChild);  if (mControls->mNotInElements) {    nsISupportsKey key(aChild);    mControls->mNotInElements->Remove(&key);  }  return NS_OK;}