WebCore:
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Apr 2008 04:46:17 +0000 (04:46 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Apr 2008 04:46:17 +0000 (04:46 +0000)
commitbffa597321ac8927b12cde1666141f2e3b055346
treea3b147bf45f656bdd05b19ed8075783239cea726
parent657891db75a8485496074b78380e26edbadc96cd
WebCore:

        Reviewed by Darin Adler.

        - fix https://bugs.webkit.org/show_bug.cgi?id=3729
          <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text

        Test: editing/selection/move-left-right.html

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::modifyMovingRight): Added. Currently
        implemented for character granularity, all other being treated as
        "forward".
        (WebCore::SelectionController::modifyMovingForward): Renamed
        modifyMovingRightForward() to this.
        (WebCore::SelectionController::modifyMovingLeft): Added. Currently
        implemented for character granularity, all other being treated as
        "backward".
        (WebCore::SelectionController::modifyMovingBackward): Renamed
        modifyMovingLeftBackward() to this.
        (WebCore::SelectionController::modify): Changed to call either the
        visual (left/right) or logical (backward/forward) methods depending on
        the 'dir' argument for moves.
        * editing/SelectionController.h:
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::leftVisuallyDistinctCandidate): Added.
        (WebCore::VisiblePosition::left): Added.
        (WebCore::VisiblePosition::rightVisuallyDistinctCandidate): Added.
        (WebCore::VisiblePosition::right): Added.
        * editing/VisiblePosition.h:

LayoutTests:

        Reviewed by Darin Adler.

        - test for https://bugs.webkit.org/show_bug.cgi?id=3729
          <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text

        * editing/selection/move-left-right-expected.txt: Added.
        * editing/selection/move-left-right.html: Added.
        * platform/mac/editing/selection/move-left-right-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/selection/move-left-right-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/move-left-right.html [new file with mode: 0644]
LayoutTests/platform/mac/editing/selection/move-left-right-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/SelectionController.cpp
WebCore/editing/SelectionController.h
WebCore/editing/VisiblePosition.cpp
WebCore/editing/VisiblePosition.h