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: http://svn.webkit.org/repository/webkit/trunk@32605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9 files changed