Redesign `nsIEditActionListener::WillDeleteSelection()`
Categories
(Core :: DOM: Editor, enhancement, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox81 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(3 files)
It takes Selection and it's called by EditorBase::DeleteSelectionWithTransaction(). However, its user is only FinderHighlighter and it just wants the ranges. So, we should make it take array of ranges instead of Selection.
(Although, nsIEditActionListener has negative effect for editor performance, so, we should make FinderHighligher stop using it as soon as possible.)
| Assignee | ||
Comment 1•6 years ago
|
||
Currently, nsIEditActionListener::WillDeleteSelection() notifies
FinderHighliter of deleting selection ranges. But it's referred only
the ranges, not selection object itself and editor shouldn't modify
Selection as far as possible for reducing the runtime cost.
Therefore, it should be replaced with this new API. Then,
EditorBase::WillDeleteSelectionWithTransaction() can be rewritten as
EditorBase::WillDeleteRangesWithTransaction() later.
Depends on D85578
| Assignee | ||
Comment 2•6 years ago
|
||
For making editor performance better and editor code simpler, I want to
stop modifying Selection as far as possible. Therefore, I'd like to
get rid of nsIEditActionListener. Instead, there is new API,
nsIEditActionListener::WillDeleteRanges(). This patch rewrites
FinderHighlighter#WillDeleteSelection() to
FinderHighlighter#WillDeleteRanges().
Depends on D85681
| Assignee | ||
Comment 3•6 years ago
|
||
Depends on D85682
Updated•6 years ago
|
Updated•6 years ago
|
Comment 5•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/383394e45625
https://hg.mozilla.org/mozilla-central/rev/ae648f1dd7c9
https://hg.mozilla.org/mozilla-central/rev/86048138135b
Description
•