nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode)); if ( select ) { PRBool multiple; select->GetMultiple(&multiple); if ( multiple ) *_retval |= STATE_MULTISELECTABLE | STATE_EXTSELECTABLE;
*_retval = 0; nsCOMPtr<nsIDOMNode> focusedOptionNode, parentNode; mParent->AccGetDOMNode(getter_AddRefs(parentNode)); GetFocusedOptionNode(mPresShell, parentNode, focusedOptionNode); if (focusedOptionNode == mDOMNode) *_retval |= STATE_FOCUSED;   nsCOMPtr<nsIDOMHTMLOptionElement> option (do_QueryInterface(mDOMNode)); if ( option ) { PRBool isSelected = PR_FALSE; option->GetSelected(&isSelected); if ( isSelected ) *_retval |= STATE_SELECTED;
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccState(PRUint32 *_retval){  nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));  if ( select ) {    PRBool multiple;    select->GetMultiple(&multiple);    if ( multiple )      *_retval |= STATE_MULTISELECTABLE | STATE_EXTSELECTABLE;  }  return NS_OK;}