-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=122602 Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-30 Reviewed by Ryosuke Niwa. Source/WebCore: When listitems are styled with display:block/float then inserting paragraph twice at end of listitem delete entire list. Generally when listitem is empty then we delete the listitem on inserting paragraph. In this issue, on inserting first paragraph one empty listitem is created, and on inserting second paragraph we try to delete that empty listitem. but it misbehave becasue of incomplete definition of htmlediting::isLisItem() and entire list is deleted. htmlediting::isListItem() check only render object to decide whether it is list or not, so if any LI element is block level then isListItem return false. Now after this patch if parent of current node is list element then node is treated as listItem. Test: editing/execCommand/hit-enter-twice-atendof-block-styled-listitem.html * editing/htmlediting.cpp: (WebCore::isListItem): Modified condition to check if parent node is list; LayoutTests: Testcase: When listitem is styled with display:block then inserting paragraph twice at the end of listitem should not remove entire list. * editing/execCommand/hit-enter-twice-atendof-block-styled-listitem-expected.txt: Added. * editing/execCommand/hit-enter-twice-atendof-block-styled-listitem.html: Added. TestCase: When listitem is made of custom tag(<item>) and css(display:list-item) then inserting paragraph twice at the end of listitem should not remove entire list. * editing/execCommand/hit-enter-twice-atendof-custom-listitem-expected.txt: Added. * editing/execCommand/hit-enter-twice-atendof-custom-listitem.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
69780866