PRBool isMultiple; nsresult rv = GetMultiple(&isMultiple); NS_ENSURE_SUCCESS(rv, rv);
PRUint32 numSelected = 0;
nsHTMLSelectElement::Reset(){  PRBool isMultiple;  nsresult rv = GetMultiple(&isMultiple);  NS_ENSURE_SUCCESS(rv, rv);  PRUint32 count = 0;  PRUint32 numOptions;  rv = GetLength(&numOptions);  NS_ENSURE_SUCCESS(rv, rv);  for (PRUint32 i = 0; i < numOptions; i++) {    nsCOMPtr<nsIDOMNode> node;    rv = Item(i, getter_AddRefs(node));    NS_ENSURE_SUCCESS(rv, rv);    nsCOMPtr<nsIDOMHTMLOptionElement> option(do_QueryInterface(node));    NS_ASSERTION(option, "option not an OptionElement");    if (option) {      InitializeOption(option, &count);    }  }  PRInt32 size = 1;  GetSize(&size);  if (count == 0 && !isMultiple && size <= 1) {    SelectSomething();  }  // Don't flush, if there's no frame yet it won't care about us being  // reset even if we forced it to be created now.  nsIFormControlFrame* formControlFrame = GetFormControlFrame(PR_FALSE);  if (formControlFrame) {    formControlFrame->OnContentReset();  }  return NS_OK;}