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

936 Коммитов

Автор SHA1 Сообщение Дата
James Teh 502efae488 Bug 1781536 part 3: Move RelationByType to base Accessible. r=morgan
This required changing the RemoteAccessible implementations to return Relation instead of an array of RemoteAccessible.
Platform implementations have been updated to use the unified method where appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D152959
2022-08-03 23:58:51 +00:00
James Teh 8c97854cbe Bug 1781536 part 1: Support base Accessible in Relation. r=morgan
Previously, Relation::Next returned a LocalAccessible.
Now, it returns an Accessible so that it can support RemoteAccessible as well.
Relation::LocalNext has been added as a convenience to return a LocalAccessible when the caller is certain that only LocalAccessible is relevant.
Callers have either been updated to use LocalNext or to handle an Accessible returned from Next.
ia2AccessibleRelation now holds an array of MsaaAccessible, as we need to hold references and we can't hold references to RemoteAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D152957
2022-08-03 23:58:50 +00:00
Morgan Rae Reschenberg 8180b70ae7 Bug 1774043: [Part 3] Make remote ::Relations and ::RelationByType functions to use cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152102
2022-08-03 05:09:54 +00:00
Morgan Rae Reschenberg 2cd46a7d14 Bug 1774043: [Part 2] Add implicit relations map, pre- and post-update map processing in ApplyCache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152101
2022-08-03 05:09:53 +00:00
James Teh 711cfeacdd Bug 1772476: Invalidate a CachedTableAccessible when a cell is moved out of it. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D153443
2022-08-02 23:58:50 +00:00
James Teh c5ca1dd163 Bug 1782146: Invalidate the HyperText offset cache for RemoteAccessible in some additional cases. r=eeejay
1. When we receive text for a text leaf, even for an initial cache push. Previously, we only did this for a cache update. However, a client call could arrive between the tree push and the initial cache push, resulting in an incorrect offsets cache.
2. When an Accessible is moved. Previously, if a client queried an Accessible while it was being moved or if an Accessible had children before the move but no children after, the cached HyperText offsets could be invalid.

Differential Revision: https://phabricator.services.mozilla.com/D153139
2022-08-02 21:20:59 +00:00
Eitan Isaacson 53df39bb4d Bug 1779156 - Defer show event until after the cache is populated. r=Jamie
If this is an initial cache push, dispatch a show event after it is
populated.

Differential Revision: https://phabricator.services.mozilla.com/D153124
2022-08-02 16:25:30 +00:00
Christian Holler 99924b2804 Bug 1781043 - Disable some diagnostic asserts in a11y for IPC fuzzing. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D152638
2022-08-02 09:14:28 +00:00
Norisz Fay f411d84051 Backed out 7 changesets (bug 1774043, bug 1780878) for causing gv-junit failures
Backed out changeset 465a045a5068 (bug 1780878)
Backed out changeset 05aac2c873a6 (bug 1780878)
Backed out changeset f3039b217acd (bug 1780878)
Backed out changeset 63a4b92b5453 (bug 1774043)
Backed out changeset f44a9d0f46ab (bug 1774043)
Backed out changeset 5fff79016cb6 (bug 1774043)
Backed out changeset ffbb26d2a3c1 (bug 1774043)
2022-08-02 10:47:21 +03:00
Morgan Rae Reschenberg 65f8ec4b9d Bug 1774043: [Part 3] Make remote ::Relations and ::RelationByType functions to use cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152102
2022-08-02 02:51:04 +00:00
Morgan Rae Reschenberg 42cc6cfdb8 Bug 1774043: [Part 2] Add implicit relations map, pre- and post-update map processing in ApplyCache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152101
2022-08-02 02:51:04 +00:00
James Teh 0fcb0cca6e Bug 1782151: Don't assert that mCachedFields isn't null in RemoteAccessibleBase::RetrieveCachedBounds. r=morgan
This is possible if a client query arrives between the two IPDL calls for the tree and the cache.
This might even happen for an ancestor in the case of an OOP iframe, where IPDL calls for the two documents might be interspersed.

