Skip to content
Snippets Groups Projects
user avatar
Masayuki Nakano authored
Bug 1747008 - Make `HTMLEditor::OnEndHandlingTopLevelEditSubActionInternal` stop stripping empty inline elements if they may be inserted intentionally r=m_kato

Starting from bug 1730429, we strip empty inline elements at caret for
compatibility with Blink/WebKit.  However, we should not do it for the elements
which are intentionally inserted (from `inserthtml` command, paste and DnD).

All the cases are handled by `HTMLEditor::HTMLWithContextInserter` so that
it should prevent the new clean up with `TopLevelEditSubActionData`.

Note that `inserthtml` command handling of Blink is really odd.  It inserts
the empty inline elements of the adding testcases into different place so that
Chrome does not pass the new tests.  However, it does not make sense and I
believe that it's out of scope of this bug.

Differential Revision: https://phabricator.services.mozilla.com/D135195
acff6281
History