Closed Bug 1730088 Opened 3 years ago Closed 3 years ago

Implement unified HyperTextAccessibleBase for TextSubstring, TextAtOffset and CharacterCount

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

Attachments

(11 files)

(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details

In order for Windows and ATK to support cached text, we need to support HyperTextAccessible for RemoteAccessible. To do that, we need to add a HyperTextAccessibleBase class which is used by both local and remote. This should not inherit from Accessible. HyperTextAccessible (the existing class for LocalAccessibles) will inherit from this new base as well as LocalAccessible. RemoteAccessible will also inherit from this new base.

Blocks: 1730093
No longer depends on: 1730087
Summary: Implement unified HyperTextAccessible base → Implement unified HyperTextAccessibleBase
No longer blocks: a11y-ctw
Assignee: nobody → jteh
Status: NEW → ASSIGNED

We're going to need the caching first, rather than the other way around.

No longer blocks: 1730093
Depends on: 1730093

Let's start with the methods we need to get a range of text, as well as word and line offsets.

Summary: Implement unified HyperTextAccessibleBase → Implement unified HyperTextAccessibleBase for TextSubstring, TextAtOffset and CharacterCount
Blocks: 1733513

This will contain methods that can be used for both local and remote Accessibles.
It is inherited into both HyperTextAccessible (local) and RemoteAccessibleBase.

Although HyperTextAccessibleBase implements these, we leave the HyperTextAccessible implementations (overriding the base) because they do caching.
Depending on performance, we may eventually want to move the caching into the base implementation.
I decided not to do this initially because it will use extra memory in the parent process and it may be a premature optimisation.

The implementation for RemoteAccessibleBase is just a stub; we don't cache the caret yet.
However, this needs to be in HyperTextAccessibleBase because it is used by ConvertMagicOffset, which will be moved in an upcoming patch.

This is pretty similar to HyperTextAccessible::TransformOffset.
However, the local implementation has to compensate for list bullet errors propagating from FindOffset/PeekOffset, which isn't relevant for TextLeafPoint.
Therefore, we leave the HyperTextAccessible implementation alone so it will still be used by HyperTextAccessible code (FindOffset, etc.).

The TextLeafPoint implementation works for both local and remote.
HyperTextAccessible calls the base implementation for supported boundaries when the cache is enabled.

Blocks: 1733514
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/52c6c1d60659 part 1: Add hyperTextAccessibleBase class. r=eeejay https://hg.mozilla.org/integration/autoland/rev/89f855907787 part 2: HyperTextAccessibleBase: Add methods for child index/text offset conversion. r=eeejay https://hg.mozilla.org/integration/autoland/rev/b96051622689 part 3: Move CharacterCount to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/be69e17a817a part 4: Move CaretOffset to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/1910e46ed82c part 5: Move ConvertMagicOffset to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/3d5b2d949109 part 6: Move TextSubstring to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/b91cb9d7de75 part 7: Move CharAt to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/0f6d7bf87aeb part 8: Move ToTextLeafPoint to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/18f24e8c925c part 9: Add HyperTextAccessibleBase::TransformOffset. r=eeejay https://hg.mozilla.org/integration/autoland/rev/4138ff98e3c6 part 10: Move TextAtOffset's TextLeafPoint implementation to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/f2ccbd5e0640 part 11: Move IsValidOffset/Range to HyperTextAccessibleBase. r=eeejay

Backed out for causing build bustages on DocAccessibleWrap.cpp.

Flags: needinfo?(jteh)
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/be33f25455cf part 1: Add hyperTextAccessibleBase class. r=eeejay https://hg.mozilla.org/integration/autoland/rev/ac706aab074a part 2: HyperTextAccessibleBase: Add methods for child index/text offset conversion. r=eeejay https://hg.mozilla.org/integration/autoland/rev/dff1962d50b9 part 3: Move CharacterCount to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/2606771b0e56 part 4: Move CaretOffset to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/992ae5fa0463 part 5: Move ConvertMagicOffset to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/bd2fafcb66e5 part 6: Move TextSubstring to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/e051c5fc35f1 part 7: Move CharAt to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/0c38c5bf8468 part 8: Move ToTextLeafPoint to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/6418e2c43224 part 9: Add HyperTextAccessibleBase::TransformOffset. r=eeejay https://hg.mozilla.org/integration/autoland/rev/3f79077627cc part 10: Move TextAtOffset's TextLeafPoint implementation to HyperTextAccessibleBase. r=eeejay https://hg.mozilla.org/integration/autoland/rev/888aa56bebb3 part 11: Move IsValidOffset/Range to HyperTextAccessibleBase. r=eeejay
Flags: needinfo?(jteh)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: