Closed Bug 1755420 Opened 3 years ago Closed 3 years ago

Clean up HyperTextAccessible methods now that all boundaries are supported by TextLeafPoint

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ctw-m1])

Attachments

(2 files)

With the exception of BOUNDARY_CHAR which must be handled specially due to embedded objects being characters, HyperTextAccessibleBase now uses TextLeafPoint for all other boundaries. This means we can remove a bunch of case statements and if checks.

Also, HyperTextAccessible isn't currently using HyperTextAccessibleBase for BOUNDARY_CHAR when the cache is enabled. This was an oversight. However, fixing that surfaced a bug which I hadn't previously noticed.

We need to adjust the offset if the caret is at the end of the line in this case.

This also causes HyperTextAccessible to use HyperTextAccessibleBase for BOUNDARY_CHAR when the cache is enabled.
The fact that we weren't doing this already was an oversight.

Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a3cfe47a020c part 1: Fix HyperTextAccessibleBase::TextAfterOffset when called with BOUNDARY_CHAR and TEXT_OFFSET_CARET. r=morgan https://hg.mozilla.org/integration/autoland/rev/f1f8a381f403 part 2: Remove unnecessary case/if statements now that all boundaries (except CHAR) are implemented by TextLeafPoint. r=morgan

Backed out 4 changesets (bug 1730090, bug 1755604, bug 1755420) for causing build bustages in accessible/base/TextLeafRange.cpp

Backout link: https://hg.mozilla.org/integration/autoland/rev/6938c3b26d145c7e2c77f078566463df66d45359

Push with failures

Failure log

NFO -  In file included from Unified_cpp_accessible_base1.cpp:29:
[task 2022-02-18T06:06:16.637Z] 06:06:16    ERROR -  /builds/worker/checkouts/gecko/accessible/base/TextLeafRange.cpp:361:15: error: expected unqualified-id
[task 2022-02-18T06:06:16.637Z] 06:06:16     INFO -      if (RefPtr{aAcc->DisplayStyle()} == nsGkAtoms::block ||
Flags: needinfo?(jteh)
Flags: needinfo?(jteh)
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/86335bec494a part 1: Fix HyperTextAccessibleBase::TextAfterOffset when called with BOUNDARY_CHAR and TEXT_OFFSET_CARET. r=morgan https://hg.mozilla.org/integration/autoland/rev/fac8cd3d8e8d part 2: Remove unnecessary case/if statements now that all boundaries (except CHAR) are implemented by TextLeafPoint. r=morgan
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: