Reviewed by Harrison
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Nov 2004 22:23:23 +0000 (22:23 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Nov 2004 22:23:23 +0000 (22:23 +0000)
commit35735702ff8303d67d9e9660fb954b996b657313
treed20930f4aaaf894277396c067e9a713287d6e980
parenta26262907cefe1b13035b11cfe6f8cfbb8f49078
    Reviewed by Harrison

        Some improvements to deleting when complete lines are selected.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::initializePositionData): Detect when the line containing
        the end of a selection is fully selected. Turn off block merging in this case.
        (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Fix a bug in the check for
        whether a BR immediately followed a block. The old code could erroneously skip nodes.
        (khtml::DeleteSelectionCommand::handleGeneralDelete): Add a case for when the entire
        start block is selected. This new code will now delete this block in one call, rather
        than iterating over each child.
        * khtml/editing/visible_position.cpp:
        (khtml::visiblePositionsOnDifferentLines): New helper called in initializePositionData()
        to do the work mentioned above in the comment for that function.
        (khtml::isFirstVisiblePositionOnLine): Ditto.
        (khtml::isLastVisiblePositionOnLine): Ditto.
        * khtml/editing/visible_position.h: Add new functions.
        * layout-tests/editing/deleting/delete-line-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-001.html: Added.
        * layout-tests/editing/deleting/delete-line-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-002.html: Added.
        * layout-tests/editing/deleting/delete-line-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-003.html: Added.
        * layout-tests/editing/deleting/delete-line-004-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-004.html: Added.
        * layout-tests/editing/deleting/delete-line-005-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-005.html: Added.
        * layout-tests/editing/deleting/delete-line-006-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-006.html: Added.
        * layout-tests/editing/deleting/delete-line-007-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-007.html: Added.
        * layout-tests/editing/deleting/delete-line-008-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-008.html: Added.
        * layout-tests/editing/deleting/delete-line-009-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-009.html: Added.
        * layout-tests/editing/deleting/delete-line-010-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-010.html: Added.
        * layout-tests/editing/deleting/delete-line-011-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-011.html: Added.
        * layout-tests/editing/deleting/delete-line-012-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-012.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/editing/deleting/delete-line-001-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-001.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-002-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-002.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-003-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-003.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-004-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-004.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-005-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-005.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-006-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-006.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-007-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-007.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-008-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-008.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-009-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-009.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-010-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-010.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-011-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-011.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-012-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-012.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp
WebCore/khtml/editing/visible_position.cpp
WebCore/khtml/editing/visible_position.h