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

941 Коммитов

Автор SHA1 Сообщение Дата
James Teh 52b0b92e8d Bug 1766546: Implement SetCaretOffset for cached Windows RemoteAccessible. r=morgan
We implement setting of the caret using HyperText rather than TextLeafPoint because caret stuff, including events, still uses HyperText internally for now.

This moves the async IPDL method already used on non-Windows into the base classes so Windows can use it.
We keep the COM implementation for Windows RemoteAccessible without the cache.
SetCaretOffset was moved into HyperTextAccessibleBase and platform methods were updated accordingly.
Finally, I did some drive-by cleanup (no user impact) and changed GetCaretOffset in ATK and XPCOM to use HyperTextAccessibleBase.
GetCaretOffset was moved to the base some time ago, but ATK and XPCOM weren't updated at the time.

Differential Revision: https://phabricator.services.mozilla.com/D147852
2022-06-01 19:34:09 +00:00
James Teh 8cda799e04 Bug 1756728 part 3: Remove now unused PDocAccessible::URL. r=morgan,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D147718
2022-06-01 00:34:18 +00:00
James Teh 196146ecb6 Bug 1756728 part 2: Support retrieving the URL for cached remote documents. r=morgan
The BrowsingContext already has this information, so we use that instead of redundantly caching it in RemoteAccessible.
This implementation works even when the a11y cache is disabled, so stop using the sync IPDL URL method.
We can't entirely unify the URL method because we don't have a base class for local/remote documents.
However, a method was added in nsAccUtils to unify this as much as possible.

Differential Revision: https://phabricator.services.mozilla.com/D147717
2022-06-01 00:34:17 +00:00
James Teh 4d3f66b120 Bug 1756728 part 1: Make it possible to retrieve a BrowsingContext from a DocAccessibleParent. r=morgan
Previously, even for remote in-process iframes, it was only possible to retrieve the top level BrowsingContext for the remote process by getting the managing BrowserParent.
This makes it possible to get the correct BrowsingContext even for in-process iframes.

Differential Revision: https://phabricator.services.mozilla.com/D147716
2022-06-01 00:34:17 +00:00
Eitan Isaacson efc6b17146 Bug 1771271 - Check for mCachedFields for all remote accessibles in BoundsWithOffset. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D147791
2022-05-31 19:24:27 +00:00
Morgan Rae Reschenberg c3d3119342 Bug 1768054: Traverse embedded chars when computing text bounds. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D145908
2022-05-23 21:43:12 +00:00
Eitan Isaacson c42dbc8b0f Bug 1769640 - P1: Cache content AUPDP in DocAccessibleParents. r=morgan,emilio
This change allows us to remove the `FullZoom` multiplier and fixes text
bounds caclulations in a zoomed page.

Testing: The current browser scroll/bounds tests pass (with the
exception of fission iframes which were already broken).

Differential Revision: https://phabricator.services.mozilla.com/D146507
2022-05-20 16:39:50 +00:00
James Teh 592446771c Bug 1768219: Don't walk ancestors on all Accessibles to find an action when serialising the IPC tree. r=eeejay
This was causing a performance regression.
We now only do this for text leaf and image Accessibles, which gets us back to where we were before bug 1395181.
This means we can't support "click ancestor" on ATK.
There weren't requests for this on ATK anyway.
In future, we can probably support this using the information in the cache.

Differential Revision: https://phabricator.services.mozilla.com/D146528
2022-05-17 06:31:45 +00:00
Nika Layzell 2b307c5cea Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-13 14:16:09 +00:00
Eitan Isaacson 85225ac3d9 Bug 1768972 - Introduce FireEvent to avoid android monitor lock reentry. r=Jamie
We rely on Recv events to be called from child processes and not from
other Recv events. If this happens we risk reentry in regards to the
android monitor lock. So this patch introduces FireEvent for internal
use where secondary events need to be fired like a reorder when a new
sub-document is added.

Differential Revision: https://phabricator.services.mozilla.com/D146134
2022-05-12 22:41:44 +00:00
Morgan Reschenberg 5e491aa675 Bug 1763212: Add tests for vertical text caching r=Jamie
Depends on D143527

