Commit graph

560 commits

Author SHA1 Message Date
James Teh
a1b5690620 Bug 1468128: Use an extra bit for the content process portion of MSAA unique ids. r=aklotz
This allows us to support 255 content processes instead of 127.
It also means we have 1 less bit for the Accessible portion of the id, which means we can support less Accessibles per process.
Hopefully, this shouldn't be a problem, especially with Fission generally meaning less documents per process.

Differential Revision: https://phabricator.services.mozilla.com/D104344
2021-09-15 02:21:11 +00:00
Eitan Isaacson
cf78c1b158 Bug 1728442 - P5: Use unified description method in xpcom and platforms. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124237
2021-09-02 18:06:53 +00:00
Eitan Isaacson
251ad4f476 Bug 1727643 - P4: Make use of new common methods in platforms and XPCOM. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123698
2021-08-26 19:40:06 +00:00
Andi-Bogdan Postelnicu
2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Morgan Reschenberg
c55f522302 Bug 1726695: Add support for RemoteAccessible's in MsaaAccessible::get_accName r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D123258
2021-08-23 15:39:50 +00:00
James Teh
299944292f Bug 1725894: Support IEnumVARIANT for RemoteAccessible when the cache is enabled. r=morgan
As part of this, I changed RemoteAccessible::RemoteChildAt (and thus RemoteAccessible::ChildAt) so it doesn't crash when passed an invalid child index.
Our EnumVariant implementation relied on this with LocalChildAt.
I think it makes sense for LocalChildAt, RemoteChildAt and ChildAt to be consistent in this regard.

Differential Revision: https://phabricator.services.mozilla.com/D122681
2021-08-17 11:17:50 +00:00
James Teh
6b226a31b2 Bug 1725449: Don't support IEnumVARIANT for local OuterDocAccessibles with remote children when the cache isn't enabled. r=morgan
Prior to this patch, we reported that we supported IEnumVARIANT, but it wouldn't return any children, causing the oleacc AccessibleChildren function to report no children to clients.
This is tricky to support due to the special COM proxy stuff we have to do for remote children without the cache.
There's no benefit to IEnumVARIANT with only one child anyway, so it's easiest to just say we don't support it.
The oleacc AccessibleChildren function will detect this and fall back to IAccessible::get_accChild instead.

I also took the opportunity to fix a slightly related outdated comment I spotted while figuring out the fix here.

Differential Revision: https://phabricator.services.mozilla.com/D122674
2021-08-17 00:43:06 +00:00
James Teh
ca92a8ae5a Bug 1715230 part 6: Remove IsProxy() checks throughout the Windows a11y code. r=morgan
Now that ProxyWrappers (RemoteAccessibleWrap and friends) are gone, IsProxy() can never be true, so checking it is pointless.

Differential Revision: https://phabricator.services.mozilla.com/D117536
2021-07-19 03:44:11 +00:00
James Teh
5aa62c8d87 Bug 1715230 part 5: Remove Windows ProxyWrappers! r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D117529
2021-07-19 03:44:11 +00:00
James Teh
dca5bf0440 Bug 1715230 part 4: Stop using RemoteAccessibleWrap! r=morgan
Previously, when the cache was disabled, we had a RemoteAccessibleWrap for every RemoteAccessible.
This is no longer necessary and now only serves as an extra level of indirection and memory waste.
We still keep the stub MsaaAccessible to hold the id sent up from content.

Differential Revision: https://phabricator.services.mozilla.com/D117528
2021-07-19 03:44:10 +00:00
James Teh
00a413fd6b Bug 1715230 part 3: Change AccessibleWrap::DispatchTextChangeToHandler to a static method accepting an Accessible*. r=morgan
In a subsequent patch, we want to call it with a RemoteAccessible instead of a RemoteAccessibleWrap.
As an instance method of AccessibleWrap, this wouldn't be possible because AccessibleWrap is a subclass of LocalAccessible.
Strictly speaking, there's no good reason for this to be part of AccessibleWrap at all any more, but I'm not dealing with that here.

Differential Revision: https://phabricator.services.mozilla.com/D117527
2021-07-19 03:44:10 +00:00
James Teh
e8bf6a16fd Bug 1715230 part 2: Stop using RemoteIframeDocRemoteAccessibleWrap. r=morgan
This was previously used to wrap the COM proxy for the document child of an OOP iframe in a content process.
It was returned by OuterDocAccessible::LocalChildAt*.
Instead, BrowserBridgeChild now directly holds the COM proxy and MsaaAccessible traversal methods have specific code paths to return that as appropriate.

Since we no longer need the Windows OuterDocAccessible traversal overrides for OOP iframes nor remote top level documents, they have been removed entirely.

Differential Revision: https://phabricator.services.mozilla.com/D117526
2021-07-19 03:44:10 +00:00
James Teh
24d163d44a Bug 1715230 part 1: Make IAccessible::accHitTest use the unified Accessible hierarchy. r=morgan
It still can't handle being called on a RemoteAccessible because Bounds isn't unified yet.
However, this allows it to be called on a local OuterDoc (a XUL browser element) and return a remote document child.
Previously, this was handled by the RemoteAccessibleWrap returned from OuterDocAccessible::LocalChildAt, but that will go away in a subsequent patch.

Differential Revision: https://phabricator.services.mozilla.com/D117525
2021-07-19 03:44:09 +00:00
Morgan Reschenberg
bd696c135b Bug 1720696: Only fetch mMsaa from non-null AccessibleWraps r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D120001
2021-07-15 18:23:03 +00:00
Doug Thayer
b5f7314e3e Bug 1714212 - Ensure COM initialized prior to showing skeleton UI r=Jamie,aklotz,tkikuchi
This implements Jamie's suggested fixes for a screenreader issue when the
skeleton UI is enabled. Most of the work here is just pulling out pieces from the
files we needed to include in mozglue so that any references to, say, nsString
or other pieces from libxul either no longer exist or are only included when
building libxul. In a few cases this meant creating whole files to house single
functions, which isn't so pretty, but it was the best I could come up with to
get the job done.

Differential Revision: https://phabricator.services.mozilla.com/D117663
2021-07-07 22:37:14 +00:00
Narcis Beleuzu
1ff027d763 Backed out changeset acf2d74efbbc (bug 1714212) for SM bustages on NativeNt.h 2021-07-07 23:13:42 +03:00
Doug Thayer
dc9c284076 Bug 1714212 - Ensure COM initialized prior to showing skeleton UI r=Jamie,aklotz,tkikuchi
This implements Jamie's suggested fixes for a screenreader issue when the
skeleton UI is enabled. Most of the work here is just pulling out pieces from the
files we needed to include in mozglue so that any references to, say, nsString
or other pieces from libxul either no longer exist or are only included when
building libxul. In a few cases this meant creating whole files to house single
functions, which isn't so pretty, but it was the best I could come up with to
get the job done.

Differential Revision: https://phabricator.services.mozilla.com/D117663
2021-07-07 18:17:36 +00:00
Dorel Luca
bc6f2486e2 Backed out changeset 11d1710e481f (bug 1714212) for Browser-chrome failures in toolkit/xre/test/browser_checkdllblockliststate.js. CLOSED TREE 2021-06-26 09:45:29 +03:00
Doug Thayer
c3702a9447 Bug 1714212 - Ensure COM initialized prior to showing skeleton UI r=Jamie,aklotz,tkikuchi
This implements Jamie's suggested fixes for a screenreader issue when the
skeleton UI is enabled. Most of the work here is just pulling out pieces from the
files we needed to include in mozglue so that any references to, say, nsString
or other pieces from libxul either no longer exist or are only included when
building libxul. In a few cases this meant creating whole files to house single
functions, which isn't so pretty, but it was the best I could come up with to
get the job done.

Differential Revision: https://phabricator.services.mozilla.com/D117663
2021-06-26 04:10:50 +00:00
James Teh
f846c3e1d7 Bug 1716549: Make MsaaAccessible::QueryInterface return interfaces that are always available even if the underlying Accessible is dead. r=morgan
Returning E_NOINTERFACE for IUnknown at least is probably bad form.
Also, mscom::Interceptor seems to expect IDispatch to always be available and asserts if it isn't.
We're seeing some weird COM crashes in the wild, and while I don't know if this will fix them, correctness seems like a good place to start.

Differential Revision: https://phabricator.services.mozilla.com/D117967
2021-06-22 15:52:26 +00:00
Eitan Isaacson
6ac35e15fc Bug 1714390 - P7: Add custom de/serializer for AccAttributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116788
2021-06-10 23:07:07 +00:00
Eitan Isaacson
349592fb91 Bug 1714390 - P6: Make more attribute keys static atoms. r=Jamie
Keys should be static atoms whenever possible.

Differential Revision: https://phabricator.services.mozilla.com/D116787
2021-06-10 23:07:07 +00:00
Eitan Isaacson
4fc2c36ea8 Bug 1714390 - P5: Use static aria_* atoms for aria attributes. r=Jamie
ATK, Windows and XPCOM expect aria attribute keys to be stripped of
their aria- prefix. We should still store the item using the aria_ atom
and then strip the prefix when converting the key to a string.

Differential Revision: https://phabricator.services.mozilla.com/D116786
2021-06-10 23:07:07 +00:00
Eitan Isaacson
474a197205 Bug 1714390 - P4: Set non-string values in AccAttributes when possible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116785
2021-06-10 23:07:06 +00:00
Eitan Isaacson
62d0cdcad4 Bug 1714390 - P2: Use AccAttributes for accessible and text attributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116783
2021-06-10 23:07:05 +00:00
James Teh
befbbf38e9 Bug 1713551: When the cache is enabled, use all bits of the MSAA id for the object unique id. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116434
2021-06-09 01:40:32 +00:00
James Teh
59941c480f Bug 1713272 part 3: Fail gracefully for IAccessible2 methods which don't support RemoteAccessible yet instead of crashing. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116330
2021-06-09 01:13:47 +00:00
James Teh
1196c8b377 Bug 1713272 part 2: Support IAccessible2 role, uniqueID, windowHandle and indexInParent for RemoteAccessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116329
2021-06-09 01:13:47 +00:00
James Teh
8d165ebec5 Bug 1713272 part 1: Support QueryService/Interface to IAccessible2 for RemoteAccessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116328
2021-06-09 01:13:46 +00:00
James Teh
2aca9d3532 Bug 1695116 part 11: When the cache is enabled, don't generate an MSAA id for each content process. r=morgan
This isn't used and thus isn't necessary.
Also, we can currently only support 127 content processes because of this id allocation, so avoiding this removes that restriction.

Differential Revision: https://phabricator.services.mozilla.com/D116206
2021-06-08 07:20:53 +00:00
James Teh
552af4f9de Bug 1695116 part 10: When the cache is enabled, don't send COM proxies and MSAA ids from the content process. r=morgan
Sending these doesn't really do any harm, as we already disregard them in the parent process.
However, it's certainly unnecessary and wasteful.

Differential Revision: https://phabricator.services.mozilla.com/D116204
2021-06-08 07:20:53 +00:00
James Teh
f3997d5080 Bug 1695116 part 9: Fail gracefully for MSAA methods which don't support RemoteAccessible yet instead of crashing. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116199
2021-06-08 07:20:52 +00:00
James Teh
6a5d7b980e Bug 1695116 part 8: Support MSAA accRole for RemoteAccessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116198
2021-06-08 07:20:52 +00:00
James Teh
5ce0efd820 Bug 1695116 part 7: Support MSAA accParent, accChildCount and accNavigate for RemoteAccessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116197
2021-06-08 07:20:51 +00:00
James Teh
cca7d4ef02 Bug 1695116 part 6: Support retrieval of remote MsaaAccessibles via MSAA child id. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116196
2021-06-08 07:20:51 +00:00
James Teh
f53c791606 Bug 1695116 part 5: Initial support for RemoteAccessibles in QueryInterface. r=morgan
For now, a lot of interfaces are disabled, since they don't support RemoteAccessibles at all.

Differential Revision: https://phabricator.services.mozilla.com/D116195
2021-06-08 07:20:51 +00:00
James Teh
9cd14edcc6 Bug 1695116 part 4: Support events for RemoteAccessibles with the cache enabled. r=morgan
1. GetHWNDFor and FireWinEvent now take an Accessible and support RemoteAccessible.
2. The Proxy*Event methods pass a RemoteAccessible instead of a RemoteAccessibleWrap, since RemoteAccessibleWraps aren't used with the cache enabled. FireWinEvent retrieves the RemoteAccessibleWrap if the cache is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D116194
2021-06-08 07:20:50 +00:00
James Teh
02d4927b94 Bug 1695116 part 3: Id management for remote MsaaAccessibles with the cache enabled. r=morgan
1. Make MsaaDocAccessible id maps contain Accessibles instead of AccessibleWraps. This allows us to put RemoteAccessibles in the id map.
2. Make MsaaAccessible::MsaaShutdown and GetChildIDFor handle RemoteAccessibles. GetChildIDFor lazily generates an id, Just as it does for LocalAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D116193
2021-06-08 07:20:50 +00:00
James Teh
57f2c79bdb Bug 1695116 part 2: Support RemoteAccessible in various utility functions. r=morgan
1. Add support for RemoteAccessible in MsaaAccessible::GetFrom.
2. Add an overload of MsaaDocAccessible::GetFrom which accepts a (remote) DocAccessibleParent.
3. Add MsaaDocAccessible::GetFromOwned to return the containing document's MsaaDocAccessible for a given Accessible.
4. MsaaAccessible::LocalAcc now returns null for a RemoteAccessible, rather than just assuming the accessible is local.
5. MsaaAccessible::NativeAccessible now supports retrieving a native client pointer for LocalAccessibles, RemoteAccessibles and RemoteAccessibleWraps.

