Commit graph

61 commits

Author SHA1 Message Date
James Teh
97a388f4f8 Bug 1845863: Expose HTML placeholder for RemoteAccessible. r=nlapre
We previously cached aria-placeholder, but not HTML placeholder.
These both map to the placeholder object attribute exposed by Accessible::Attributes, but they are retrieved differently internally.

This also fixes LocalAccessible::Attributes to always prefer HTML placeholder over aria-placeholder as per the ARIA spec.
Previously, the attribute we preferred was somewhat indeterminate (from the user's perspective) due to the ordering of hash maps.

Differential Revision: https://phabricator.services.mozilla.com/D184795
2023-08-02 01:42:17 +00:00
James Teh
6ce218982c Bug 1743749 part 1: Create aliases for RemoteAccessible cache keys. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D184667
2023-07-31 23:09:55 +00:00
James Teh
4f8cb5998f Bug 1821956 part 8: Remove most of the remaining parts of Windows RemoteAccessible. r=nlapre
This only worked with the COM proxy architecture.
It cannot be used with the cache active.
This includes ScrollSubstringToPoint, and since that isn't currently supported by the cache, it isn't supported at all on Windows now.
However, no one seems to use this on Windows and this implementation can't be used with the cache active anyway.

Differential Revision: https://phabricator.services.mozilla.com/D177901
2023-05-21 22:23:48 +00:00
James Teh
d1c3206f01 Bug 1829603 part 1: Include the class attribute in the parent process a11y cache. r=morgan
This is used by the Web Access NVDA add-on to identify and remediate some inaccessible elements on websites with accessibility problems.
It is also useful for developers using screen readers when trying to identify specific elements in the absence of semantics.

Differential Revision: https://phabricator.services.mozilla.com/D176896
2023-05-03 09:02:53 +00:00
James Teh
958055f388 Bug 1819802 part 1: When getting cached a11y character bounds, return a single rect rather than an array of rects. r=morgan
When hit testing, we retrieve the bounds for every character in a text leaf in a separate call.
Because we need to convert from an array of flat ints to rects, this previously meant we built the entire array for every character.
For a large text leaf, building this rect array is relatively expensive.
We only need a single rect at a time.
Therefore, RemoteAccessibleBase now returns the rect for a single requested character instead of building an array of rects.

Differential Revision: https://phabricator.services.mozilla.com/D171419
2023-03-03 03:26:21 +00:00
Morgan Rae Reschenberg
397dcfd11b Bug 1803814: Remove Maybe wrapper from RelationData's mReverseType member r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D163858
2022-12-05 23:42:52 +00:00
Morgan Rae Reschenberg
771a9f1a94 Bug 1795221: Implement LINKS_TO relation as a tree traversal r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D159451
2022-10-27 20:32:18 +00:00
Nathan LaPre
3fc16a5a71 Bug 1787283: Provide NODE_CHILD_OF, NODE_PARENT_OF relations in remote acc, r=morgan,Jamie
We'd like to provide NODE_CHILD_OF and NODE_PARENT_OF relations in the parent
process, relying on cached information, to avoid sync IPDL messages. This
revision implements most of the use cases for this relation for remote
accessibles, notably setting aside handling of MathML's <mroot> parent/child
relation. ARIA trees, treegrids, lists, and so on are handled in the remote
accessible largely identically to how they were handled in LocalAccessible.
Rather than define a new rule for walking the tree to find children, this
revision unifies the ItemIterator so it works on generic Accessibles, and uses
it in RemoteAccessibleBase the same way it's used in LocalAccessible. The
special case carve-out for MSAA clients now exists as a simpler IsTopLevel
check in DocAccessibleParent.

Differential Revision: https://phabricator.services.mozilla.com/D159452
2022-10-18 16:40:32 +00:00
Morgan Rae Reschenberg
ec1c2a165e Bug 1787282: [Part 2] Cache LINKS_TO relation information r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156138
2022-09-06 19:27:17 +00:00
Morgan Rae Reschenberg
c8469d0ad8 Bug 1787282: [Part 1] Modify relations caching infrastructure for rels with no implicit partner r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156126
2022-09-06 19:27:16 +00:00
James Teh
0787850ef9 Bug 1759971: Support MathML on a cached RemoteAccessible for Windows a11y clients. r=morgan
Windows a11y clients retrieve MathML markup using ISimpleDOMNode::innerHTML.
We cache innerHTML to support this, but only on math elements and only on Windows.
sdnAccessible had to be modified to support RemoteAccessible and to use the cache for this method.

Differential Revision: https://phabricator.services.mozilla.com/D155806
2022-08-30 02:29:17 +00:00
Morgan Rae Reschenberg
073e3d32d2 Bug 1780878: [Part 3] Cache FLOWS_TO and FLOWS_FROM relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152581
2022-08-03 05:09:56 +00:00
Morgan Rae Reschenberg
7c7272c8f2 Bug 1780878: [Part 2] Cache DESCRIBED_BY and DESCRIPTION_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152580
2022-08-03 05:09:55 +00:00
Morgan Rae Reschenberg
16fcce1b8a Bug 1780878: [Part 1] Cache CONTROLLED_BY and CONTROLLER_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152578
2022-08-03 05:09:55 +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
Morgan Rae Reschenberg
f84015c1ae Bug 1774043: [Part 1] Add cache domains, caching logic for LABEL_FOR and LABELLED_BY relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152100
2022-08-03 05:09:53 +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
e58f00a0c6 Bug 1780878: [Part 3] Cache FLOWS_TO and FLOWS_FROM relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152581
2022-08-02 02:51:06 +00:00
Morgan Rae Reschenberg
186ab99a74 Bug 1780878: [Part 2] Cache DESCRIBED_BY and DESCRIPTION_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152580
2022-08-02 02:51:05 +00:00
Morgan Rae Reschenberg
2743551b63 Bug 1780878: [Part 1] Cache CONTROLLED_BY and CONTROLLER_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152578
2022-08-02 02:51:05 +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
Morgan Rae Reschenberg
4d3f82861a Bug 1774043: [Part 1] Add cache domains, caching logic for LABEL_FOR and LABELLED_BY relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152100
2022-08-02 02:51:03 +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
fb48e7882f Bug 1780878: [Part 3] Cache FLOWS_TO and FLOWS_FROM relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152581
2022-07-26 21:35:42 +00:00
Morgan Rae Reschenberg
198910faa7 Bug 1780878: [Part 2] Cache DESCRIBED_BY and DESCRIPTION_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152580
2022-07-26 21:35:42 +00:00
Morgan Rae Reschenberg
7467b0247a Bug 1780878: [Part 1] Cache CONTROLLED_BY and CONTROLLER_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152578
2022-07-26 21:35:41 +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
Morgan Rae Reschenberg
094be633a1 Bug 1774043: [Part 1] Add cache domains, caching logic for LABEL_FOR and LABELLED_BY relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152100
2022-07-26 21:35:38 +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
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
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
3daa72eb49 Bug 1737919 part 3: Support spelling errors for cached RemoteAccessibles. r=morgan
Even though spelling errors can cross Accessibles and are represented in the DOM as ranges, we cache them for each text leaf.
This is necessary so that we correctly update the offsets when text is inserted or removed from a leaf.
We cache them as an array of offsets, including both the start and end offset for each range.
We use -1 as the start offset to indicate when a spelling error starts in a previous Accessible.
When a spelling error starts in an Accessible but ends in a subsequent one, we simply don't include an end offset in the array.
This structure means we can easily query spelling error points or ranges with a binary search.

Differential Revision: https://phabricator.services.mozilla.com/D147243
2022-05-27 10:56:41 +00:00
James Teh
447e69d94a Bug 1769166: Update the cache when text bounds change. r=morgan
We detect this in the same way that we detect whether we need to push line starts; i.e. a text update or a bounds change.
Since this is tied to the Text and Bounds domains, I removed the separate TextBounds domain.

Differential Revision: https://phabricator.services.mozilla.com/D147396
2022-05-27 03:00:34 +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
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
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
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
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
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
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
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
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
75a312e6e0 Bug 1748749 - P1: Push action name to cache. r=Jamie
We use an atom instead of a string because it a limited corpus of
strings so we don't need unique instances.

Differential Revision: https://phabricator.services.mozilla.com/D135905
2022-01-31 23:10:51 +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
6fc7b930b2 Bug 1748749 - P1: Push action name to cache. r=Jamie
We use an atom instead of a string because it a limited corpus of
strings so we don't need unique instances.

Differential Revision: https://phabricator.services.mozilla.com/D135905
2022-01-31 23:10:51 +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
dc6b629744 Bug 1748749 - P1: Push action name to cache. r=Jamie
We use an atom instead of a string because it a limited corpus of
strings so we don't need unique instances.

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