Differential Revision: https://phabricator.services.mozilla.com/D144893
2022-05-11 20:47:36 +00:00
Noemi Erli 45276205df Backed out 22 changesets (bug 1696894, bug 1759569, bug 1754031, bug 1759563, bug 1759572, bug 1754004) for causing leack failures CLOSED TREE
Backed out changeset 673ecd5337e1 (bug 1754004)
Backed out changeset ecbf5f3c51de (bug 1754004)
Backed out changeset fc6c39f56d21 (bug 1754004)
Backed out changeset 5b3d58fbaf9d (bug 1696894)
Backed out changeset 2e56c89cf55d (bug 1754004)
Backed out changeset b7723490f025 (bug 1754004)
Backed out changeset 1dfbf61ff5dd (bug 1754004)
Backed out changeset e73abb071bb3 (bug 1754004)
Backed out changeset f9abe4fbf501 (bug 1754004)
Backed out changeset ee7aeb631cd9 (bug 1754004)
Backed out changeset d66aacfcf983 (bug 1754004)
Backed out changeset 5c2872ad6912 (bug 1754004)
Backed out changeset e1ae48f30d2c (bug 1754004)
Backed out changeset 849b63707d7f (bug 1754004)
Backed out changeset 36563e3b1e04 (bug 1754004)
Backed out changeset ccb4be659107 (bug 1754004)
Backed out changeset 659581d4159b (bug 1754004)
Backed out changeset 611ea76d7a9c (bug 1754004)
Backed out changeset 9b24b561698c (bug 1759572)
Backed out changeset f820e0f209ff (bug 1759563)
Backed out changeset 8d82066fa181 (bug 1759569)
Backed out changeset a2835afab1ad (bug 1754031)
2022-05-11 06:16:25 +03:00
Eitan Isaacson 7e7246091a Bug 1768726 - Make RemoteAccessibleBase::BoundsWithOffset thread safe for Android. r=morgan
In Android we need to keep the remote accessible methods thread safe. That means no direct references to local accessibles, or anything DOM or layout.

We have the advantage of always being remote except for a 0 offset browser element, and no support for full page zoom.

Also removed the visual/layout viewport offset in the bounds method since
the top level doc will always have its visual and layout viewport match.

Differential Revision: https://phabricator.services.mozilla.com/D146006
2022-05-10 22:57:32 +00:00
James Teh 780d656a9c Bug 1768391: Invalidate the remote HyperText offsets cache when we mutate the tree. r=eeejay
Previously, we invalidated this cache when the reorder event arrived.
Because the mutation and the reorder event happen in separate IPDL calls, it's possible for a client call to arrive between them.
If that client call queried HyperText offsets, this could result in returning incorrect information to the client or even a parent process crash.
Now, we invalidate the cache during the mutation, so there's no possibility of an intervening client call.
It made sense to put this invalidation call in RemoteAccessibleBase, so I also moved the call to invalidate for text leaf updates into RemoteAccessibleBase so that they're both in the same class.

Differential Revision: https://phabricator.services.mozilla.com/D145845
2022-05-10 22:56:57 +00:00
Nika Layzell 728ba534f6 Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-10 22:27:42 +00:00
Morgan Reschenberg 4e6096c73d Bug 1735101: Cache char, line coordinate info to support computing TextBounds and CharBounds in the parent process r=Jamie
Depends on D144767

Differential Revision: https://phabricator.services.mozilla.com/D143527
2022-05-09 20:30:27 +00:00
James Teh 65c8359c0d Bug 1766794: Lazily cache HyperText offsets for RemoteAccessibles. r=eeejay
We already had a similar cache in local HyperTextAccessible.
This improves performance significantly when walking the text attributes of a container with a large number of text leaf children, such as is encountered when using view source.
This patch unifies that cache across local and remote.
For simplicity, the cache invalidation strategy is more naive/aggressive.

