Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded UI Automation client-side proxies #3800

Closed
nvaccessAuto opened this issue Jan 22, 2014 · 10 comments
Closed

Remove unneeded UI Automation client-side proxies #3800

nvaccessAuto opened this issue Jan 22, 2014 · 10 comments

Comments

@nvaccessAuto
Copy link

@nvaccessAuto nvaccessAuto commented Jan 22, 2014

Reported by mdcurran on 2014-01-22 05:39
By default the UI Automation client library provides proxies that generate UI Automation elements and events for controls that do not support UI Automation from the remote side. As NVDA only uses UI Automation from windows that specifically state that they have a UI Automation implementation, it never uses these proxied elements or events. In fact they just waste resources while we filter them out.
Therefore, we should remove these proxies from NVDA's UI Automation client library instance.
However, we do need to keep the treeview proxy as we rely on that for SysTreeview32 in some specific situations.
For reference, the proxies that come by default include a bunch of non-control proxies (no doubt just to hide certain windows from UI Automation's control view), some richEdit and edit proxies, two listview proxies, a treeview proxy, and a general MSAA proxy. Excluding the treeview proxy, we do not need any of the others as we filter out UI Automation in those situations.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 22, 2014

Comment 1 by Michael Curran <mick@... on 2014-01-22 05:41
In [0adf25b]:

Merge branch 't3800' into next. Incubates #3800

Changes:
Added labels: incubating

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 22, 2014

Comment 3 by jteh on 2014-01-22 06:42
Tiny nit in your code: you can create a set using brace notation, rather than creating a list; e.g.

{'foo'}
@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 22, 2014

Comment 4 by jteh on 2014-01-22 09:51
I think this is breaking the tab control in Windows 8.1 Task Manager. It is a SysTabControl32, but it reports as a UIA window. I'm guessing there must be a way for a native UIA provider to fall back to the proxy for children. I now vaguely recall seeing this somewhere in the past, but i don't remember where.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 23, 2014

Comment 5 by James Teh <jamie@... on 2014-01-23 07:34
In [dc040b9]:

Merge branch 't3800' into next

Incubates #3800.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Feb 13, 2014

Comment 6 by jteh on 2014-02-13 15:35
The overridden MSAA proxy factory seems to break access to the text pattern in MSHTML. While we don't use UIA for MSHTML at present anyway, we might need to partially use it for #3853.

Looking at the provider description, the only difference is that the process id with our overridden proxy factory is NVDA's process id, whereas it is MSHTML's process id for the unmodified proxy factory. This suggests that the in-process part of the proxy doesn't get used when we override it, even though we're just forwarding CreateProvider to the original factory. Either I've missed something or the stock proxies do something internal that we can't emulate.

Regardless, this will probably break anything which uses IAccessibleEx, etc.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Apr 2, 2014

Comment 7 by jteh on 2014-04-02 04:56
I found a way to get the in-process proxy to work (9961733), but when I do that, it is almost always used, bypassing our custom proxy. Therefore, we're going to just leave the MSAA proxy alone. I've put that commit in a branch called abandoned-t3800, as it might be useful for reference one day.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Apr 2, 2014

Comment 8 by James Teh <jamie@... on 2014-04-02 04:56
In [43e1984]:

Revert "Some native UIA implementations seem to depend on the MSAA proxy, so provide an overridden MSAA proxy that only handles windows for which NVDA uses UIA."

This reverts commit 8f610721a94000b31d0298231d64df3062d27988.
Re #3800.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Apr 2, 2014

Comment 9 by James Teh <jamie@... on 2014-04-02 04:56
In [4849a4f]:

Merge branch 't3800' into next

Incubates #3800.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Apr 18, 2014

Comment 10 by James Teh <jamie@... on 2014-04-18 08:30
In [c628cb8]:

Revert t3800 (removal of most UI Automation client-side proxies).

This was causing freezes in Chicken Nugget and possibly other issues. This was probably due to the MSAA proxy being used for controls for which it isn't normally used.
This idea doesn't really solve what it was intended to solve anyway, as we can't stop the MSAA proxy from being used when we don't use UIA without breaking cases where it is needed.
Reverts e1abd8aa5 388d0b3f 59f3211f.
Fixes #4058. Re #3800.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Apr 18, 2014

Comment 11 by jteh on 2014-04-18 08:32
Changes:
Milestone changed from next to None
Removed labels: incubating
Added labels: wontfix
State: closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.