Differential Revision: https://phabricator.services.mozilla.com/D116192
2021-06-08 07:20:49 +00:00
James Teh
cca8d5e473 Bug 1695116 part 1: When the cache is enabled, use a real MsaaAccessible for RemoteAccessibles. r=morgan
With the cache disabled (which was previously always the case), we create a RemoteAccessibleWrap for each RemoteAccessible, stored as the RemoteAccessible's "Wrapper".
This in turn creates an MsaaAccessible.
However, both of these are little more than stubs: the MsaaAccessible itself is never returned to clients and most of the methods would crash if called.
They exist only to store the MSAA id received from the content process and to return the COM proxy from the content process to clients.

With the cache enabled, we now create a real MsaaAccessible for each RemoteAccessible, stored as the RemoteAccessible's "Wrapper".
This MsaaAccessible is directly returned to clients.
Soon, it will generate its own id in the parent process and will delegate to the underlying RemoteAccessible to serve queries from clients.

As part of this:

1. We stop managing COM proxies in the parent process when the cache is enabled, since we don't need those and can't store them anyway.
2. We stop setting the id on the MsaaAccessible when the cache is enabled, since it will soon generate its own id like local MsaaAccessibles do.
3. OuterDocAccessible::ChildCount had to be tweaked so it doesn't try to return a RemoteAccessibleWrap when the cache is enabled. (It previously called RemoteChildDocAccessible, which fetches a RemoteAccessibleWrap.)

Differential Revision: https://phabricator.services.mozilla.com/D116191
2021-06-08 07:20:49 +00:00
James Teh
1c29b2b8ad Bug 1713383: Block rtop_bg.exe (ByteFence Anti-Malware) from instantiating a11y. r=eeejay
This is a security product and has no good reason to instantiate a11y.
We've also seen it show up in obscure crash reports.

Differential Revision: https://phabricator.services.mozilla.com/D116536
2021-06-02 23:33:11 +00:00
Morgan Reschenberg
5e6ca85357 Bug 1710751: Create LINKS_TO relation to track anchors and their corresponding elements r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D115841
2021-05-26 21:31:42 +00:00
James Teh
691fb1b366 Bug 1710983: Remove disabling of -Woverloaded-virtual from Windows AccessibleWrap.h. r=morgan
We previously disabled this to squelch warnings caused by inheriting both XPCOM and MSCOM interfaces.
After bug 1694865, we no longer do that, so disabling this warning is no longer necessary.

This raised an instance of -Woverloaded-virtual in ia2AccessibleImage caused by inheritance of IAccessibleAction, which has a method with the same name but different arguments.
A `using` declaration was added to squelch this warning.

Differential Revision: https://phabricator.services.mozilla.com/D115043
2021-05-16 23:22:33 +00:00
James Teh
fd632817d3 Bug 1709987: Call MsaaShutdown() when shutting down the ApplicationAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D114567
2021-05-11 00:35:17 +00:00
Morgan Reschenberg
80ccd5b8b1 Bug 1708522: Remove MOZ_CRASHREPORTER from windows, log AccClient on mac. r=Jamie
This commit adds crash logging for AccessibilityClient on MacOS and
enables that logging on windows by removing the defunct MOZ_CRASHREPORTER
defines. On MacOS, we also introduce logging for SwitchControl and
unknown clients.

Differential Revision: https://phabricator.services.mozilla.com/D114167
2021-05-10 20:22:32 +00:00
Noemi Erli
a2bfb965fd Backed out changeset 362b8272eab4 (bug 1708522) for causing build bustage in Platform.mm CLOSED TREE 2021-05-10 22:55:44 +03:00
Morgan Reschenberg
de405c1e9c Bug 1708522: Remove MOZ_CRASHREPORTER from windows, log AccClient on mac. r=Jamie
This commit adds crash logging for AccessibilityClient on MacOS and
enables that logging on windows by removing the defunct MOZ_CRASHREPORTER
defines. On MacOS, we also introduce logging for SwitchControl and
unknown clients.

Differential Revision: https://phabricator.services.mozilla.com/D114167
2021-05-10 19:07:10 +00:00
James Teh
20ee50033c Bug 1709594: Make ia2AccessibleTableCell inherit from ia2AccessibleHypertext. r=morgan
Without this, table cells weren't getting the IAccessibleText, etc. interfaces.
This was my intention in bug 1694865 part 25, but apparently that's not what I actually did.

Differential Revision: https://phabricator.services.mozilla.com/D114426
2021-05-07 02:11:28 +00:00
James Teh
1c2bc0ce07 Bug 1709250: Null check LocalAcc() in GeckoCustom. r=morgan
We didn't do defunct checks previously, but it seems the methods we were calling were safe on defunct accessibles.
Now that retrieving the accessible returns null once it's shut down, we need to explicitly null check it.

Differential Revision: https://phabricator.services.mozilla.com/D114197
2021-05-04 21:59:03 +00:00
James Teh
c2a4380cef Bug 1706851: Remove Windows HyperTextProxyFor() function. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D113063
2021-05-03 23:32:24 +00:00