canMergeLists() should make sure that the list items do not belong to the same list

This issue is reproduced only when list is the only visible element
present. In this case, visible positions after & before the list's
parent node would be NULL and hence are treated as equal. Because of
this, isVisiblyAdjacent() and therefore canMergeLists() would return
true. This results in invoking mergeIdenticalElements where things go
wrong as we try to delete the second list and add its content to first
list, while we actually have only one list and should be merging the
list items of the same list.

In canMergeLists(), calling
isVisiblyAdjacent(positionInParentAfterNode(*firstList), positionInParentBeforeNode(*secondList)
makes sense only if firstList & secondList are different lists. Hence,
before invoking isVisiblyAdjacent() we need to check if the lists are
identical in which case return false from canMergeLists().

BUG=362463
TEST=LayoutTests/editing/deleting/merge-list-items-in-same-list.html

Review URL: https://codereview.chromium.org/242733004

git-svn-id: svn://svn.chromium.org/blink/trunk@172941 bbb929c8-8fbe-4397-9dbb-9b2b20218538