Bug 51302 - [GTK+] Simplify spatial navigation handling in EditorClientGtk.cpp
Summary: [GTK+] Simplify spatial navigation handling in EditorClientGtk.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Antonio Gomes
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2010-12-18 21:21 PST by Antonio Gomes
Modified: 2010-12-20 08:16 PST (History)
1 user (show)

See Also:


Attachments
patch v1 (committed r74348, r=xan) (4.50 KB, patch)
2010-12-18 22:12 PST, Antonio Gomes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Gomes 2010-12-18 21:21:47 PST
In moveCursorCallback function (EditorClientGtk.cpp) we are special handling the case where we have 'step' equals to 1 and 'direction' equals to 0 or 1. To put it simple, this is the case of either a RIGHT or LEFT arrow key press, without any modifier.

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     }

When spatial navigation is enabled, we change the editor command from "MoveBackwark" to "MoveLeft" or "MoveForward" to "MoveRight", respectively.


This is unneeded if we change the movement mapping table directly. Patch coming ...
Comment 1 Antonio Gomes 2010-12-18 22:12:07 PST
Created attachment 76953 [details]
patch v1 (committed r74348, r=xan)
Comment 2 Xan Lopez 2010-12-20 07:43:07 PST
Comment on attachment 76953 [details]
patch v1 (committed r74348, r=xan)

Perhaps you can say in the ChangeLog more explicitly that this only seems to be safe for left/right (granularity = character), since the other fallbacks in those methods have a FIXME implying that they are not desired. Thanks!
Comment 3 Antonio Gomes 2010-12-20 08:16:14 PST
Comment on attachment 76953 [details]
patch v1 (committed r74348, r=xan)

Clearing flags on attachment: 76953

Committed r74348: <http://trac.webkit.org/changeset/74349>
Comment 4 Antonio Gomes 2010-12-20 08:16:39 PST
(In reply to comment #2)
> (From update of attachment 76953 [details])
> Perhaps you can say in the ChangeLog more explicitly that this only seems to be safe for left/right (granularity = character), since the other fallbacks in those methods have a FIXME implying that they are not desired. Thanks!

Fixed before landing.