Differential Revision: https://phabricator.services.mozilla.com/D145079
2022-05-05 11:14:12 +00:00
Sebastian Hengst 400d67b480 Merge autoland to mozilla-central. a=merge 2022-05-05 11:38:28 +02:00
Sebastian Hengst 7ddbeea9d6 Backed out 17 changesets (bug 1696894, bug 1754004) for causing crashes e.g. bug 1767808, and hanging Gmail (bug 1767918). a=backout DONTBUILD
Backed out changeset 63f17a06eba9 (bug 1754004)
Backed out changeset 017e1552d549 (bug 1754004)
Backed out changeset 010dfd821cf3 (bug 1696894)
Backed out changeset 96a39c2ba7a3 (bug 1754004)
Backed out changeset a147df47a0e3 (bug 1754004)
Backed out changeset 9018dd592230 (bug 1754004)
Backed out changeset 234ff9e092c2 (bug 1754004)
Backed out changeset c4f1e86992b6 (bug 1754004)
Backed out changeset 51bd50b57dd5 (bug 1754004)
Backed out changeset d95e7ad0eafa (bug 1754004)
Backed out changeset 35a69828091c (bug 1754004)
Backed out changeset 6802a4326963 (bug 1754004)
Backed out changeset e40e810e18fc (bug 1754004)
Backed out changeset 82b38c12b298 (bug 1754004)
Backed out changeset 0a6cf0817bf5 (bug 1754004)
Backed out changeset 6d8e51b3e8d7 (bug 1754004)
Backed out changeset 2059c2d0d880 (bug 1754004)
2022-05-05 11:27:42 +02:00
Butkovits Atila 7854b3ad09 Backed out changeset a81a40b250b4 (bug 1766794) for causing marionette failures. CLOSED TREE 2022-05-05 08:42:09 +03:00
James Teh 3754f65b27 Bug 1766794: Lazily cache HyperText offsets for RemoteAccessibles. r=eeejay
We already had a similar cache in local HyperTextAccessible.
This improves performance significantly when walking the text attributes of a container with a large number of text leaf children, such as is encountered when using view source.
This patch unifies that cache across local and remote.
For simplicity, the cache invalidation strategy is more naive/aggressive.

Differential Revision: https://phabricator.services.mozilla.com/D145079
2022-05-05 04:31:12 +00:00
Eitan Isaacson 83568bcd62 Bug 1765433 - P3: Get bundle and do pivot in UI thread for remote accessibles. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D144896
2022-05-04 18:00:47 +00:00
Nika Layzell 310e31989e Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-03 23:30:32 +00:00
Butkovits Atila d0dadcb6f5 Backed out 19 changesets (bug 1759569, bug 1754004, bug 1759563, bug 1754031, bug 1696894, bug 1759572) for causing wpt failures. CLOSED TREE
Backed out changeset 110a8dce4b5d (bug 1696894)
Backed out changeset a62dab05c6cd (bug 1754004)
Backed out changeset 7cf122f6e19f (bug 1754004)
Backed out changeset 2aa9a0a9adbc (bug 1754004)
Backed out changeset cde16b2cdbfb (bug 1754004)
Backed out changeset 452fe0a15c99 (bug 1754004)
Backed out changeset eace8d4756ef (bug 1754004)
Backed out changeset 5e1fad91e935 (bug 1754004)
Backed out changeset eb6de0b1ab8e (bug 1754004)
Backed out changeset 1ac1908ed3d0 (bug 1754004)
Backed out changeset 473cad5b22ab (bug 1754004)
Backed out changeset 1923922be138 (bug 1754004)
Backed out changeset c7966d91f89e (bug 1754004)
Backed out changeset df5ce1f6712c (bug 1754004)
Backed out changeset a3f3f9761ada (bug 1754004)
Backed out changeset c8ec86e0a33b (bug 1759572)
Backed out changeset 6c102f8e3d4a (bug 1759563)
Backed out changeset bd3a2fcf4f0c (bug 1759569)
Backed out changeset 2541d8face65 (bug 1754031)
2022-05-03 06:00:22 +03:00
Butkovits Atila c08407380b Backed out changeset e12dbde5824b (bug 1766794) for causing build bustages. CLOSED TREE 2022-05-03 01:57:32 +03:00
James Teh 5c02aef5a0 Bug 1766794: Lazily cache HyperText offsets for RemoteAccessibles.
We already have a similar cache in local HyperTextAccessible.
Unfortunately, we can't use common code here because we don't want to waste memory having a member variable on all RemoteAccessibles, but local HyperTextAccessibles don't have mCachedFields.
This improves performance significantly when walking the text attributes of a container with a large number of text leaf children, such as is encountered when using view source.

Differential Revision: https://phabricator.services.mozilla.com/D145079
2022-05-02 22:40:43 +00:00
James Teh 71595ec7c0 Bug 1767173: When retrieving the cached name, set name string to void when it is empty but not explicitly set empty using alt="". r=eeejay
This distinction between void and empty exists in LocalAccessible, so we should be consistent in RemoteAccessible.
This fixes exposure of explicit-name when the name is empty.
To facilitate this, we no longer assume the name flag is not in the cache just because the name string isn't in the cache, since it could be eNoNameOnPurpose.

