gecko-dev/accessible/android
James Teh d8a12f0303 Bug 1901457 part 2: Refactor TextLeafPoint caret retrieval so that the end of line insertion point can be stored without being tied to the current caret position. r=nlapre
Previously, TextLeafPoint::GetCaret() returned a placeholder representation of the caret.
ActualizeCaret() was then used to get the real caret position, optionally adjusting for the line end depending on the caller's needs.
This causes problems when we need to store the TextLeafPoint information in a UIA text range object because the only way to indicate the line end insertion point is to use the GetCaret() placeholder, but that also means the stored position changes if the caret moves.
For example, if you disabled NVDA's "caret moves review cursor" setting and then moved the caret, the review cursor should stay at the old position, but it didn't previously.

To fix this:

1. TextLeafPoint now has a new mIsEndOfLineInsertionPoint flag which is set to true by GetCaret() if appropriate.
2. GetCaret() sets mAcc and mOffset immediately, rather than needing to call ActualizeCaret() later.
3. TextLeafPoint methods still need to adjust the point to correctly handle the line end insertion point in some cases, but that is now handled by the private TextLeafPoint::AdjustEndOfLine method.
4. FindBoundary now correctly returns the previous character/cluster when requested for this end of line insertion point. Strictly speaking, this bug always existed, but no existing callers ever triggered it.

Differential Revision: https://phabricator.services.mozilla.com/D214342
2024-06-26 10:15:43 +00:00
..
AccessibleWrap.cpp Bug 1810596: When computing the text for a live region on Android, always include the text from the subtree. r=eeejay,geckoview-reviewers,ohall 2024-05-22 22:14:01 +00:00
AccessibleWrap.h Bug 1862802 part 5: Remove virtual cursor change event. r=eeejay 2023-11-29 03:53:20 +00:00
ApplicationAccessibleWrap.h
DocAccessibleWrap.cpp Bug 1896516 Part 8 - Remove nsIScrollableFrame usages under accessible/. r=layout-reviewers,emilio 2024-05-30 06:32:20 +00:00
DocAccessibleWrap.h
Platform.cpp Bug 1901457 part 2: Refactor TextLeafPoint caret retrieval so that the end of line insertion point can be stored without being tied to the current caret position. r=nlapre 2024-06-26 10:15:43 +00:00
RootAccessibleWrap.h Bug 1822004: On Android, use RemoteAccessible (CtW) hit testing instead of a DOM event. r=eeejay 2023-11-28 07:37:30 +00:00
SessionAccessibility.cpp Bug 1849398 - Gecko initiated a11y focus should not scroll. r=Jamie 2024-01-24 04:49:03 +00:00
SessionAccessibility.h Bug 1849398 - Gecko initiated a11y focus should not scroll. r=Jamie 2024-01-24 04:49:03 +00:00
TraversalRule.cpp Bug 1844238 part 1: Change includes of Role.h to mozilla/a11y/Role.h. r=eeejay 2023-07-26 02:19:41 +00:00
TraversalRule.h
moz.build Bug 1822004: On Android, use RemoteAccessible (CtW) hit testing instead of a DOM event. r=eeejay 2023-11-28 07:37:30 +00:00