Closed Bug 1624633 Opened 5 years ago Closed 5 years ago

Factor methods operating on `Selection::mRanges` out

Categories

(Core :: DOM: Selection, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: mbrodesser, Assigned: mbrodesser)

References

(Blocks 1 open bug)

Details

Attachments

(9 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

Simplifies reasoning about them.

This allows methods operating on the ranges to be moved to that struct.

To see where this leads to, consider the following reviews.

Pushed by mbrodesser@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9add81beceb6 part 1) Move `Selection::mRanges` to `StyledRanges` struct. r=hsivonen https://hg.mozilla.org/integration/autoland/rev/b4c0ff4a139a part 2) Move `Selection::RemoveRangeInternal` to `StyledRanges::RemoveRangeAndUnregisterSelection`. r=hsivonen https://hg.mozilla.org/integration/autoland/rev/55795ecafd7d part 3) Move `FindInsertionPoint`. r=hsivonen https://hg.mozilla.org/integration/autoland/rev/83a065358c0e part 4) Move `GetIndicesForInterval`. r=hsivonen https://hg.mozilla.org/integration/autoland/rev/0df6851463dc part 5) Move `HasEqualRangeBoundariesAt`. r=hsivonen https://hg.mozilla.org/integration/autoland/rev/4b365ca0c7fd part 6) Annotate `nsRange::RegisterSelection` with `MOZ_CAN_RUN_SCRIPT`. r=hsivonen https://hg.mozilla.org/integration/autoland/rev/f569e40725db part 7) Move `MaybeAddRangeAndTruncateOverlaps`. r=hsivonen https://hg.mozilla.org/integration/autoland/rev/02695524b550 part 8) Move `GetCommonEditingHostForAllRanges`. r=hsivonen https://hg.mozilla.org/integration/autoland/rev/cb0754b89f5e part 9) Move `FindRangeData`. r=hsivonen
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: