Remove `nsIDocumentStateListener::NotifyDocumentCreated()`
Categories
(Core :: DOM: Editor, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Meaningful implementation of nsIDocumentStateListener::NotifyDocumentCreated()
is only ComposerCommandsUpdater
. But it's already stored by HTMLEditor
, thus, EditorBase::NotifyDocumentListeners()
can notify ComposerCommandsUpdater
of everything without nsIDocumentStateListener
interface. Therefore, we can get rid of it.
Assignee | ||
Comment 1•5 years ago
|
||
This patch makes EditorBase::NotifyDocumentListeners()
notify
ComposerCommandsUpdater
via HTMLEditor::mComposerCommandsUpdater
directly.
Therefore, ComposerCommandsUpdater
can stop inheriting
nsIDocumentStateListener
.
Note that this patch also makes ComposerCommandsUpdater::UpdateCommandGroup()
not take nsAString
as its parameter because inlinning the
nsIDocumentStateListener
requires ComposerCommandsUpdater.h
to include
nsAString.h
, but it's redundant and UpdateCommandGroup()
just compares
it with literal strings. Therefore, using enum class
for specifying command
group is faster.
Assignee | ||
Comment 2•5 years ago
|
||
There is no meaningful listener of this so that we can get rid of it.
Depends on D61357
Assignee | ||
Comment 3•5 years ago
|
||
Not tested yet.
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/badf2dc13775
https://hg.mozilla.org/mozilla-central/rev/78a3452181fa
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Description
•