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
Родитель f87ae16969
Коммит 954f6c0467
3 изменённых файлов: 32 добавлений и 11 удалений

Просмотреть файл

@ -1,11 +0,0 @@
jump = Jump
press = Press
check = Check
uncheck = Uncheck
select = Select
open = Open
close = Close
switch = Switch
click = Click
collapse= Collapse
expand = Expand

Просмотреть файл

@ -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