Differential Revision: https://phabricator.services.mozilla.com/D145179
2022-05-02 22:37:24 +00:00
Nika Layzell 7cb1970841 Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-02 20:44:22 +00:00
Morgan Reschenberg 32487fa3e7 Bug 1763214: Convert ImagePosition, ImageSize to use cached bounds r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D142996
2022-04-28 17:03:49 +00:00
Morgan Reschenberg 278582922a Bug 1763191: Add suppport for cached remote accessibles in coordinate conversion functions r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D142970
2022-04-28 16:58:19 +00:00
Eitan Isaacson 9995cf770e Bug 1765430 - P4: Remove RemoteAccessibleWrap. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D144483
2022-04-27 22:44:46 +00:00
Eitan Isaacson c9311969b2 Bug 1765430 - P3: Refactor Android Pivot methods. r=Jamie
This creates a clearer distinction between local pivots and remote
pivots. The former happens in the parent process and the latter happens
in the remote content process.

Differential Revision: https://phabricator.services.mozilla.com/D144482
2022-04-27 22:44:45 +00:00
Butkovits Atila 20e2d30582 Backed out 4 changesets (bug 1765430) for causing android bustage. CLOSED TREE
Backed out changeset 72e27e3813d3 (bug 1765430)
Backed out changeset 47bbf5bd9315 (bug 1765430)
Backed out changeset e8161b463a3b (bug 1765430)
Backed out changeset 30c05f76d21e (bug 1765430)
2022-04-28 01:15:37 +03:00
Eitan Isaacson 3ee5a34515 Bug 1765430 - P4: Remove RemoteAccessibleWrap. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D144483
2022-04-27 21:01:36 +00:00
Eitan Isaacson 4dd84acb54 Bug 1765430 - P3: Refactor Android Pivot methods. r=Jamie
This creates a clearer distinction between local pivots and remote
pivots. The former happens in the parent process and the latter happens
in the remote content process.

Differential Revision: https://phabricator.services.mozilla.com/D144482
2022-04-27 21:01:36 +00:00
Eitan Isaacson 0b6b34fe31 Bug 1766514 - Use base implementation of TableIsProbablyForLayout when cache is enabled. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D144750
2022-04-26 23:17:48 +00:00
James Teh 7fabfd3b74 Bug 1766142: Expose explicit-name object attribute for cached RemoteAccessibles. r=morgan
The cache already includes this info.
We just needed to use it when exposing attributes to clients.

Differential Revision: https://phabricator.services.mozilla.com/D144684
2022-04-26 23:15:01 +00:00
James Teh ddd6d00a57 Bug 1395181 part 1: Support "click ancestor" action on descendants when an ancestor has an action. r=eeejay
Previously, we supported an action on text leaf and image accessibles if an ancestor was a link or was clickable.
However, we didn't support it on any other kind of descendant, nor could clients differentiate between a click handler on the descendant itself vs an action propagated because of an ancestor.
In addition, the click was performed on the ancestor element itself, rather than bubbling up to the ancestor.
This was probably never a real problem given the limited scope, but it meant that the actual event target was lost.

This has been replaced by a "click ancestor" action supported on all descendants of ancestors providing an action.
The click is dispatched to the descendant and bubbles up to the ancestor.
Aside from consistency and the ability to differentiate the action, this allows clients to stop relying on simulating clicks themselves to directly target a descendant.
This avoids problems caused by obscured web elements, obscured browser windows and other weird screen coordinate issues.
It thus fixes several problems reported by NVDA screen reader users.

Differential Revision: https://phabricator.services.mozilla.com/D144252
2022-04-22 23:13:36 +00:00
Eitan Isaacson 395df0c9f2 Bug 1765651 - Put DOMNodeID in Accessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D144234
2022-04-22 16:31:42 +00:00
James Teh fef89de8c9 Bug 1743966: Move ScrollTo into Accessible and support it for Windows RemoteAccessibles. r=morgan
Aside from adding ScrollTo to the Windows PDocAccessible IPDL, This mostly just moves methods into base classes and adapts platform code to use the unified Accessible::ScrollTo.

Differential Revision: https://phabricator.services.mozilla.com/D143655
2022-04-18 21:55:39 +00:00
Iulian Moraru c97a26b3a1 Backed out changeset b424302d8ba0 (bug 1763191) for causing Bp-hybrid bustages on nsAccUtils. CLOSED TREE 2022-04-18 20:47:55 +03:00
Morgan Reschenberg c2f7f702bd Bug 1763191: Add suppport for cached remote accessibles in coordinate conversion functions r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D142970
2022-04-18 15:53:18 +00:00
James Teh 709573652e Bug 1760939 part 1: Move EmbeddedChildCount to Accessible. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D142027
2022-04-11 23:20:13 +00:00
James Teh d5d775e886 Bug 1735970 part 15: Support TableAccessibleBase and TableCellAccessibleBase for ATK. r=morgan
We can use the base classes for both local and cached remote Accessibles.
However, non-cached RemoteAccessibles need to be handled separately still because we can't implement the table interfaces for those.

