Stop calling node() and deprecatedEditingOffset() in comparePositions
https://bugs.webkit.org/show_bug.cgi?id=54535
Reviewed by Enrica Casucci.
Source/WebCore:
Replaced deprecatedNode() and deprecatedEditingOffset() by containerNode() and computeOffsetInContainerNode()
in comparePositions().
In addition, fixed a bunch of bugs in DeleteSelectionCommand::handleSpecialCaseBRDelete revealed by this change:
- Use node after position instead of deprecated node in determinig whether start and end positions at a br.
- Don't set m_startsAtEmptyLine true when BR is wrapped in a block element. The only reason this code had worked
was positions like (div, offset, 0) and (br, before) in <div><br> were treated differently, which we no longer do.
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
* editing/htmlediting.cpp:
(WebCore::comparePositions):
LayoutTests:
Rebaselined existing tests. There are no user-visible changes.
* editing/inseting/font-size-clears-from-typing-style-expected.txt: No longer keeps div's around
when merging paragraphs.
* platform/mac/editing/deleting/delete-br-002-expected.txt:
* platform/mac/editing/deleting/delete-br-004-expected.txt:
* platform/mac/editing/deleting/delete-br-005-expected.txt:
* platform/mac/editing/deleting/delete-br-006-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121303
268f45cc-cd09-0410-ab3c-
d52691b4dbfc