Closed Bug 1781536 Opened 2 years ago Closed 2 years ago

[CTW] Unify RelationByType in Accessible base

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

Details

(Whiteboard: [ctw-m2])

Attachments

(3 files)

Bug 1774043 added caching for relations. However, there are still different methods for LocalAccessible and RemoteAccessible; there's no common method in the base Accessible. Unifying this is necessary in order to support relations on Windows for cached RemoteAccessible, as well as cleaning up relations code for other platforms.

This is going to be a bit trickier than unifying other methods because LocalAccessible::RelationByType returns a Relation, but RemoteAccessible::RelationByType returns an array. Relation doesn't know how to handle RemoteAccessible, so it will need to be unified as well.

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.

This is basically RemoteExplicitHeadersIterator with naming generalised.
Support has been added for transferring ownership of the array into the iterator, which will be needed when the cache is disabled.

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.

Whiteboard: [ctw-m2]
Blocks: 1782172
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8d31c0604efe
part 1: Support base Accessible in Relation. r=morgan
https://hg.mozilla.org/integration/autoland/rev/95ae96802dbe
part 2: Introduce RemoteAccIterator. r=morgan
https://hg.mozilla.org/integration/autoland/rev/86da8f2a28ea
part 3: Move RelationByType to base Accessible. r=morgan
Blocks: 1783094
Regressions: 1786638
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: