mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
bug241055 nsHTMLTextFieldAccessible need "ATK_STATE_EDITABLE" state and "Activate" action.
r = pkw sr= henry
This commit is contained in:
parent
8d71634ad7
commit
9073488b1a
@ -9,3 +9,4 @@ switch = Switch
|
||||
click = Click
|
||||
collapse= Collapse
|
||||
expand = Expand
|
||||
activate= Activate
|
||||
|
@ -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 -----
|
||||
|
||||
/*
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user