nsresult res = nsGenericHTMLContainerFormElement::AppendChildTo(aKid, aNotify, aDeepSetDocument); if (NS_SUCCEEDED(res)) { PRInt32 numChildren; ChildCount(numChildren);
PRInt32 count = 0; ChildCount(count); WillAddOptions(aKid, this, count);
nsHTMLSelectElement::AppendChildTo(nsIContent* aKid, PRBool aNotify,                                   PRBool aDeepSetDocument) {  nsresult res = nsGenericHTMLContainerFormElement::AppendChildTo(aKid,                                                                  aNotify,                                                                  aDeepSetDocument);  if (NS_SUCCEEDED(res)) {    PRInt32 numChildren;    ChildCount(numChildren);    // this is effectively where we added it.  May not be the same as    // mOptions->GetLength if there are <optgroup>s    res = AddOptionIndexed(aKid, numChildren-1);  }  return res;}