NS_IMPL_STRING_ATTR(nsHTMLSelectElement, Value, value)
nsHTMLSelectElement::SetValue(const nsAString& aValue) { nsresult rv = NS_OK;  PRUint32 length; rv = GetLength(&length); if (NS_SUCCEEDED(rv)) { PRUint32 i; for (i = 0; i < length; i++) { nsCOMPtr<nsIDOMNode> node;  rv = Item(i, getter_AddRefs(node));  if (NS_SUCCEEDED(rv) && node) { nsCOMPtr<nsIDOMHTMLOptionElement> option = do_QueryInterface(node);  if (option) { nsAutoString optionVal;  option->GetValue(optionVal);  if (optionVal.Equals(aValue)) { SetSelectedIndex((PRInt32)i);  break; } } } } }  return rv; }
NS_IMPL_STRING_ATTR(nsHTMLSelectElement, Value, value)