Closed Bug 1741793 Opened 2 years ago Closed 2 years ago

Cache text selection

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

Details

(Whiteboard: [ctw-m1])

Attachments

(6 files)

We need to cache text selection ranges in the parent process cache.

Assignee: nobody → jteh

This class needs to be updated to support base Accessible and it doesn't make sense to port methods that can never be used.
Also, any new functionality (e.g. needed for the UIA text pattern) should now be implemented using TextLeafPoint/Range, not TextRange.

Even though we'd ideally be using TextLeafRange for new things, TextRange is still needed by our selection events (which still use HyperText offsets) and IA2/ATK clients which depend on HyperText offsets.
Thus, we need TextRange to support RemoteAccessible.

Although the start and end containers are HyperTextAccessibles, I chose to store Accessible rather than HyperTextAccessibleBase because HyperTextAccessibleBase doesn't inherit from Accessible and having an Accessible is easier.

XPCOM needs to hold a reference to any state objects.
Because we can't hold a reference to an Accessible (due to RemoteAccessible), xpcAccessibleTextRange holds references to xpcAccessibleHyperText instead.

This uses selection changed and caret moved events.

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.

Blocks: 1756528
Attachment #9264913 - Attachment description: Bug 1741793 part 2: Update TextRange to use base Accessible. → Bug 1741793 part 2: Update TextPoint/Range to use base Accessible.
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e46f519715bb
part 1: Remove TextRange stuff that was never implemented. r=eeejay
https://hg.mozilla.org/integration/autoland/rev/9b08846e5ee3
part 2: Update TextPoint/Range to use base Accessible. r=eeejay
https://hg.mozilla.org/integration/autoland/rev/65397920b811
part 3: Cache text selection in the parent process. r=eeejay
https://hg.mozilla.org/integration/autoland/rev/639172abb542
part 4: Implement text selection querying for cached RemoteAccessible. r=eeejay
https://hg.mozilla.org/integration/autoland/rev/364cf24d2689
part 5: Update XPCOM, Windows and ATK to support cached text selection querying. r=eeejay
https://hg.mozilla.org/integration/autoland/rev/c817b1fb4e22
part 6: Add tests to exercise RemoteAccessible text selection retrieval. r=eeejay
Regressions: 1764249
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: