RESOLVED FIXED Bug 51302
[GTK+] Simplify spatial navigation handling in EditorClientGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=51302
Summary [GTK+] Simplify spatial navigation handling in EditorClientGtk.cpp
Antonio Gomes
Reported 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 ...
Attachments
patch v1 (committed r74348, r=xan) (4.50 KB, patch)
2010-12-18 22:12 PST, Antonio Gomes
no flags
Antonio Gomes
Comment 1 2010-12-18 22:12:07 PST
Created attachment 76953 [details] patch v1 (committed r74348, r=xan)
Xan Lopez
Comment 2 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!
Antonio Gomes
Comment 3 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>
Antonio Gomes
Comment 4 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.
Note You need to log in before you can comment on or make changes to this bug.