Closed Bug 1607783 Opened 5 years ago Closed 5 years ago

Check precondition `aStartOffset <= aEndOffset` in `nsRange::IsNodeSelected`

Categories

(Core :: DOM: Selection, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: mbrodesser-Igalia, Assigned: mbrodesser-Igalia)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Otherwise it's hard to reason about the method and its implementation, moreover it could return wrong results.

Summary: Assert `aStartOffset <= aEndOffset` for `nsRange::IsNodeSelected` → Assert `aStartOffset <= aEndOffset` in `nsRange::IsNodeSelected`
Summary: Assert `aStartOffset <= aEndOffset` in `nsRange::IsNodeSelected` → Check invariant `aStartOffset <= aEndOffset` in `nsRange::IsNodeSelected`
Summary: Check invariant `aStartOffset <= aEndOffset` in `nsRange::IsNodeSelected` → Check precondition `aStartOffset <= aEndOffset` in `nsRange::IsNodeSelected`
Attachment #9119667 - Attachment description: Bug 1607783: check invariant in `nsRange::IsNodeSelected`. r=smaug → Bug 1607783: check precondition in `nsRange::IsNodeSelected`. r=smaug
Pushed by mbrodesser@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/221163f3f179 check precondition in `nsRange::IsNodeSelected`. r=smaug
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: