nsIFormControlFrame* formControlFrame = nsnull;   GetPrimaryFrame(formControlFrame, PR_FALSE);  if (formControlFrame) { PRInt32 indx;  GetIndex(&indx);  if (indx >= 0) { nsAutoString value;  value.AppendInt(indx, 10);  formControlFrame->GetProperty(nsHTMLAtoms::selected, value);  *aValue = value.EqualsWithConversion("1"); } } else {    nsCOMPtr<nsIDOMNode> parentNode; GetParentNode(getter_AddRefs(parentNode));  nsCOMPtr<nsISelectElement> selectElement(do_QueryInterface(parentNode));  if (selectElement) { return selectElement->IsOptionSelected(this, aValue); } }  return NS_OK;
return GetSelectedInternal(aValue);
nsHTMLOptionElement::GetSelected(PRBool* aValue) {  NS_ENSURE_ARG_POINTER(aValue);  *aValue = PR_FALSE;  nsIFormControlFrame* formControlFrame = nsnull;  // DO NOT flush pending reflows here  GetPrimaryFrame(formControlFrame, PR_FALSE);  if (formControlFrame) {    PRInt32 indx;    GetIndex(&indx);    if (indx >= 0) {      nsAutoString value;      value.AppendInt(indx, 10); // Save the index in base 10      formControlFrame->GetProperty(nsHTMLAtoms::selected, value);      *aValue = value.EqualsWithConversion("1");    }  } else {    // Note: The select content obj maintains all the PresState    // so defer to it to get the answer    nsCOMPtr<nsIDOMNode> parentNode;    GetParentNode(getter_AddRefs(parentNode));    nsCOMPtr<nsISelectElement> selectElement(do_QueryInterface(parentNode));    if (selectElement) {      return selectElement->IsOptionSelected(this, aValue);    }  }  return NS_OK;}