Bug 51302

Summary: [GTK+] Simplify spatial navigation handling in EditorClientGtk.cpp
Product: WebKit Reporter: Antonio Gomes <tonikitoo>
Component: New BugsAssignee: Antonio Gomes <tonikitoo>
Status: RESOLVED FIXED    
Severity: Normal CC: mrobinson
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
patch v1 (committed r74348, r=xan) none

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.