Closed
Bug 1787101
Opened 2 years ago
Closed 2 years ago
[CTW] OffsetAtPoint doesn't transform to HyperText offsets
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
106 Branch
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: Jamie, Assigned: Jamie)
References
Details
(Whiteboard: [ctw-m3])
Attachments
(1 file)
STR:
- Open this test case:
data:text/html,<p>a<span>b</span></p>
- Get the coordinates for the "b" character.
- Call OffsetAtPoint on the paragraph with the coordinates from 2).
- Expected: It should return 1.
- Actual: It returns 0.
The reason for this is simple: we return a TextLeafPoint offset without transforming it to a HyperText offset. I totally should have caught that during review, but I clearly didn't. We need to call TransformOffset on that offset before returning it.
The fix is easy. Testing it is going to be more annoying because of the usual pain that comes with dealing with coordinates.
Assignee | ||
Comment 1•2 years ago
|
||
Otherwise, the returned offset is incorrect if the point is in a child other than the first.
Updated•2 years ago
|
Assignee: nobody → jteh
Status: NEW → ASSIGNED
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0be134b13d29 HyperTextAccessibleBase::OffsetAtPoint: Transform the offset before returning it. r=morgan
Comment 3•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox106:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•