if (aLevel == 0) { mArtifactsAtTopLevel--;
if (aDepth == 0) { mNonOptionChildren--;
nsHTMLSelectElement::RemoveOptionsFromListRecurse(nsIContent* aOptions,                                                  PRInt32 aRemoveIndex,                                                  PRInt32* aNumRemoved,                                                  PRInt32 aLevel) {  // We *assume* here that someone's brain has not gone horribly  // wrong by putting <option> inside of <option>.  I'm sorry, I'm  // just not going to look for an option inside of an option.  // Sue me.  nsCOMPtr<nsIDOMHTMLOptionElement> optElement(do_QueryInterface(aOptions));  if (optElement) {    mOptions->RemoveElementAt(aRemoveIndex);    (*aNumRemoved)++;    return NS_OK;  }  // Yay, one less artifact at the top level.  if (aLevel == 0) {    mArtifactsAtTopLevel--;  }  if (mOptGroupCount) {    nsCOMPtr<nsIAtom> tag;    aOptions->GetTag(*getter_AddRefs(tag));    if (tag == nsHTMLAtoms::optgroup) {      mOptGroupCount--;      DispatchDOMEvent(NS_LITERAL_STRING("selectHasNoGroups"));    }  }  // Recurse down deeper for options  //  // I *would* put a restriction in here to only search under  // optgroups (and not, for example, <P></P>), but it really  // doesn't *hurt* to search under other stuff and it's more  // efficient in the normal only-optgroup-and-option case  // (one less QueryInterface).  PRInt32 numChildren;  aOptions->ChildCount(numChildren);  nsCOMPtr<nsIContent> child;  for (PRInt32 i=0;i<numChildren;i++) {    aOptions->ChildAt(i,*getter_AddRefs(child));    RemoveOptionsFromListRecurse(child, aRemoveIndex, aNumRemoved, aLevel+1);  }  return NS_OK;}