Differential Revision: https://phabricator.services.mozilla.com/D153134
2022-08-01 22:24:49 +00:00
Butkovits Atila e4fc988843 Backed out 7 changesets (bug 1780878, bug 1774043) for causing build bustages. CLOSED TREE
Backed out changeset 34a9e10a9f87 (bug 1780878)
Backed out changeset 3b1c3fdc386b (bug 1780878)
Backed out changeset e1e6fc68d024 (bug 1780878)
Backed out changeset c0cdd3e2efa2 (bug 1774043)
Backed out changeset 14e4b5310a9a (bug 1774043)
Backed out changeset 8a7e2374e0b2 (bug 1774043)
Backed out changeset 9309568a622d (bug 1774043)
2022-07-27 00:58:03 +03:00
Morgan Rae Reschenberg 8a4c97b65c Bug 1774043: [Part 3] Make remote ::Relations and ::RelationByType functions to use cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152102
2022-07-26 21:35:40 +00:00
Morgan Rae Reschenberg 5c572fd0ed Bug 1774043: [Part 2] Add implicit relations map, pre- and post-update map processing in ApplyCache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152101
2022-07-26 21:35:38 +00:00
Emilio Cobos Álvarez 42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
Neia Finch 034d8039a6 Bug 1645904 - Fix swapped parameters for nsIAccessibleVirtualCursorChangeEvent r=eeejay
The fields are unused, but there's no reason to propagate them
incorrectly.

Differential Revision: https://phabricator.services.mozilla.com/D134907
2022-07-21 16:59:49 +00:00
James Teh ef6f7fb547 Bug 1757126 part 4: Support AccessKey on cached RemoteAccessible. r=morgan
1. Move AccessKey to base Accessible.
2. Retrieve AccessKey from the cache for RemoteAccessible.
3. Update XPCOM and platform specific code accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D151202
2022-07-14 05:48:16 +00:00
James Teh 52a9b98ce9 Bug 1757126 part 1: Remove RemoteAccessible::KeyboardShortcut. r=morgan,ipc-reviewers,nika
KeyboardShortcut is only supported for XUL menu items.
XUL menu items can never be remote, so there's no point in querying this via IPDL.

Differential Revision: https://phabricator.services.mozilla.com/D151199
2022-07-14 05:48:15 +00:00
Norisz Fay d152ee99bf Backed out 4 changesets (bug 1757126) for causing build bustages on xpcAccessible.cpp CLOSED TREE
Backed out changeset e57b1129fd48 (bug 1757126)
Backed out changeset 6ee5d245c2fc (bug 1757126)
Backed out changeset b0809e6a3de3 (bug 1757126)
Backed out changeset 4d10b2dfdc99 (bug 1757126)
2022-07-14 04:18:36 +03:00
James Teh e83581aacd Bug 1757126 part 4: Support AccessKey on cached RemoteAccessible. r=morgan
1. Move AccessKey to base Accessible.
2. Retrieve AccessKey from the cache for RemoteAccessible.
3. Update XPCOM and platform specific code accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D151202
2022-07-14 00:49:47 +00:00
James Teh 01bc6196d8 Bug 1757126 part 1: Remove RemoteAccessible::KeyboardShortcut. r=morgan,ipc-reviewers,nika
KeyboardShortcut is only supported for XUL menu items.
XUL menu items can never be remote, so there's no point in querying this via IPDL.

Differential Revision: https://phabricator.services.mozilla.com/D151199
2022-07-14 00:49:45 +00:00
James Teh 2e5729d4e9 Bug 1757121 part 5: Expose live region attributes on cached RemoteAccessibles. r=morgan
As part of this, aria-relevant is now exposed via object attributes.
This is necessary to ensure it is included in the cache.
There's no good reason not to expose it anyway, since we already expose the other live region attributes.

Differential Revision: https://phabricator.services.mozilla.com/D150380
2022-07-12 02:45:58 +00:00
Morgan Rae Reschenberg 644b66ac98 Bug 1775329: Support cached OffsetAtPoint in HyperTextAccessibleBase r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D150049
2022-07-05 19:50:45 +00:00
Morgan Rae Reschenberg 1d91ffd52f Bug 1776275: Consistently fetch fullZoom from top level browsing context in tests, cache on the top level doc in core r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D150291
2022-07-05 19:50:45 +00:00
criss fc6d3e181e Backed out 2 changesets (bug 1775329, bug 1776275) for causing mochitest failures on browser_test_zoom_text.js. CLOSED TREE
Backed out changeset 72519abf87ee (bug 1775329)
Backed out changeset 365e262b3dad (bug 1776275)
2022-06-29 23:39:31 +03:00
Morgan Rae Reschenberg a68d0f55b4 Bug 1775329: Support cached OffsetAtPoint in HyperTextAccessibleBase r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D150049
2022-06-29 19:00:14 +00:00
Morgan Rae Reschenberg 3fd29fdf82 Bug 1776275: Consistently fetch fullZoom from top level browsing context in tests, cache on the top level doc in core r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D150291
2022-06-29 19:00:13 +00:00
Bogdan Szekely a0e2dc5103 Backed out 5 changesets (bug 1748755, bug 1757121) for causing reftest failures on 448064.xhtml CLOSED TREE
Backed out changeset 4ff1f0c0d866 (bug 1748755)
Backed out changeset 41328f13fe58 (bug 1757121)
Backed out changeset 27631b3a007f (bug 1757121)
Backed out changeset 2d4cc5953773 (bug 1757121)
Backed out changeset 8d874e7a2a8f (bug 1757121)
2022-06-29 12:25:04 +03:00
James Teh b2ec52f4a2 Bug 1757121 part 4: Expose live region attributes on cached RemoteAccessibles. r=morgan
As part of this, aria-relevant is now exposed via object attributes.
This is necessary to ensure it is included in the cache.
There's no good reason not to expose it anyway, since we already expose the other live region attributes.

Differential Revision: https://phabricator.services.mozilla.com/D150380
2022-06-29 07:04:13 +00:00
James Teh e998d303d0 Bug 1773930: Expose xml-roles object attribute on cached RemoteAccessible. r=morgan
This also changes LocalAccessible::Attributes to ignore the edge case of an empty role attribute when calculating xml-roles.
This is consistent with how we handle the role attribute elsewhere (see aria::GetRoleMapIndex) and makes it easier to handle this consistently between local and remote.

Differential Revision: https://phabricator.services.mozilla.com/D149594
2022-06-24 05:28:53 +00:00
James Teh 4c4dccc52b Bug 1774197 part 3: Correctly recurse into iframe documents in RemoteAccessibleBase::ChildAtPoint. r=morgan
We were previously looking for a doc (IsDoc), but we'll never get any doc in a viewport cache except for the doc whose viewport we are searching.
Instead, if we encounter an iframe, we'll hit an OuterDoc (IsOuterDoc) which is the Accessible for the iframe element.
In that case, we walk *inside* that OuterDoc to get its embedded document, then recurse from there if appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D149247
2022-06-23 04:57:04 +00:00
James Teh e03a5619fd Bug 1774197 part 2: Don't include the document in the viewport cache. r=morgan
Sometimes, the document occurs too early in the viewport cache, perhaps even right at the start.
We weren't benefitting from it being in the cache anyway, since we always skipped it.
We already have a fallback in ChildAtPoint for the case where we didn't find a matching Accessible, so we rely on that to handle returning the document when appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D149493
2022-06-23 04:57:04 +00:00
Morgan Rae Reschenberg fdd6afc666 Bug 1772861: Cache offset for cross-proc iframe docs r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D148832
2022-06-21 20:23:18 +00:00
James Teh 32aea8c6e2 Bug 1760739 part 5: Add Accessible method to retrieve an integer ARIA attribute. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D149224
2022-06-16 06:25:51 +00:00
James Teh 237c1cc6fa Bug 1760739 part 3: Expose ARIA object attributes for cached RemoteAccessibles. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D149222
2022-06-16 06:25:51 +00:00
James Teh 977aa35653 Bug 1774393: Support BoundsInCSSPixels for cached RemoteAccessible. r=morgan
Our hit testing tests need this.
This adds a base Accessible::BoundsInCSSPixels implementation which relies on BoundsInAppUnits.
BoundsInAppUnits was also moved to Accessible, but it is implemented differently for local and remote, so the base method is abstract.
I also did a drive-by removal of a pointless conditional in xpcAccessible::GetBounds.

