Create ReplaceTextTransaction to avoid creating both InsertTextTransaction and DeleteTextTransaction
Categories
(Core :: DOM: Editor, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Regressed 1 open bug)
Details
Attachments
(3 files)
Assignee | ||
Comment 1•4 years ago
|
||
Currently, when HTMLEditor
replaces text in a text node, HTMLEditor
creates a set of DeleteTextTransaction
and InsertTextTransaction
.
However, this has bad impact for footprint and causes the callers messy.
This patch creates ReplaceTextTransaction
instead and
HTMLEditor::ReplaceTextWithTransaction()
as its wrapper. Unfortunately,
this becomes not calling nsIEditActionListener::DidDeleteText()
, however,
this is not used by mozilla-central, comm-central nor BlueGriffon. IIRC,
it was not removed for some legacy addons of Thunderbird. Therefore, it
must be okay to remove it.
Depends on D75889
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D76078
Assignee | ||
Comment 3•4 years ago
|
||
It's not used by mozilla-central, comm-central nor BlueGriffon, and it cannot
work with replacing content, mutation event listener's changes. Therefore,
we should remove this for now. If we need to support this feature in some
business reasons, we should provide better API than this anyway.
Depends on D76079
Comment 5•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2ac7be4d8239
https://hg.mozilla.org/mozilla-central/rev/5f86836c31e5
https://hg.mozilla.org/mozilla-central/rev/7043d20f06b5
Description
•