Reviewed by John and Ken.
- fixed <rdar://problem/
4044347> REGRESSION (Mail): Control-K in particular message moves insertion point to previous line
Tweaked the deleting code, and added three new deleting layout tests to confirm the new code works.
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Removed special case with comment that said it was
for the case where a "selection contains only a BR right after a block ended". This code was being triggered in
more cases than just that one, and in all the cases I tested, the general delete code works fine.
(khtml::DeleteSelectionCommand::handleGeneralDelete): Changed the code that decides whether to delete an entire
block to understand the case where the end block is outside the start block, but contains the start block.
In that case, we want to delete the entire block. Not deleting the block was causing us to delete just the <br>,
and not the enclosing <div> in the case in the bug.
* layout-tests/editing/deleting/delete-line-015-expected.txt: Added.
* layout-tests/editing/deleting/delete-line-015.html: Added.
* layout-tests/editing/deleting/delete-line-016-expected.txt: Added.
* layout-tests/editing/deleting/delete-line-016.html: Added.
* layout-tests/editing/deleting/delete-line-017-expected.txt: Added.
* layout-tests/editing/deleting/delete-line-017.html: Added.
* layout-tests/editing/style/smoosh-styles-002-expected.txt: Updated to improved results. With the code change, the deletion
now deletes more than it used to. The old results had an empty text node and <h1> element that were both 0-sized, and now
we delete both of those.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8871
268f45cc-cd09-0410-ab3c-
d52691b4dbfc