Introduce insertion point bounds for collapsed range
Categories
(Core :: Disability Access APIs, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox144 | --- | fixed |
People
(Reporter: eeejay, Assigned: eeejay)
References
Details
Attachments
(2 external files)
In mac there is an expectation to have the bounds of a collapsed range be a narrow rectangle where the insertion point would be. The bounds are identical to where the caret would typically be drawn if it were at that offset.
This differs from caret bounds in two ways:
- It can be queried when the caret is not at that particular point.
- It is not relevant for "special" offsets that only exist for carets, specifically insertion points past the last character, and special end of line insertion points for wrapped text.
| Assignee | ||
Comment 1•1 year ago
|
||
The WritingMode is a single byte bitfield that gives information on the orientation and base direction of the text in the frame.
The absence of the WritingMode in cache can imply the default horizontal LTR direction.
| Assignee | ||
Comment 2•1 year ago
|
||
As mentioned in the bug this method does not return bounds for special insertion points.
The bounds are probably correct 90% of the time, the exceptions are transition points in embedded bidi segments,
among other unforseen situations. These edge cases are things we can probably live with for the time being.
This addition also has a few changes:
- HyperTextAccessible::TextBounds now returns bounds for identical start and end offsets.
- TextLeafRange::Bounds now returns the insertion point for a collapsed range.
- The browser caret rect test now uses the insertion point rect to compare against the caret rect.
Depends on D259133
Comment 3•1 year ago
|
||
- It is not relevant for "special" offsets that only exist for carets, specifically insertion points past the last character, and special end of line insertion points for wrapped text.
Per discussion on Matrix, Mac still needs these, even though we can only get them at the caret. UIA is the same. I'd prefer that this special case of retrieving caret bounds is unified in cross-platform code rather than special casing in two places.
Comment 6•1 year ago
|
||
Comment 9•1 year ago
|
||
Backed out for causing mochitest failures
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | accessible/tests/browser/bounds/browser_caret_rect.js | 7: Collapsed range extents at caret position should be identical caret rect - [236,189,1] deepEqual [236,188,1] -
Comment 10•1 year ago
|
||
Comment 11•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/39a7f4fc6dc9
https://hg.mozilla.org/mozilla-central/rev/615582fb0d81
https://hg.mozilla.org/mozilla-central/rev/3324cce6026f
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Description
•