Not possible to remove the 'li' element inside the table cell
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Aug 2017 12:22:33 +0000 (12:22 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Aug 2017 12:22:33 +0000 (12:22 +0000)
commit4bb32e8c8f7f524b1d48f2069faadcae8373bde1
tree8dcd79cda0abaa0d512660d24327298f8edd8e31
parentb098bf6495850cd094e64d98ef5cbad9a9e29a63
Not possible to remove the 'li' element inside the table cell
https://bugs.webkit.org/show_bug.cgi?id=173148

Reviewed by Ryosuke Niwa.

Source/WebCore:

We need to add a new case for breaking out empty list items when they are
at the start of an editable area. Since list items can be also inside
table cells, we need to consider this kind of elements as well.

Tests: editing/deleting/delete-list-items-in-table-cell-1.html
       editing/deleting/delete-list-items-in-table-cell-2.html
       editing/deleting/delete-list-items-in-table-cell-3.html
       editing/deleting/delete-list-items-in-table-cell-4.html
       editing/deleting/delete-list-items-in-table-cell-5.html
       editing/deleting/delete-list-items-in-table-cell-6.html
       editing/deleting/delete-list-items-in-table-cell-7.html
       editing/deleting/delete-list-items-in-table-cell-8.html

* editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteKeyPressed):

LayoutTests:

Regression tests for different scenarios of list items removal.

* editing/deleting/delete-list-items-in-table-cell-1-expected.txt: Added.
* editing/deleting/delete-list-items-in-table-cell-1.html: Added.
* editing/deleting/delete-list-items-in-table-cell-2-expected.txt: Added.
* editing/deleting/delete-list-items-in-table-cell-2.html: Added.
* editing/deleting/delete-list-items-in-table-cell-3-expected.txt: Added.
* editing/deleting/delete-list-items-in-table-cell-3.html: Added.
* editing/deleting/delete-list-items-in-table-cell-4-expected.txt: Added.
* editing/deleting/delete-list-items-in-table-cell-4.html: Added.
* editing/deleting/delete-list-items-in-table-cell-5-expected.txt: Added.
* editing/deleting/delete-list-items-in-table-cell-5.html: Added.
* editing/deleting/delete-list-items-in-table-cell-6-expected.txt: Added.
* editing/deleting/delete-list-items-in-table-cell-6.html: Added.
* editing/deleting/delete-list-items-in-table-cell-7-expected.txt: Added.
* editing/deleting/delete-list-items-in-table-cell-7.html: Added.
* editing/deleting/delete-list-items-in-table-cell-8-expected.txt: Added.
* editing/deleting/delete-list-items-in-table-cell-8.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@220398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-list-items-in-table-cell-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-1.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-2-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-2.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-3-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-3.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-4-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-4.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-5-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-5.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-6-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-6.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-7-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-7.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-8-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-list-items-in-table-cell-8.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/TypingCommand.cpp