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)
commit05c0a1a2908332ed2bfafa07930a01c884dc9c19
tree8dcd79cda0abaa0d512660d24327298f8edd8e31
parent4001b58631ae6ab6f83b0d8d43f9c748a41864a4
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: https://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