Summary: | [GTK] Spatial Navigation: snav-input.html and snav-textarea.html fail | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antonio Gomes <tonikitoo> | ||||||
Component: | Accessibility | Assignee: | Chang Shu <cshu> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, cshu, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | OS X 10.5 | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 46905 | ||||||||
Attachments: |
|
Description
Antonio Gomes
2010-11-04 21:28:28 PDT
I will take a look. Created attachment 73543 [details]
fix patch
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.
I will fix the style problem along with other possible changes after the comments. 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. } Created attachment 73603 [details]
fix patch 2
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. 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";
>
Comment on attachment 73603 [details] fix patch 2 Clearing flags on attachment: 73603 Committed r71881: <http://trac.webkit.org/changeset/71881> All reviewed patches have been landed. Closing bug. |