mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00

When inserting `<li>` elements into `<ul>`, `<ol>` or `<li>` element, `HTMLEditor::DoInsertHTMLWithContext()` removes unnecessary empty `<li>` elements at insertion point. At this time, we've computed next insertion point with removed `<li>` element. Therefore, insertion point goes out from the DOM tree. This patch makes it compute new insertion point before removing each empty `<li>` element. Additionally, this patch adds some WPT data for testing this case. I verified that Chrome passes the new tests too. Differential Revision: https://phabricator.services.mozilla.com/D49394 --HG-- extra : moz-landing-system : lando