Bug 332540 Text field can not be grabbed by GOK in firefox.

r=aaronleventhal sr=roc
This commit is contained in:
ginn.chen%sun.com 2006-04-10 06:13:28 +00:00
parent 2c653c4861
commit 72e6990032
4 changed files with 15 additions and 1 deletions

View File

@ -573,7 +573,7 @@ nsAccessibleWrap::TranslateStates(PRUint32 aState, PRUint32 aExtState, void *aAt
if (aExtState & nsIAccessible::EXT_STATE_VERTICAL)
atk_state_set_add_state (state_set, ATK_STATE_VERTICAL);
if (aState & nsIAccessible::EXT_STATE_EDITABLE)
if (aExtState & nsIAccessible::EXT_STATE_EDITABLE)
atk_state_set_add_state (state_set, ATK_STATE_EDITABLE);
}

View File

@ -76,6 +76,8 @@ NS_IMETHODIMP nsHTMLTextFieldAccessibleWrap::GetRole(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLTextFieldAccessibleWrap::GetExtState(PRUint32 *aState)
{
nsresult rv;
nsAccessibleWrap::GetExtState(aState);
nsCOMPtr<nsIDOMHTMLInputElement> htmlFormElement(do_QueryInterface(mDOMNode, &rv));
if (NS_SUCCEEDED(rv) && htmlFormElement) {
nsAutoString typeString;

View File

@ -146,6 +146,17 @@ NS_IMETHODIMP nsXULTextFieldAccessibleWrap::GetRole(PRUint32 *aRole)
return NS_OK;
}
NS_IMETHODIMP nsXULTextFieldAccessibleWrap::GetExtState(PRUint32 *aExtState)
{
nsAccessibleWrap::GetExtState(aExtState);
PRUint32 state;
nsXULTextFieldAccessible::GetState(&state);
if (!(state & STATE_READONLY))
*aExtState |= EXT_STATE_EDITABLE;
return NS_OK;
}
NS_IMETHODIMP nsXULTextFieldAccessibleWrap::Shutdown()
{
nsAccessibleEditableText::ShutdownEditor();

View File

@ -64,6 +64,7 @@ public:
nsXULTextFieldAccessibleWrap(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetRole(PRUint32* aRole);
NS_IMETHOD GetExtState(PRUint32 *aExtState);
NS_IMETHOD Shutdown();
};