bug241055 nsHTMLTextFieldAccessible need "ATK_STATE_EDITABLE" state and "Activate" action.

r = pkw
sr= henry
This commit is contained in:
louie.zhao%sun.com 2004-06-01 05:25:00 +00:00
parent 8d71634ad7
commit 9073488b1a
3 changed files with 33 additions and 0 deletions

View File

@ -9,3 +9,4 @@ switch = Switch
click = Click
collapse= Collapse
expand = Expand
activate= Activate

View File

@ -415,6 +415,35 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetState(PRUint32 *_retval)
return NS_OK;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("activate"), _retval);
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::DoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(mDOMNode));
if ( element )
{
element->Focus();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
// --- groupbox -----
/*

View File

@ -99,6 +99,9 @@ public:
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetValue(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD DoAction(PRUint8 index);
};
class nsHTMLGroupboxAccessible : public nsAccessibleWrap