No hang when inserting a list over uneditable element in contenteditable
While firstEditablePositionAfterPositionInRootAlgorithm() is running,
we can get the next editable paragraph under the highest editable
node by skipping non-editable paragraph.
However, if an editable paragraph has a non-editable child, the next
paragraph can be the same editable paragraph that is the parent of the
non-editable child. In this case, we can't get the next editable
paragraph in InsertListCommand::doApply's while loop. As a result,
the while loop can't break, which makes the tab hang.
Here is the example:
<div contenteditable="true">
<p>line1<button contenteditable="false">hello</button></p>
<p>line2</p>
</div>
This CL allows to get the next editable paragraph by considering the
non-editable child element.
BUG=571420
TEST=editing/selection/insert-list-over-uneditable-in-contenteditable.html
Review-Url: https://codereview.chromium.org/2250133004
Cr-Commit-Position: refs/heads/master@{#412925}
2 files changed