nsHTMLSelectElement::RemoveOption(nsIContent* aContent)
nsOptionList::RemoveOption(nsIContent* aOption)
nsHTMLSelectElement::RemoveOption(nsIContent* aContent){  // When first populating the select, this will be null but that's ok  // as we will manually update the widget at frame construction time.  if (!mOptions) return NS_OK;  PRInt32 oldIndex = mOptions->IndexOf(aContent);  // Remove the option from the options list  mOptions->RemoveOption(aContent);  // Update the widget  nsIFormControlFrame* fcFrame = nsnull;  nsresult result = nsGenericHTMLElement::GetPrimaryFrame(this, fcFrame);  if (NS_SUCCEEDED(result) && (nsnull != fcFrame)) {    nsISelectControlFrame* selectFrame = nsnull;    result = fcFrame->QueryInterface(nsISelectControlFrame::GetIID(),(void **) &selectFrame);    if (NS_SUCCEEDED(result) && (nsnull != selectFrame)) {      // We can't get our index if we've already been replaced in the OptionList.      // If we couldn't get our index, pass -1, remove all options and recreate      // Coincidentally, IndexOf returns -1 if the option isn't found in the list      result = selectFrame->RemoveOption(oldIndex);    }  }  return result;}