Differential Revision: https://phabricator.services.mozilla.com/D141218
2022-04-01 09:50:01 +00:00
James Teh 497cf621d5 Bug 1735970 part 10: Cache whether a table is probably a layout table. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141213
2022-04-01 09:49:59 +00:00
James Teh 1f562c2009 Bug 1735970 part 6: Retrieve row/column extent for both local and remote cells. r=morgan
CachedTableAccessible already knew how to support extents (AKA spans), but it didn't know how to retrieve them yet.

Differential Revision: https://phabricator.services.mozilla.com/D141209
2022-04-01 09:49:58 +00:00
James Teh 78f3eb8987 Bug 1735970 part 5: Use CachedTableAccessible for cached RemoteAccessible. r=morgan
This gets/creates the CachedTableAccessible when AsTableBase/AsTableCellBase is called.
It also invalidates the table cache when mutations occur.

Differential Revision: https://phabricator.services.mozilla.com/D141208
2022-04-01 09:49:57 +00:00
James Teh 6021c4755d Bug 1735970 part 3: Add TableAccessibleBase and TableCellAccessibleBase. r=morgan
These are needed to support RemoteAccessible tables.
Stuff specific to LocalAccessible is still in TableAccessible and TableCellAccessible, which now inherit from the new Base classes.

Covariant return types have been used to minimise changes in LocalAccessible callers.

Differential Revision: https://phabricator.services.mozilla.com/D141205
2022-04-01 09:49:57 +00:00
James Teh d91d6ecdec Bug 1735970 part 2: Add methods to unify querying an Accessible's id and retrieval of an Accessible from a document given an id. r=morgan
There is no base class for local (DocAccessible) and remote (DocAccessibleParent) documents, so this adds nsAccUtils::GetAccessibleByID.

Differential Revision: https://phabricator.services.mozilla.com/D141207
2022-04-01 09:49:56 +00:00
Eitan Isaacson ced0d9770b Bug 1760880 - Push document resolution in initial cache. r=morgan
Testing this is hard because the point of failure would be if we
recieved NotifyOfResolutionChange before the IPC doc is constructed.

Differential Revision: https://phabricator.services.mozilla.com/D141904
2022-03-23 22:24:52 +00:00
criss 34d3fb88a2 Backed out 18 changesets (bug 1735970) for causing hazard bustages.CLOSED TREE
Backed out changeset e7af2be486ce (bug 1735970)
Backed out changeset 73c93a18f65b (bug 1735970)
Backed out changeset 7e48716784d2 (bug 1735970)
Backed out changeset 30f61cdfd3c0 (bug 1735970)
Backed out changeset 3e4697e57570 (bug 1735970)
Backed out changeset 16ac3bec2412 (bug 1735970)
Backed out changeset 945ef21895ec (bug 1735970)
Backed out changeset 5dbfbf341ff8 (bug 1735970)
Backed out changeset d498d61c8f5a (bug 1735970)
Backed out changeset 50a2ee53b763 (bug 1735970)
Backed out changeset 9e2e11ea1a3d (bug 1735970)
Backed out changeset cf84daf9e40f (bug 1735970)
Backed out changeset 003bbf7f5f24 (bug 1735970)
Backed out changeset 00f1fbedc774 (bug 1735970)
Backed out changeset b17a1182539b (bug 1735970)
Backed out changeset 6d0f4821ddcf (bug 1735970)
Backed out changeset d82660fb5408 (bug 1735970)
Backed out changeset e506a5b04bf4 (bug 1735970)
2022-03-23 10:27:08 +02:00
James Teh 75a52a928e Bug 1735970 part 15: Support TableAccessibleBase and TableCellAccessibleBase for ATK. r=morgan
We can use the base classes for both local and cached remote Accessibles.
However, non-cached RemoteAccessibles need to be handled separately still because we can't implement the table interfaces for those.

