Bug 391562. Pass aExtraState as nsnull to GetFinalState() if not needed. r=surkov, a=dsicore

This commit is contained in:
aaronleventhal@moonset.net 2007-08-29 06:41:38 -07:00
parent 77dadd7d29
commit 31f525c91f
4 changed files with 6 additions and 6 deletions

View File

@ -792,7 +792,7 @@ GetAttributeSet(nsIAccessible* aAccessible)
if (attributes) {
// Deal with attributes that we only need to expose in ATK
PRUint32 state, extraState;
aAccessible->GetFinalState(&state, &extraState);
aAccessible->GetFinalState(&state, nsnull);
if (state & nsIAccessibleStates::STATE_HASPOPUP) {
// There is no ATK state for haspopup, must use object attribute to expose the same info
nsAutoString oldValueUnused;

View File

@ -359,7 +359,7 @@ nsAccStateChangeEvent::
nsCOMPtr<nsIAccessible> accessible(GetAccessibleByNode());
if (accessible) {
PRUint32 state = 0, extraState = 0;
accessible->GetFinalState(&state, &extraState);
accessible->GetFinalState(&state, mIsExtraState ? &extraState : nsnull);
mIsEnabled = ((mIsExtraState ? extraState : state) & mState) != 0;
} else {
mIsEnabled = PR_FALSE;

View File

@ -88,8 +88,8 @@ CAccessibleComponent::get_locationInParent(long *aX, long *aY)
return E_FAIL;
// If the object is not on any screen the returned position is (0,0).
PRUint32 states = 0, extraStates = 0;
nsresult rv = acc->GetFinalState(&states, &extraStates);
PRUint32 states = 0;
nsresult rv = acc->GetFinalState(&states, nsnull);
if (NS_FAILED(rv))
return E_FAIL;

View File

@ -498,8 +498,8 @@ STDMETHODIMP nsAccessibleWrap::get_accState(
if (!xpAccessible)
return E_FAIL;
PRUint32 state = 0, extraState;
if (NS_FAILED(xpAccessible->GetFinalState(&state, &extraState)))
PRUint32 state = 0;
if (NS_FAILED(xpAccessible->GetFinalState(&state, nsnull)))
return E_FAIL;
pvarState->lVal = state;