Closed Bug 1657269 Opened 4 years ago Closed 4 years ago

Make `HTMLEditor::HandleDeleteSelectionInternal()` not retrieve ranges to delete via `Selection`

Categories

(Core :: DOM: Editor, task, P2)

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(2 files)

No description provided.
Severity: -- → S3
Type: defect → task
Priority: -- → P2

This patch moves EditorBase::ExtendSelectionForDelete() into AutoRangeArray
and make it stop modifying Selection.

The method extends anchor-focus range with nsFrameSelection and it refers
bidi information in it too. Therefore, it needs to be called before modifying
anchor-focus range of Selection. Unfortunately, this makes the code messy,
but for now, we should take this. In the future, we should make the API of
nsFrameSelection free from Selection.

Depends on D85999

Now, only when deleting table cell contents, HandleDeleteSelectionInternal()
depends on Selection. However, this can be moved to HandleDeleteSelection()
because recursive callers expects Selection is collapsed by its previous job.

Depends on D86182

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/9d8f213f722d part 1: Move `EditorBase::ExtendSelectionForDelete()` into `AutoRangeArray` r=m_kato https://hg.mozilla.org/integration/autoland/rev/7941839958b6 part 2: Make `HTMLEditor::HandleDeleteSelectionInternal()` take `AutoRangeArray` instead of referring `Selection` ranges r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Regressions: 1677566
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: