2010-10-20 Chang Shu <chang.shu@nokia.com>, Antonio Gomes <tonikitoo@webkit.org>
authorAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Fri, 5 Nov 2010 14:49:49 +0000 (11:49 -0300)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Fri, 5 Nov 2010 14:49:49 +0000 (11:49 -0300)
commit6ddf32204302971bab3789e8f2853fa005c97a40
tree5721a5225115b12795599e5c505251de52ec041e
parent68f99d06c79110dff0803a11abc32e32ae7d837c
2010-10-20  Chang Shu  <chang.shu@nokia.com>, Antonio Gomes <tonikitoo@webkit.org>

        Reviewed by Simon Fraser.

        Spatial Navigation: add support to <input type=text> and <textarea>
        https://bugs.webkit.org/show_bug.cgi?id=37153

        Before this patch, the focus cannot move away from input box once it is in. This patch allows focus
        move to neighbor nodes when the caret reaches the edge of the texts. This patch does not support yet
        cases where the focused <input> has a JS handler for the arrow keys.

        WebCore:

        Tests: fast/events/spatial-navigation/snav-input.html
        fast/events/spatial-navigation/snav-textarea.html

        * editing/EditorCommand.cpp:
        (WebCore::executeMoveDown):
        (WebCore::executeMoveLeft):
        (WebCore::executeMoveRight):
        (WebCore::executeMoveUp):
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::modify):

        WebKit/qt:

        * WebCoreSupport/EditorClientQt.cpp:
        WebCore::EditorClientQt::handleKeyboardEvent):

        LayoutTests:

        * fast/events/spatial-navigation/snav-input-expected.txt: Added.
        * fast/events/spatial-navigation/snav-input.html: Added.
        * fast/events/spatial-navigation/snav-textarea-expected.txt: Added.
        * fast/events/spatial-navigation/snav-textarea.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71388 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:

LayoutTests/platform/gtk/Skipped
LayoutTests/ChangeLog
LayoutTests/fast/events/spatial-navigation/snav-input-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/spatial-navigation/snav-input.html [new file with mode: 0644]
LayoutTests/fast/events/spatial-navigation/snav-textarea-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/spatial-navigation/snav-textarea.html [new file with mode: 0644]
LayoutTests/platform/gtk/Skipped
WebCore/ChangeLog
WebCore/editing/EditorCommand.cpp
WebCore/editing/SelectionController.cpp
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/EditorClientQt.cpp