Differential Revision: https://phabricator.services.mozilla.com/D149374
2022-06-16 01:03:26 +00:00
Eitan Isaacson afad4c3c85 Bug 1755377 - Send list of accessibles that are un/selected to parent cache. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D149313
2022-06-15 17:08:38 +00:00
Morgan Rae Reschenberg 2fbf4cf4f2 Bug 1758689: Create and maintain a viewport cache for hittesting r=Jamie,emilio
This hittesting approach is borrowed from our Android implementation.
We maintain a cache of ID's for accessibles which are visible in the viewport.
This cache is created with a call to `nsLayoutUtils::GetFramesForArea`, which
returns frames in the viewport, in hittesting order.

In the parent process, we walk through the cache, keeping track of accs whose
bounds contain the hittesting point. Depending on if we're searching for the
direct child, or the deepest child, we walk the entire cache or return the
first match.

Each document (in the content process) maintains a dirty bit, which gets set
any time an acc it contains bundles either a text update, or an update that
affects bounds. We check whether this bit is set in `DidRefresh` after getting
a notification from our post-refresh observer. If that bit is set, we
queue a cache update for the `::Viewport` domain on the current document.

Because this cache depends on the viewport being painted, we include the
`IgnorePaintSuppression` flag in our `GetFramesForArea` call. This ensures
the display lists are built before the page finishes loading.

Differential Revision: https://phabricator.services.mozilla.com/D147225
2022-06-13 22:28:36 +00:00
James Teh 19d797513c Bug 1773104: Hold a reference to the BrowsingContext when deferring the sending of a PDocAccessible constructor. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D148747
2022-06-13 21:57:15 +00:00
James Teh 73a4914387 Bug 1772170: Ensure cached Accessibles and offsets are valid before returning them in DocAccessibleParent::SelectionRanges. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D148745
2022-06-13 21:56:23 +00:00
criss 87ebda9e82 Backed out 2 changesets (bug 1758689, bug 1772609) for causing nsRefreshDriver related failures. CLOSED TREE
Backed out changeset 05a9ffa21ad0 (bug 1772609)
Backed out changeset c2233b3830ef (bug 1758689)
2022-06-11 00:53:17 +03:00
Morgan Rae Reschenberg 90900e0fef Bug 1758689: Create and maintain a viewport cache for hittesting r=Jamie,emilio
This hittesting approach is borrowed from our Android implementation.
We maintain a cache of ID's for accessibles which are visible in the viewport.
This cache is created with a call to `nsLayoutUtils::GetFramesForArea`, which
returns frames in the viewport, in hittesting order.

In the parent process, we walk through the cache, keeping track of accs whose
bounds contain the hittesting point. Depending on if we're searching for the
direct child, or the deepest child, we walk the entire cache or return the
first match.

Each document (in the content process) maintains a dirty bit, which gets set
any time an acc it contains bundles either a text update, or an update that
affects bounds. We check whether this bit is set in `DidRefresh` after getting
a notification from our post-refresh observer. If that bit is set, we
queue a cache update for the `::Viewport` domain on the current document.

Because this cache depends on the viewport being painted, we include the
`IgnorePaintSuppression` flag in our `GetFramesForArea` call. This ensures
the display lists are built before the page finishes loading.

Differential Revision: https://phabricator.services.mozilla.com/D147225
2022-06-10 21:10:18 +00:00
James Teh 0c1571c44a Bug 1771934: Acquire the Android a11y lock in some additional places. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D147854
2022-06-07 06:14:45 +00:00
James Teh d95ab86a63 Bug 1771931 part 1: Clean up CachedTableAccessibles when a DocAccessibleParent is destroyed. r=morgan
When a DocAccessibleParent is destroyed, we don't call Shutdown on its RemoteAccessibles to avoid pointless cleanup overhead.
Previously, this meant we weren't cleaning up associated CachedTableAccessibles.
We now explicitly clean these up in DocAccessibleParent::Destroy.

Differential Revision: https://phabricator.services.mozilla.com/D148086
2022-06-04 02:22:46 +00:00
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