Closed Bug 1718815 Opened 3 years ago Closed 3 years ago

Move some methods/nested classes of `EditorBase` to `HTMLEditor`

Categories

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

task

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Some methods and nested classes of EditorBase are not used by TextEditor. So, we can move them to HTMLEditor.

Unfortunately, marking its constructor and destructor as MOZ_CAN_RUN_SCRIPT,
Maybe<AutoSelectionRestorer>::reset() and
Maybe<AutoSelectionRestorer>::emplace() cause bustage. Therefore, this patch
just mark them as MOZ_CAN_RUN_SCRIPT_BOUNDARY.

Note that EditorBase::SavedSelectionRef() cannot be moved to HTMLEditor
because mEditActionData is a private member of EditorBase.

Depends on D119001

I guess that this class is replaced with AutoPlaceholderBatch, and both of
them are followed by its instances. However, I don't want to change the
behavior in this bug. Therefore, this patch just moves it into HTMLEditor.

Depends on D119002

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/f32e7018fa64
part 1: Move `EditorBase::AddTransactionListener()` and `EditorBase::RemoveTransactionListener()` to `HTMLEditor` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/71b725af1aba
part 2: Move `EditorBase::AutoSelectionRestorer` and `EditorBase` methods called only by it to `HTMLEditor` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/c118124ce70e
part 3: Move `EditorBase::AutoTransactionBatch` to `HTMLEditor` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/c471c8c0a12a
part 4: Move `EditorBase::AppendNodeToSelectionAsRange()` and `EditorBase::ClearSelection()` to `HTMLEditor` r=m_kato
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: