Skip to content

Commit

Permalink
Bug 1417327 part 3: Accessible handler: Fix cache for IAccessible::ac…
Browse files Browse the repository at this point in the history
…cDefaultAction and use it for IAccessibleAction::name(0). r=MarcoZ

1. Bug 1363595 added support for retrieving accDefaultAction from the cache, but the value was never cached in the first place.
This would have meant that accDefaultAction was returning nothing to clients.

2. Since accDefaultAction is the name of the first action, we can also use this cached value for IAccessibleAction::name for index 0.

MozReview-Commit-ID: 6PGRH45kKdB

UltraBlame original commit: f9111cd04f8cc3b2e7a3c559b8284c0525c7c098
  • Loading branch information
marco-c committed Oct 2, 2019
1 parent 3be96ed commit 3b1fbc9
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
26 changes: 26 additions & 0 deletions accessible/ipc/win/HandlerProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1758,6 +1758,32 @@ hr
target
-
>
get_accDefaultAction
(
kChildIdSelf
&
aOutIA2Data
-
>
mDefaultAction
)
;
if
(
FAILED
(
hr
)
)
{
return
;
}
hr
=
target
-
>
get_accChildCount
(
&
Expand Down
83 changes: 83 additions & 0 deletions accessible/ipc/win/handler/AccessibleHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5934,6 +5934,89 @@ BSTR
name
)
{
if
(
!
name
)
{
return
E_INVALIDARG
;
}
if
(
HasPayload
(
)
)
{
if
(
actionIndex
>
=
mCachedData
.
mDynamicData
.
mNActions
)
{
/
/
Action
does
not
exist
.
return
E_INVALIDARG
;
}
if
(
actionIndex
=
=
0
)
{
/
/
same
as
accDefaultAction
.
GET_BSTR
(
mDefaultAction
*
name
)
;
return
S_OK
;
}
}
/
/
At
this
point
there
'
s
either
no
payload
or
actionIndex
is
>
0
.
HRESULT
hr
=
Expand Down

0 comments on commit 3b1fbc9

Please sign in to comment.