Differential Revision: https://phabricator.services.mozilla.com/D141218
2022-03-23 04:00:31 +00:00
James Teh 35dbb69b5b Bug 1735970 part 10: Cache whether a table is probably a layout table. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141213
2022-03-23 04:00:29 +00:00
James Teh dd6856961c Bug 1735970 part 6: Retrieve row/column extent for both local and remote cells. r=morgan
CachedTableAccessible already knew how to support extents (AKA spans), but it didn't know how to retrieve them yet.

Differential Revision: https://phabricator.services.mozilla.com/D141209
2022-03-23 04:00:27 +00:00
James Teh 69083561ac Bug 1735970 part 5: Use CachedTableAccessible for cached RemoteAccessible. r=morgan
This gets/creates the CachedTableAccessible when AsTableBase/AsTableCellBase is called.
It also invalidates the table cache when mutations occur.

Differential Revision: https://phabricator.services.mozilla.com/D141208
2022-03-23 04:00:27 +00:00
James Teh 843eb0aed7 Bug 1735970 part 3: Add TableAccessibleBase and TableCellAccessibleBase. r=morgan
These are needed to support RemoteAccessible tables.
Stuff specific to LocalAccessible is still in TableAccessible and TableCellAccessible, which now inherit from the new Base classes.

Covariant return types have been used to minimise changes in LocalAccessible callers.

Differential Revision: https://phabricator.services.mozilla.com/D141205
2022-03-23 04:00:26 +00:00
James Teh d76deafa14 Bug 1735970 part 2: Add methods to unify querying an Accessible's id and retrieval of an Accessible from a document given an id. r=morgan
There is no base class for local (DocAccessible) and remote (DocAccessibleParent) documents, so this adds nsAccUtils::GetAccessibleByID.

Differential Revision: https://phabricator.services.mozilla.com/D141207
2022-03-23 04:00:25 +00:00
James Teh b6fe2e715b Bug 1759600: Don't return a local OuterDoc as the parent of a RemoteAccessible if the RemoteAccessible isn't a document. r=eeejay
A non-document RemoteAccessible can have a null parent while it is being moved.
This is only temporary, but it's possible for a client call to execute in this state.
We must not return the local OuterDoc in this case, as this definitely isn't a valid child of an OuterDoc.

To achieve this, the logic for handling document parents was moved to DocAccessibleParent.
This makes it easier to understand exactly how documents are handled in contrast to normal RemoteAccessibles.

Differential Revision: https://phabricator.services.mozilla.com/D141065
2022-03-23 00:08:13 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Eitan Isaacson ce4771430d Bug 1713050 - P3: Add more granularities to AXSelectedTextChanged events. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D139747
2022-03-16 05:56:26 +00:00
Eitan Isaacson a479c8f191 Bug 1713050 - P2: Add granularity to a11y caret move events. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D139746
2022-03-16 05:56:25 +00:00
Morgan Reschenberg 1fcc546b3a Bug 1733268: Cache states::OPAQUE1, update state on style change r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D140894
2022-03-15 18:46:46 +00:00
Morgan Reschenberg ca2f84aa05 Bug 1757661: Make cached fields accessible in tests directly r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D139979
2022-03-14 19:52:50 +00:00
Morgan Reschenberg 238bdbc5e9 Bug 1756229: Cache scroll position r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D139190
2022-03-14 19:52:50 +00:00
Iulian Moraru e8a5d3a8b3 Backed out 2 changesets (bug 1757661, bug 1756229) for causing build bustages on LocalAccessible.cpp. CLOSED TREE
Backed out changeset ba6ef5bc928e (bug 1757661)
Backed out changeset a6ea1aa0492a (bug 1756229)
2022-03-12 12:17:19 +02:00
Morgan Reschenberg c5a24dd555 Bug 1757661: Make cached fields accessible in tests directly r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D139979
2022-03-12 00:02:34 +00:00
Morgan Reschenberg 36590416d2 Bug 1756229: Cache scroll position r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D139190
2022-03-12 00:02:33 +00:00
Butkovits Atila bfa9c70d05 Backed out 2 changesets (bug 1756229, bug 1757661) for causing leaks. CLOSED TREE
Backed out changeset 20b9c772f7b5 (bug 1757661)
Backed out changeset 1dfe3b2c9405 (bug 1756229)
2022-03-09 01:12:55 +02:00
Morgan Reschenberg 9358cee431 Bug 1757661: Make cached fields accessible in tests directly r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D139979
2022-03-08 20:16:09 +00:00
Morgan Reschenberg 06012cd8fd Bug 1756229: Cache scroll position r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D139190
2022-03-08 20:16:08 +00:00
Nika Layzell 05dc5e0d76 Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.

