Closed Bug 1883562 Opened 3 months ago Closed 2 months ago

Make `AutoBlockElementsJoiner` work with one range instead of array of ranges

Categories

(Core :: DOM: Editor, task)

task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(2 files)

It tries to work with multiple ranges, but it stores members only from the first range of the array. Therefore, it may get odd result. I think that it should work per range and the user should use it in a loop of iterating the ranges.

It and its helper class, AutoInclusiveAncestorBlockElementsJoiner work with
multiple ranges, but they handle special cases only with the first range.
That means that deleting content will be different if same structure is selected
with multiple ranges and that must be not expected by the users.

Although from the maintenance cost point of view, we should not duplicate
EditorBase::DeleteRangesWithTransaction, but let's add a wrapper for it
for making the callers simpler.

Depends on D203853

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/cc5f86f00169
part 1: Make `AutoBlockElementsJoiner` work with one range r=m_kato
https://hg.mozilla.org/integration/autoland/rev/2947b8cd9661
part 2: Make `EditorBase::DeleteRangesWithTransaction` and the fallback path of `AutoDeleteRangesHandler` work with single range r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: