Граф коммитов

553 Коммитов

Автор SHA1 Сообщение Дата
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
James Teh c33d1b0837 Bug 1694865 part 25: Remove inheritance of Msaa*Accessible/ia2*Accessible into *AccessibleWrap! r=morgan
1. ia2AccessibleApplication is instantiated for ApplicationAccessible, so it now inherits from MsaaAccessible.
2. ia2AccessibleHypertext is instantiated for HyperTextAccessible, so it now inherits from MsaaAccessible.
3. ia2AccessibleImage is instantiated for ImageAccessible, so it inherits from MsaaAccessible.
4. ia2AccessibleTable is instantiated for TableAccessible, so it inherits from ia2AccessibleHypertext (since most TableAccessible implementations implement HyperTextAccessible).
5. ia2AccessibleTableCell is instantiated for TableCellAccessible, so it inherits from ia2AccessibleHypertext (since most TableCellAccessible implementations implement HyperTextAccessible).
6. All of the above override QueryInterface as appropriate, replacing the QueryInterface implementations from all *AccessibleWrap classes.
7. The ARIAGridAccessibleWrap, HTMLTableAccessibleWrap, ImageAccessibleWrap, XULListboxAccessibleWrap and XULTreeGridAccessibleWrap classes previously served only to host ia2AccessibleImage, ia2AccessibleTable, etc. Since these ia2 classes are now instantiated via MsaaAccessible, these Wrap classes have been removed and replaced with aliases.
8. The QueryInterface handling for ISimpleDOMText has been moved into MsaaAccessible. Since this was the only purpose of TextLeafAccessibleWrap, this too has been removed and replaced with an alias.
9. AccessibleWrap now holds a strong reference to MsaaAccessible and MsaaAccessible holds a weak reference to AccessibleWrap.
10. An MsaaAccessible (or derived class) is instantiated by MsaaAccessible::Create.
11. MsaaAccessible now implements its own COM reference counting using DECL_IUNKNOWN, since it does not need nsISupports (XPCOM).

Differential Revision: https://phabricator.services.mozilla.com/D112956
2021-05-03 11:31:04 +00:00
James Teh 1d4975717e Bug 1694865 part 24: Change uiaRawElmProvider to not rely on AccessibleWrap inheritance. r=morgan
It now uses GetNativeInterface when returning IAccessibles to clients.

Differential Revision: https://phabricator.services.mozilla.com/D112955
2021-05-01 22:29:27 +00:00
James Teh 4c07d821c8 Bug 1694865 part 23: Support inheritance/overriding of reference counting in IUnknownImpl. r=morgan
Until now, our a11y COM implementation has relied on AddRef and Release from nsISupports, but this soon won't be possible.
Instead, MsaaAccessible will implement its own reference counting using DECL_IUNKNOWN.

DECL_IUNKNOWN previously declared AddRef and Release as final.
This doesn't work for MsaaAccessible because there is an aggregatable subclass (MsaaRootAccessible) and because some subclasses will inherit additional interfaces (ia2AccessibleApplication, etc.).

When subclasses inherit additional interfaces, they inherit an additional IUnknown, so the compiler doesn't know which AddRef/Release to call.
To support this, IMPL_IUNKNOWN_REFCOUNTING_INHERITED HAS BEEN ADDED to specify which base class implements reference counting.

Differential Revision: https://phabricator.services.mozilla.com/D112954
2021-05-01 22:29:27 +00:00
James Teh 812dc1cf7c Bug 1694865 part 22: Change LazyInstantiator to aggregate MsaaRootAccessible instead of RootAccessibleWrap. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D112953
2021-05-01 22:29:26 +00:00
James Teh 0613e5347a Bug 1694865 part 21: Move QueryInterface implementation from AccessibleWrap to MsaaAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D112951
2021-05-01 22:29:26 +00:00
James Teh b7d47b6dde Bug 1694865 part 20: Change ServiceProvider to not rely on AccessibleWrap inheritance. r=morgan
It now aggregates MsaaAccessible and uses GetNativeInterface when returning accessibles to clients.

Differential Revision: https://phabricator.services.mozilla.com/D112950
2021-05-01 22:29:25 +00:00
James Teh 463cee1200 Bug 1694865 part 19: Make EnumVariant, GeckoCustom and sdn*Accessible classes aggregate MsaaAccessible/MsaaDocAccessible instead of AccessibleWrap/DocAccessibleWrap. r=morgan
These objects need to aggregate the primary COM object (MsaaAccessible).
Once the IUnknown implementation moves out of AccessibleWrap, it won't be possible to aggregate *AccessibleWrap any more.

Differential Revision: https://phabricator.services.mozilla.com/D112949
2021-05-01 22:29:25 +00:00