Differential Revision: https://phabricator.services.mozilla.com/D140004
2022-03-04 15:39:41 +00:00
James Teh 83cb50f000 Bug 1741793 part 4: Implement text selection querying for cached RemoteAccessible. r=eeejay
The original non-Windows RemoteAccessible SelectionBoundsAt method still exists because it allows the caller to retrieve both the offsets and the text in a single call, which can't be done with the unified API.
Thus, platform code still needs a separate code path for non-cached RemoteAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D139343
2022-02-26 23:01:55 +00:00
James Teh a20035d2d2 Bug 1741793 part 3: Cache text selection in the parent process. r=eeejay
This uses selection changed and caret moved events.

Differential Revision: https://phabricator.services.mozilla.com/D139342
2022-02-26 23:01:55 +00:00
Morgan Reschenberg 7aae56705c Bug 1744573: Apply single-level transforms in RemoteAccessibleBase::Bounds r=eeejay,Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D131554
2022-02-25 22:23:13 +00:00
Morgan Reschenberg 618acab981 Bug 1744573: Cache the transform matrix r=eeejay,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D133134
2022-02-25 22:23:13 +00:00
Eitan Isaacson 4fb238b0ec Bug 1755817 - Move LandmarkRole to Accessible. r=Jamie
Current mochitests should prove the soundness of this. The only thing
preventing this from becoming a non-virtual method is the reliance
on TagName which is only available when cached is enabled. When it
is disabled we need to fallback on the sync IPDL call.

Differential Revision: https://phabricator.services.mozilla.com/D138964
2022-02-18 18:21:01 +00:00
Eitan Isaacson cedb598cc3 Bug 1746833 - P4: Add remote textbox value calculation and tests. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D138950
2022-02-18 18:21:00 +00:00
Eitan Isaacson 6159254eee Bug 1746833 - P2: Move Value() to Accessible and calculate or use cached value remotely. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D138948
2022-02-18 18:20:59 +00:00
James Teh bdcedbe127 Bug 1743968: Cache the display object attribute. r=morgan
This also adds Accessible::DisplayStyle, as we sometimes want to be able to get the display style without fetching all the Attributes.

Differential Revision: https://phabricator.services.mozilla.com/D138629
2022-02-17 21:56:34 +00:00
Eitan Isaacson 791057d698 Bug 1755383 - P2: Added receivers for SelectedItems/Count in doc child. r=morgan
This is really just for testing purposes, so we can do non-caching e10s
testing.

Differential Revision: https://phabricator.services.mozilla.com/D138729
2022-02-16 18:42:53 +00:00
Eitan Isaacson b2f056737e Bug 1755383 - P1: Move SelectAccessible methods to Accessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D138728
2022-02-16 18:42:53 +00:00
Eitan Isaacson 6063921e0f Bug 1752380 - P2: Don't cache ancestor actions directly. r=morgan
When a linkable accessible has an action because of an ancestor, don't
cache it directly, but instead walk up in the parent process to find it.

Depends on D137200

Differential Revision: https://phabricator.services.mozilla.com/D137201
2022-02-15 23:20:11 +00:00
Eitan Isaacson c61f9c123e Bug 1752380 - P1: Introduce HasPrimaryAction and remove redundant DoAction/ActionCount implementation. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D137200
2022-02-15 23:20:11 +00:00
James Teh b7e0ab5019 Bug 1754680: Don't treat a list item bullet as an embedded object. r=eeejay
This was causing LinkAt to return a bullet instead of the first embedded object in a list item, breaking rendering with NVDA when the cache was enabled.
Rather than adding another role to RemoteAccessibleBase::IsEmbeddedObject, I changed it to use IsText().
This is consistent with how embedded objects are determined for LocalAccessible in EmbeddedObjCollector.
I think the reason this previously used roles is that when this was originally implemented, AccTypes weren't remoted, so IsText() couldn't be used.

Differential Revision: https://phabricator.services.mozilla.com/D138506
2022-02-14 23:43:34 +00:00
James Teh f5a04369df Bug 1754360: Move EndOffset to base Accessible. r=eeejay
Similar to StartOffset:

1. There was a Windows non-cached RemoteAccessible implementation, but it was never actually called, so I removed it.
2. The sync IPDL RemoteAccessible implementation previously provided a boolean indicating success.
    I removed this because the LocalAccessible implementation doesn't have this and it doesn't seem like remote is special in this respect.

