[Webkit-unassigned] [Bug 122602] contentEditable deleting lists when list items are block level

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 26 11:47:10 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=122602


Santosh Mahto <santosh.ma at samsung.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |santosh.ma at samsung.com




--- Comment #5 from Santosh Mahto <santosh.ma at samsung.com>  2013-10-26 11:45:56 PST ---
Description:
Currently when list item is empty then on hitting Enter it should be deleted.
which is done here  CompositeEditCommand::breakOutOfEmptyListItem()

This function check for isListItem() to decide about deletion.
So if listItem is last item then this line casues actual deletion:
 removeNode(isListItem(previousListNode.get()) || isListElement(previousListNode.get()) ? emptyListItem.get() : listNode.get());


But here isListItem() doesnot decide properly about listItems.

Actually this is how renderobject are created.

case1:              LI : no display  -------------> RenderListItem.
case2:              LI : dislay: block -------------> RenderBlock
case3:              LI :display:LIST_ITEM -------> RenderListItem.

isListItem return true in case 1 and 2 becasue it check of type of renderobject which is listItem , perfect
But in case2 since renderObject is block so isListItem return false. 

But all are listItem.
So I modified the code to check tag name  then renderObject to confirm it is listitem.

Please reply if anywhere i confused or any suggestion

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list