Do some clean up around `HTMLEditor::InsertObject`
Categories
(Core :: DOM: Editor, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox107 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
I worked on bug 1791695 without enough understanding of the code. Therefore, for understanding the code, I cleaned up some code. For now, I think that bug 1778565 which blocked by bug 1791695 should be fixed first because it's worked by non-editor-folks, and it does not require of the fix of bug 1791695 anymore.
Therefore, I think that I should land the clean up patches only for making the code clearer.
Assignee | ||
Comment 1•2 years ago
|
||
They use bool
arguments a lot. Therefore, some call-sites are hard to read.
They should be replaced with enum class
es. Note that this patch does not
make the raw value of new enum class
es to bool
unless they are used in the
heap.
Depends on D158339
Assignee | ||
Comment 2•2 years ago
|
||
It just creates HTMLWithContextInserter
and calls its Run()
. Then, Run()
works as a sub action handler. Therefore, we can make DoInsertHTMLWithContext
(which sounds like a helper class of a handler method) a sub action handler.
Then, it can handle the optional insertion point in it and
HTMLWithContextInserter::Run
does not need to handle it.
Depends on D158481
Assignee | ||
Comment 3•2 years ago
|
||
It's always called with DeleteSelectedContent::Yes
. Therefore, the argument
is not required. Then, its name can be InsertFromTransferableAtSelection
.
Depends on D158482
Comment 5•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9822a6f424d4
https://hg.mozilla.org/mozilla-central/rev/b370875c1966
https://hg.mozilla.org/mozilla-central/rev/1e29e76c1d7c
Description
•