gecko-dev/accessible
James Teh 633f202e6d Bug 1821954: Make HyperTextAccessible::Char/TextBounds use HyperTextAccessibleBase when the cache is enabled. r=morgan
This is consistent with other HyperTextAccessible methods such as TextAtOffset.
It allows us to test the new implementation with LocalAccessible.
This is especially useful because we have better test coverage in our HyperText tests than we do in our TextLeafPoint tests.

In fact, running the tests with this change uncovered some bugs which I had to fix here.

First, TextLeafPoint::ComputeBoundsFromFrame was preferring to stick to the end of the first frame when on a boundary, rather than using the next frame.
For example, if we had the text "a\nb" where "b" is split into a continuation, offset 2 "b" was previously using the primary frame instead of the continuation.
This isn't a problem in HyperTextAccessible::GetBoundsInFrame because it walks to the next continuation if needed, since it is dealing with a range of offsets.
This is fixed by preferring the beginning of the next frame instead.

Second, passing the text length as the offset (i.e. one past the last character) should return a 0 rect.
TextLeafPoint::CharBounds needed to be tweaked accordingly.

Third, if TextLeafPoint returns a 0 rect (e.g. because a RemoteAccessible doesn't have a cache yet), HyperTextAccessibleBase needs to respect that and return it untouched.

Differential Revision: https://phabricator.services.mozilla.com/D172533
2023-03-21 01:23:40 +00:00
..
android Bug 1607634 - Part 4b: Changes for not-nullable actor types being wrapped in NotNull, r=ipc-reviewers,necko-reviewers,mccr8 2023-03-20 15:40:36 +00:00
aom Bug 1794043: Improve AccAttributes ergonomics, r=eeejay 2022-10-13 01:00:57 +00:00
atk Bug 1757127 part 2: Use the unified Language method for ATK, IA2 and XPCOM. r=nlapre 2023-01-17 20:35:22 +00:00
base Bug 1821954: Make HyperTextAccessible::Char/TextBounds use HyperTextAccessibleBase when the cache is enabled. r=morgan 2023-03-21 01:23:40 +00:00
basetypes Bug 1821954: Make HyperTextAccessible::Char/TextBounds use HyperTextAccessibleBase when the cache is enabled. r=morgan 2023-03-21 01:23:40 +00:00
docs Bug 1800949 - add accessibility Architecture doc with info on trees. r=morgan,Jamie 2022-11-18 00:50:58 +00:00
generic Bug 1821954: Make HyperTextAccessible::Char/TextBounds use HyperTextAccessibleBase when the cache is enabled. r=morgan 2023-03-21 01:23:40 +00:00
html Bug 1818413 - Add some null pointer checks in HTMLImageMapAccessible::UpdateChildAreas r=Jamie 2023-03-08 15:40:52 +00:00
interfaces Bug 1814220 - Allow ignoring list item markers in TextLeafPoint::FindBoundary. r=Jamie 2023-02-22 04:17:31 +00:00
ipc Bug 1814686 - Part 1b: Add nullable annotations to refcounted types in ipdl, r=ipc-reviewers,mccr8 2023-03-20 15:40:37 +00:00
mac Bug 1822170 - Handle any kind of NSRanges provided to AXAttributedStringForRange. r=Jamie 2023-03-20 22:01:27 +00:00
other Bug 1778433 part 3: Remove defunct *AccessibleWrap types. r=nlapre 2022-11-22 04:55:11 +00:00
tests Bug 1822170 - Handle any kind of NSRanges provided to AXAttributedStringForRange. r=Jamie 2023-03-20 22:01:27 +00:00
windows Bug 1818176: Support querying to IAccessibleImage. r=nlapre 2023-02-23 23:42:23 +00:00
xpcom Bug 1816573 - Use flags in TextLeafPoint::FindBoundary instead of boolean arguments. r=Jamie 2023-02-21 16:37:23 +00:00
xul Bug 755621 - Add downcasting for nsXULTreeItemAccessibleBase. r=nlapre 2023-02-20 06:37:16 +00:00
moz.build Bug 1815774 - Introduce TextLeafPoint XPCOM bindings and tests. r=Jamie 2023-02-13 17:56:12 +00:00