2010-02-17 Ojan Vafai <ojan@chromium.org>
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Feb 2010 19:38:14 +0000 (19:38 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Feb 2010 19:38:14 +0000 (19:38 +0000)
commit0603fdf03a3a87d8cb64d0aa011def56d36e70d6
treef87a3ef22aaf50437f6f6a9a5609c485b3b8cdeb
parentd62bc0be7b45d72f30e49af01b0935f614d7b9a8
2010-02-17  Ojan Vafai  <ojan@chromium.org>

        Reviewed by Adam Barth.

        keyboard selection sometimes moves the wrong end of the selection for Win/Linux
        https://bugs.webkit.org/show_bug.cgi?id=35066

        The changes to js-test-selection-shared.js are just to make the selection editing tests
        easier to debug in the future.

        The mac results for extend-after-mouse-selection.html contain a "FAIL" line. This is
        a case where WebKit doesn't match TextEdit.

        * editing/editing.js:
        (execMoveSelectionForwardByLineBoundaryCommand):
        (moveSelectionForwardByLineBoundaryCommand):
        (execExtendSelectionForwardByLineBoundaryCommand):
        (extendSelectionForwardByLineBoundaryCommand):
        (execExtendSelectionBackwardByLineBoundaryCommand):
        (extendSelectionBackwardByLineBoundaryCommand):
        (execMoveSelectionBackwardByLineBoundaryCommand):
        (moveSelectionBackwardByLineBoundaryCommand):
        * editing/selection/extend-after-mouse-selection.html: Added.
        * editing/selection/move-begin-end-expected.txt:
        * editing/selection/move-begin-end.html:
        * editing/selection/resources/js-test-selection-shared.js:
        (objectAsString):
        (assertSelectionAt):
        * platform/mac/editing/selection/click-in-margins-inside-editable-div-expected.txt:
        * platform/mac/editing/selection/click-in-padding-with-multiple-line-boxes-expected.txt:
        * platform/mac/editing/selection/extend-after-mouse-selection-expected.txt: Added.
        * platform/win/editing/selection/click-in-margins-inside-editable-div-expected.txt:
        * platform/win/editing/selection/click-in-padding-with-multiple-line-boxes-expected.txt:
        * platform/win/editing/selection/extend-after-mouse-selection-expected.txt: Added.
        * platform/win/editing/selection/extend-selection-expected.txt: Added.
2010-02-17  Ojan Vafai  <ojan@chromium.org>

        Reviewed by Adam Barth.

        keyboard selection sometimes moves the wrong end of the selection for Win/Linux
        https://bugs.webkit.org/show_bug.cgi?id=35066

        On Windows/Linux keyboard based selections should always move the same
        end of the seleciton. On Mac, lineboundary and documentboundary changes
        move different ends of the selection depending on which direction your
        extending.

        Test: editing/selection/extend-after-mouse-selection.html

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::positionForPlatform):
        (WebCore::SelectionController::startForPlatform):
        (WebCore::SelectionController::endForPlatform):
        (WebCore::SelectionController::modifyExtendingRight):
        (WebCore::SelectionController::modifyExtendingForward):
        (WebCore::SelectionController::modifyMovingForward):
        (WebCore::SelectionController::modifyExtendingBackward):
        (WebCore::SelectionController::modifyMovingBackward):
        * editing/SelectionController.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@54980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/editing.js
LayoutTests/editing/selection/extend-after-mouse-selection.html [new file with mode: 0644]
LayoutTests/editing/selection/move-begin-end-expected.txt
LayoutTests/editing/selection/move-begin-end.html
LayoutTests/editing/selection/resources/js-test-selection-shared.js
LayoutTests/platform/mac/editing/selection/click-in-margins-inside-editable-div-expected.txt
LayoutTests/platform/mac/editing/selection/click-in-padding-with-multiple-line-boxes-expected.txt
LayoutTests/platform/mac/editing/selection/extend-after-mouse-selection-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/editing/selection/click-in-margins-inside-editable-div-expected.txt
LayoutTests/platform/win/editing/selection/click-in-padding-with-multiple-line-boxes-expected.txt
LayoutTests/platform/win/editing/selection/extend-after-mouse-selection-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/editing/selection/extend-selection-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/SelectionController.cpp
WebCore/editing/SelectionController.h