Changeset 74348 in webkit


Ignore:
Timestamp:
Dec 20, 2010 8:08:01 AM (13 years ago)
Author:
tonikitoo@webkit.org
Message:

2010-12-18 Antonio Gomes <agomes@rim.com>

Reviewed by Xan Lopez.

[GTK+] Simplify spatial navigation handling in EditorClientGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=51302

Patch changes:
1) The editor command for LEFT arrow key press without modifier

from MoveBackward to MoveLeft;

2) And similarly changes the editor command for RIGHT arrow key

press without modifier from MoveForward to MoveRight.

It has no implications since SelectionController::modifyMovingRight()
handles "MoveRight" equaly to how SelectionController::modifyMovingForward()
handles "MoveForward" when the granularity is 'CharacterGranularity'.
The former falls back to the later in the case of other editor commands.

Analogously, the same applies to how SelectionController::modifyMovingLeft() and
SelectionController::modifyMovingForward() handle "MoveLeft" and "MoveBackward"
editor commands, respectively.

With this change we can remove the spatial navigation hack from moveCursorCallback(),
in EditorClientGtk.cpp.

  • WebCoreSupport/EditorClientGtk.cpp: (WebKit::moveCursorCallback):
Location:
trunk/WebKit/gtk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/gtk/ChangeLog

    r74196 r74348  
     12010-12-18  Antonio Gomes  <agomes@rim.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK+] Simplify spatial navigation handling in EditorClientGtk.cpp
     6        https://bugs.webkit.org/show_bug.cgi?id=51302
     7
     8        Patch changes:
     9        1) The editor command for LEFT arrow key press without modifier
     10           from MoveBackward to MoveLeft;
     11        2) And similarly changes the editor command for RIGHT arrow key
     12          press without modifier from MoveForward to MoveRight.
     13
     14        It has no implications since SelectionController::modifyMovingRight()
     15        handles "MoveRight" equaly to how SelectionController::modifyMovingForward()
     16        handles "MoveForward" when granularity is 'CharacterGranularity'. The former
     17        falls back to the later in the case of other editor commands.
     18
     19        Analogously, the same applies to how SelectionController::modifyMovingLeft() and
     20        SelectionController::modifyMovingForward() handle "MoveLeft" and "MoveBackward"
     21        editor commands, respectively.
     22
     23        With this change we can remove the spatial navigation hack from moveCursorCallback(),
     24        in EditorClientGtk.cpp.
     25
     26        * WebCoreSupport/EditorClientGtk.cpp:
     27        (WebKit::moveCursorCallback):
     28
    1292010-12-16  Carlos Garcia Campos  <cgarcia@igalia.com>
    230
  • trunk/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp

    r73855 r74348  
    199199    { "MoveBackward",                                   "MoveForward",
    200200      "MoveBackwardAndModifySelection",                 "MoveForwardAndModifySelection"             }, // Forward/backward grapheme
    201     { "MoveBackward",                                   "MoveForward",
     201    { "MoveLeft",                                       "MoveRight",
    202202      "MoveBackwardAndModifySelection",                 "MoveForwardAndModifySelection"             }, // Left/right grapheme
    203203    { "MoveWordBackward",                               "MoveWordForward",
     
    233233        return;
    234234
    235     if (isSpatialNavigationEnabled(core(client->webView())->focusController()->focusedOrMainFrame()) && step == 1) {
    236         if (direction == 1)
    237             rawCommand = "MoveRight";
    238         else if (!direction)
    239             rawCommand = "MoveLeft";
    240     }
    241 
    242235    for (int i = 0; i < abs(count); i++)
    243236        client->addPendingEditorCommand(rawCommand);
Note: See TracChangeset for help on using the changeset viewer.