nsIFormControlFrame* selectFrame = nsnull; nsresult result = nsGenericHTMLElement::GetPrimaryFrame(this, selectFrame); if (NS_SUCCEEDED(result) && (nsnull != selectFrame)) { nsString action("r"); action.Append(index,10); selectFrame->SetProperty(nsHTMLAtoms::option, action); }  return result;
nsHTMLSelectElement::RemoveOption(nsIContent* aContent){  // 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  PRInt32 index = mOptions->IndexOf(aContent);  if (nsnull != mOptions) {    mOptions->RemoveOption(aContent);  }  // Update the widget  nsIFormControlFrame* selectFrame = nsnull;  nsresult result = nsGenericHTMLElement::GetPrimaryFrame(this, selectFrame);  if (NS_SUCCEEDED(result) && (nsnull != selectFrame)) {    nsString action("r");    action.Append(index,10);    selectFrame->SetProperty(nsHTMLAtoms::option, action);  }  return result;}