Closed Bug 1972539 Opened 9 months ago Closed 9 months ago

crash [@ mozilla::a11y::TextRange::CommonParent ]

Categories

(Core :: Disability Access APIs, defect)

Desktop
Windows
defect

Tracking

()

RESOLVED FIXED
142 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox-esr140 --- disabled
firefox139 --- disabled
firefox140 --- disabled
firefox141 --- disabled
firefox142 --- fixed

People

(Reporter: mkmelin, Assigned: Jamie)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: crash, regression, Whiteboard: [uiaShipBlocker])

Crash Data

Attachments

(1 file, 1 obsolete file)

Crash Signature: crash [ @mozilla::a11y::TextRange::CommonParent ] → [@ mozilla::a11y::TextRange::CommonParent ]
Summary: crash [ @mozilla::a11y::TextRange::CommonParent ] → crash [@ mozilla::a11y::TextRange::CommonParent ]
Severity: -- → S3

FYI seems like the two crash reports above are thunderbird specific, and windows as well

Hardware: Unspecified → Desktop
Blocks: uia
Keywords: crash, regression
Regressed by: 1957314
Whiteboard: [uiaShipBlocker]
OS: Unspecified → Windows
Blocks: uiatext
No longer blocks: uia

Set release status flags based on info from the regressing bug 1957314

:Jamie, since you are the author of the regressor, bug 1957314, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(jteh)

Chill, bot. I'm on it. :)

Assignee: nobody → jteh
Flags: needinfo?(jteh)

These are implemented in HyperTextAccessibleBase.
Having local and remote use the same implementation makes things simpler, more consistent, easier to test and easier to reason about.
This is also necessary in order to properly test the fix in the next patch.

This breaks the rare edge case of selecting only empty containers for LocalAccessible.
This never worked for RemoteAccessible anyway, which is the majority of content now.
Bug 1973154 has been filed for this.

It is possible for a DOM selection to start or end within an empty container.
In this case, we have offset 0 in an empty HyperTextAccessible.
This caused two problems.

First, DocAccessibleParent::SelectionRanges previously treated a range as invalid (and thus skipped it) if the offset was >= the character count in the container.
While this usually makes sense, it is problematic for empty containers.
To fix this, always treat offset 0 as valid.

Second, GetChildAtOffset returns null when called on an empty container with offset 0, since there's no child for it to return.
Previously, TextRange::Crop wasn't handling this, resulting in a crash.
To fix this, just use the start/end container itself if GetChildAtOffset returns null.

No longer blocks: 1973154
Depends on: 1946645

Comment on attachment 9495911 [details]
Bug 1972539 part 1: Remove HyperTextAccessible::SelectionCount and SelectionBoundsAt.

Revision D254466 was moved to bug 1946645. Setting attachment 9495911 [details] to obsolete.

Attachment #9495911 - Attachment is obsolete: true
Attachment #9495912 - Attachment description: Bug 1972539 part 2: Fix handling of empty containers in TextRange::Crop. → Bug 1972539: Fix handling of empty containers in TextRange::Crop.
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch

The patch landed in nightly and beta is affected.
:Jamie, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(jteh)
Flags: needinfo?(jteh)
QA Whiteboard: [qa-triage-done-c143/b142]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: