Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
46b78c5d
Commit
46b78c5d
authored
Aug 30, 2023
by
Connor McAdams
Committed by
Alexandre Julliard
Sep 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Don't return oleacc proxy IAccessibles from GetIAccessible for MSAA providers.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
00799933
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
7 deletions
+27
-7
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+7
-0
uia_provider.c
dlls/uiautomationcore/uia_provider.c
+20
-7
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
46b78c5d
...
...
@@ -3474,6 +3474,12 @@ static void test_uia_prov_from_acc_fragment_root(HWND hwnd)
CHECK_CALLED
(
winproc_GETOBJECT_CLIENT
);
/*
* ILegacyIAccessibleProvider::GetIAccessible returns a NULL
* IAccessible if the provider represents an oleacc proxy.
*/
check_msaa_prov_acc
(
elroot
,
NULL
,
CHILDID_SELF
);
/*
* Returns a provider from get_HostRawElementProvider without having
* to query the HWND.
*/
...
...
@@ -3494,6 +3500,7 @@ static void test_uia_prov_from_acc_fragment_root(HWND hwnd)
IRawElementProviderFragment_Release
(
elfrag2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
elroot2
,
"elroot2 == NULL
\n
"
);
check_msaa_prov_acc
(
elroot2
,
NULL
,
CHILDID_SELF
);
CHECK_CALLED
(
winproc_GETOBJECT_CLIENT
);
ok
(
!
iface_cmp
((
IUnknown
*
)
elroot
,
(
IUnknown
*
)
elroot2
),
"elroot2 == elroot
\n
"
);
...
...
dlls/uiautomationcore/uia_provider.c
View file @
46b78c5d
...
...
@@ -84,6 +84,21 @@ static IAccessible *msaa_acc_da_unwrap(IAccessible *acc)
return
acc
;
}
static
BOOL
msaa_acc_is_oleacc_proxy
(
IAccessible
*
acc
)
{
IUnknown
*
unk
;
HRESULT
hr
;
hr
=
msaa_acc_get_service
(
acc
,
&
IIS_IsOleaccProxy
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
if
(
SUCCEEDED
(
hr
)
&&
unk
)
{
IUnknown_Release
(
unk
);
return
TRUE
;
}
return
FALSE
;
}
/*
* Compare role, state, child count, and location properties of the two
* IAccessibles. If all four are successfully retrieved and are equal, this is
...
...
@@ -1103,10 +1118,11 @@ static HRESULT WINAPI msaa_acc_provider_GetIAccessible(ILegacyIAccessibleProvide
TRACE
(
"%p, %p
\n
"
,
iface
,
out_acc
);
IAccessible_AddRef
(
msaa_prov
->
acc
);
*
out_acc
=
msaa_prov
->
acc
;
*
out_acc
=
NULL
;
if
(
msaa_acc_is_oleacc_proxy
(
msaa_prov
->
acc
))
return
S_OK
;
return
S_OK
;
return
IAccessible_QueryInterface
(
msaa_prov
->
acc
,
&
IID_IAccessible
,
(
void
**
)
out_acc
)
;
}
static
HRESULT
WINAPI
msaa_acc_provider_get_ChildId
(
ILegacyIAccessibleProvider
*
iface
,
int
*
out_cid
)
...
...
@@ -1252,7 +1268,6 @@ HRESULT WINAPI UiaProviderFromIAccessible(IAccessible *acc, LONG child_id, DWORD
IRawElementProviderSimple
**
elprov
)
{
HWND
hwnd
=
NULL
;
IUnknown
*
unk
;
HRESULT
hr
;
TRACE
(
"(%p, %ld, %#lx, %p)
\n
"
,
acc
,
child_id
,
flags
,
elprov
);
...
...
@@ -1271,11 +1286,9 @@ HRESULT WINAPI UiaProviderFromIAccessible(IAccessible *acc, LONG child_id, DWORD
return
E_NOTIMPL
;
}
hr
=
msaa_acc_get_service
(
acc
,
&
IIS_IsOleaccProxy
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
if
(
SUCCEEDED
(
hr
)
&&
unk
)
if
(
msaa_acc_is_oleacc_proxy
(
acc
))
{
WARN
(
"Cannot wrap an oleacc proxy IAccessible!
\n
"
);
IUnknown_Release
(
unk
);
return
E_INVALIDARG
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment