Encapsulate `HTMLEditor::HandleDeleteSelectionInternal()` and helper methods into a stack only class
Categories
(Core :: DOM: Editor, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(8 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
For managing recursive calls, it should be reimplemented with a new stack only class.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
This patch just moves them into the new stack only class and make each of them
take HTMLEditor&
as their first argument.
Depends on D87035
Assignee | ||
Comment 2•4 years ago
|
||
Even though their method names in stack trace become too long, but we can
guarantee that they are used only at handling deletion.
Depends on D87432
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D87433
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D87434
Assignee | ||
Comment 5•4 years ago
|
||
Depends on D87435
Assignee | ||
Comment 6•4 years ago
|
||
Depends on D87436
Assignee | ||
Comment 7•4 years ago
|
||
For avoiding infinite recursive calls, AutoDeleteRangesHandler
returns
EditActionIgnored()
when it needs to fall it back to
DeleteRangesWithTransaction()
after modifying the DOM tree or the ranges
to delete. However, this makes developers understand the code harder.
And now, with making constructor of AutoDeleteRangesHandler
manage the
recursive call state, we can make HandleDeleteSelection()
stop handling
the fallback path.
Depends on D87437
Assignee | ||
Comment 8•4 years ago
|
||
When it returns EditActionIgnored()
,
AutoDeleteRangesHandler::HandleDeleteAroundCollapsedRanges()
creates another
AutoDeleteRangesHandler
instance to delete leaf content node in another
block element. However, this dependency makes developers understand the
behavior harder. Therefore, we should make the method do it instead.
Depends on D87438
Comment 10•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cfcc43e6e3b3
https://hg.mozilla.org/mozilla-central/rev/f79a9d5e908a
https://hg.mozilla.org/mozilla-central/rev/f47acf69dc40
https://hg.mozilla.org/mozilla-central/rev/28af71207f2e
https://hg.mozilla.org/mozilla-central/rev/0249f69af08d
https://hg.mozilla.org/mozilla-central/rev/0698263c5203
https://hg.mozilla.org/mozilla-central/rev/5550f1f7b49d
https://hg.mozilla.org/mozilla-central/rev/22d075d9eec9
Description
•