Reviewed by John and Ken.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Mar 2005 21:35:32 +0000 (21:35 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Mar 2005 21:35:32 +0000 (21:35 +0000)
commita3f320a527dbfc2aae2038f9780f0b2a9e93a94d
treea03867d353081fa5b2b06ecc7d77350c94fef8b2
parentd89ddf9dc5eec8150aafe4b117fb5c330d46eb57
    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
LayoutTests/editing/deleting/delete-line-015-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-015.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-016-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-016.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-017-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-017.html [new file with mode: 0644]
LayoutTests/editing/style/smoosh-styles-002-expected.txt
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp