RESOLVED FIXED 49056
[GTK] Spatial Navigation: snav-input.html and snav-textarea.html fail
https://bugs.webkit.org/show_bug.cgi?id=49056
Summary [GTK] Spatial Navigation: snav-input.html and snav-textarea.html fail
Antonio Gomes
Reported 2010-11-04 21:28:28 PDT
Tests added recently and run fine on Qt and Mac ports.
Attachments
fix patch (2.66 KB, patch)
2010-11-10 14:40 PST, Chang Shu
no flags
fix patch 2 (2.64 KB, patch)
2010-11-11 06:06 PST, Chang Shu
no flags
Chang Shu
Comment 1 2010-11-10 12:49:37 PST
I will take a look.
Chang Shu
Comment 2 2010-11-10 14:40:22 PST
Created attachment 73543 [details] fix patch
WebKit Review Bot
Comment 3 2010-11-10 14:45:42 PST
Attachment 73543 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/platform/gtk/Skipped', u'WebKit/gtk/ChangeLog', u'WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp']" exit_code: 1 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp:219: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chang Shu
Comment 4 2010-11-10 14:52:44 PST
I will fix the style problem along with other possible changes after the comments.
Antonio Gomes
Comment 5 2010-11-10 20:06:44 PST
Comment on attachment 73543 [details] fix patch View in context: https://bugs.webkit.org/attachment.cgi?id=73543&action=review > WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp:217 > + if (step == 1 && isSpatialNavigationEnabled(core(client->webView())->focusController()->focusedOrMainFrame())) { > + if (direction == 1) Looks good to me. Please reverse the order for the "if", so we bail out earlier in the common case. if (isSpatialNavigationEnabled(frame) && xxx) { all the test here. }
Chang Shu
Comment 6 2010-11-11 06:06:14 PST
Created attachment 73603 [details] fix patch 2
Antonio Gomes
Comment 7 2010-11-11 06:30:40 PST
Comment on attachment 73603 [details] fix patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=73603&action=review Looks nice! Lets just fix the style issues before landing. > WebKit/gtk/ChangeLog:6 > + [GTK] Replace "MoveForward"/"MoveBackward" with "MoveRight"/"MoveLeft" > + to make spatial navigation work on input/textarea. You need the bug title here. Implementation details goes right below that. > WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp:220 > + if (direction == 1) > + rawCommand = "MoveRight"; > + else if (!direction) > + rawCommand = "MoveLeft"; rawCommand = direction ? "MoveRight" ? "MoveLeft"; > LayoutTests/ChangeLog:5 > + [GTK] Unskip tests that are passing now. same here: first bug title , bugzilla entry url, then the description.
Chang Shu
Comment 8 2010-11-11 06:38:26 PST
Thanks for the review, Antonio. The style problem was fixed. It was the "direction == 0" it was complaining. Since direction can be 2 or 3, I cannot do "direction?x:y". > Looks nice! Lets just fix the style issues before landing. > > > WebKit/gtk/ChangeLog:6 > > + [GTK] Replace "MoveForward"/"MoveBackward" with "MoveRight"/"MoveLeft" > > + to make spatial navigation work on input/textarea. > > You need the bug title here. Implementation details goes right below that. > > > WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp:220 > > + if (direction == 1) > > + rawCommand = "MoveRight"; > > + else if (!direction) > > + rawCommand = "MoveLeft"; > > rawCommand = direction ? "MoveRight" ? "MoveLeft"; >
WebKit Commit Bot
Comment 9 2010-11-11 20:16:34 PST
Comment on attachment 73603 [details] fix patch 2 Clearing flags on attachment: 73603 Committed r71881: <http://trac.webkit.org/changeset/71881>
WebKit Commit Bot
Comment 10 2010-11-11 20:16:39 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.