Differential Revision: https://phabricator.services.mozilla.com/D138243
2022-02-11 02:37:13 +00:00
Nika Layzell dabb46c84d Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
2022-02-09 17:29:47 +00:00
Nika Layzell 91ec85c593 Bug 1752444 - Part 2: Rewrite direct_call.py protocols to use {Parent,Child}Impl attributes, r=ipc-reviewers,media-playback-reviewers,alwu,mccr8
This is a mechanical change which was performed by a script based on the
contents of direct_call.py, and then manually checked over to fix
various rewriting bugs caused by my glorified sed script. See the
previous part for more context on the change.

Differential Revision: https://phabricator.services.mozilla.com/D137227
2022-02-09 17:29:46 +00:00
James Teh 9f17a2e0b4 Bug 1730086 part 3: Rename RemoteAccessible::GetTextBefore/AfterOffset to TextBefore/AfterOffset, have it override HyperTextAccessibleBase and use the base methods in ATK/XPCOM. r=morgan
This also unifies the code path for TextAtOffset in ATK, rather than having different local and remote code paths.
This isn't strictly related to this patch series, but this change was missed before, so I took the opportunity to deal with it here.

Differential Revision: https://phabricator.services.mozilla.com/D137504
2022-02-04 02:10:28 +00:00
Eitan Isaacson b494f3eab9 Bug 1743967 - Support async DoAction. r=Jamie
Now that we cache ActionCount, we can check for the absence of actions
and return false, or send an async message and return true.

Differential Revision: https://phabricator.services.mozilla.com/D135909
2022-01-31 23:10:52 +00:00
Eitan Isaacson ac8433cd7e Bug 1748749 - P4: Support cached actions. r=Jamie
Move ActionCount/ActionNameAt/ActionDescriptionAt to Accessible,
use cached values in RemoteAccessible, and tweak platforms.

Also introduce browser test.

Differential Revision: https://phabricator.services.mozilla.com/D135908
2022-01-31 23:10:52 +00:00
Cosmin Sabou ef48e09b4e Backed out 6 changesets (bug 1743967, bug 1748749, bug 1749828) for causing bc failures on browser_PBMCookieBehavior.js.
Backed out changeset afda8c72ba29 (bug 1749828)
Backed out changeset 8b5356f3d50d (bug 1743967)
Backed out changeset 04f178d71ae6 (bug 1748749)
Backed out changeset cd2e76de3d18 (bug 1748749)
Backed out changeset 4190c5e44b32 (bug 1748749)
Backed out changeset 8e23acc969d2 (bug 1748749)
2022-02-01 03:05:11 +02:00
Eitan Isaacson 6f159bbb67 Bug 1743967 - Support async DoAction. r=Jamie
Now that we cache ActionCount, we can check for the absence of actions
and return false, or send an async message and return true.

Differential Revision: https://phabricator.services.mozilla.com/D135909
2022-01-31 23:10:52 +00:00
Eitan Isaacson 12d336ff2f Bug 1748749 - P4: Support cached actions. r=Jamie
Move ActionCount/ActionNameAt/ActionDescriptionAt to Accessible,
use cached values in RemoteAccessible, and tweak platforms.

Also introduce browser test.

Differential Revision: https://phabricator.services.mozilla.com/D135908
2022-01-31 23:10:52 +00:00
Butkovits Atila c6b99e8ff7 Backed out 5 changesets (bug 1743967, bug 1748749) for causing failures at browser_caching_actions.js. CLOSED TREE
Backed out changeset 6f15d287ecd8 (bug 1743967)
Backed out changeset fce9d3a2500d (bug 1748749)
Backed out changeset 9d405f9475b3 (bug 1748749)
Backed out changeset 9dccfcc00718 (bug 1748749)
Backed out changeset f1be79d75c5d (bug 1748749)
2022-01-28 07:07:56 +02:00
Eitan Isaacson ab978bd5c2 Bug 1743967 - Support async DoAction. r=Jamie
Now that we cache ActionCount, we can check for the absence of actions
and return false, or send an async message and return true.

Differential Revision: https://phabricator.services.mozilla.com/D135909
2022-01-28 00:09:05 +00:00
Eitan Isaacson 0a906dbd4f Bug 1748749 - P4: Support cached actions. r=Jamie
Move ActionCount/ActionNameAt/ActionDescriptionAt to Accessible,
use cached values in RemoteAccessible, and tweak platforms.

Also introduce browser test.

Differential Revision: https://phabricator.services.mozilla.com/D135908
2022-01-28 00:09:04 +00:00