Bug 1694255 - Allow delete previous block element. r=masayuki
commitb87fac8911ad2830d0b089ecf165716bbb5aa68a
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 20 May 2021 08:52:00 +0000 (20 08:52 +0000)
committerMakoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 20 May 2021 08:52:00 +0000 (20 08:52 +0000)
tree3cb7cbac8594cf88171c515a8ee52e40535a53f5
parentb70d8a2bdb1a845c1d1812d272bb8f205d3f9a81
Bug 1694255 - Allow delete previous block element. r=masayuki

This fix allows that we can remove previous div block that isn't editable.

```
<div contenteditable>foo<div contenteditable=false>bar</div><[]baz</div>
```

Our text scanner can reach previous text node in other block when deleting
text even if text node is read-only. In this situation, we try joining each
block. But since target element/node isn't editable, this operation is
failure.

So we should use atomic deletion instead for this case.

Differential Revision: https://phabricator.services.mozilla.com/D115341
editor/libeditor/HTMLEditorDeleteHandler.cpp
editor/libeditor/WSRunObject.h
editor/libeditor/tests/browserscope/lib/richtext2/currentStatus.js
testing/web-platform/meta/editing/run/delete.html.ini