Closed
Bug 1756528
Opened 3 years ago
Closed 3 years ago
TextRange::Crop doesn't crop siblings
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
99 Branch
Tracking | Status | |
---|---|---|
firefox99 | --- | fixed |
People
(Reporter: Jamie, Assigned: Jamie)
References
Details
(Whiteboard: [ctw-m1])
Attachments
(1 file)
I discovered this while working on cached text selection in bug 1741793.
Scenario:
<div><p id="p1">a</p><p id="p2">b</p></div>
- "b" is selected.
- Get SelectionRanges from the div. The returned range will contain only p2.
- Call Crop() on the range, passing it the Accessible for p1.
- Crop should return false. Instead, it returns true! The range still contains p2.
This causes HyperTextAccessibleBase::SelectionBoundsAt to return the wrong result for p1. This probably doesn't matter to clients, but it's certainly wrong.
Curiously, HyperTextAccessible::SelectionBoundsAt has the same bug, but it doesn't use TextRange::Crop.
Assignee | ||
Comment 1•3 years ago
|
||
I couldn't really understand the previous code well enough to fix it, so I reimplemented it to be easier to work with (I hope).
Updated•3 years ago
|
Attachment #9264924 -
Attachment description: Bug 1756528: Reimplement TextRange::Crop to fix a bug with cropping of siblings. → Bug 1756528: Fix cropping of siblings in TextRange::Crop.
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/325ad2f9160c
Fix cropping of siblings in TextRange::Crop. r=eeejay
Comment 3•3 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 3 years ago
status-firefox99:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Assignee | ||
Updated•3 years ago
|
Blocks: a11y-ctw-text
Whiteboard: [ctw-m1]
You need to log in
before you can comment on or make changes to this bug.
Description
•