WillRemoveOptions(this, aIndex); WillAddOptions(aKid, this, aIndex);  return nsGenericHTMLFormElement::ReplaceChildAt(aKid, aIndex, aNotify, aDeepSetDocument);
nsCOMPtr<nsIContent> content; if (NS_SUCCEEDED(ChildAt(aIndex, *getter_AddRefs(content)))) { RemoveOption(content); } nsresult res = mInner.ReplaceChildAt(aKid, aIndex, aNotify); if (NS_SUCCEEDED(res)) { AddOption(aKid); } return res;
nsHTMLSelectElement::ReplaceChildAt(nsIContent* aKid, PRUint32 aIndex,                                    PRBool aNotify, PRBool aDeepSetDocument){  WillRemoveOptions(this, aIndex);  WillAddOptions(aKid, this, aIndex);  return nsGenericHTMLFormElement::ReplaceChildAt(aKid, aIndex, aNotify,                                                  aDeepSetDocument);}