Skip to content
Snippets Groups Projects
Commit ad9ca596 authored by Masayuki Nakano's avatar Masayuki Nakano
Browse files

Bug 1891659 - Make `AutoBlockElementsJoiner::DeleteTextAtStartAndEndOfRange()`...

Bug 1891659 - Make `AutoBlockElementsJoiner::DeleteTextAtStartAndEndOfRange()` handle the case when the range in a text node r=m_kato

It assumes that the range is always starts and ends in different node.  This
is true for now, but this will be called with a text node to delete only
preformatted line break.  Note that the only caller of it does not need the
text node(s) if it becomes empty.  Therefore, this patch makes it remove the
text node in such case.

Note that the test changed in
`input-events-get-target-ranges-deleting-in-list-items.tentative.html` was
wrong and only Firefox passed it because the range description was
`(#text "", 0) - (#text "", 10)` since the text nodes are removed after
deleting the text data of them.  Now, they become
`(#text "list-item1", 0) - (#text "list-item2", 10)`.

Depends on D207688

Differential Revision: https://phabricator.services.mozilla.com/D207689
parent 83e260a7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment