if (aNewSelected->mValues.Contains(value)) {
if (aNewSelected->ContainsOption(i, value)) {
nsHTMLSelectElement::RestoreStateTo(nsSelectState* aNewSelected){  if (!mIsDoneAddingChildren) {    mRestoreState = aNewSelected;    NS_ADDREF(mRestoreState);    return;  }  PRUint32 len;  GetLength(&len);  // First clear all  SetOptionsSelectedByIndex(-1, -1, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, nsnull);  // Next set the proper ones  for (PRInt32 i = 0; i < (PRInt32)len; i++) {    nsCOMPtr<nsIDOMHTMLOptionElement> option;    mOptions->ItemAsOption(i, getter_AddRefs(option));    if (option) {      nsAutoString value;      option->GetValue(value);      if (aNewSelected->mValues.Contains(value)) {        SetOptionsSelectedByIndex(i, i, PR_TRUE, PR_FALSE, PR_TRUE, PR_TRUE, nsnull);      }    }  }  //CheckSelectSomething();}