Bug 114298 - [WK2][GTK] Adding SpatialNavigation setting to webkit2
Summary: [WK2][GTK] Adding SpatialNavigation setting to webkit2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 114297 (view as bug list)
Depends on:
Blocks: 46905 113663
  Show dependency treegraph
 
Reported: 2013-04-09 11:48 PDT by Danilo de Paula
Modified: 2015-12-22 06:47 PST (History)
19 users (show)

See Also:


Attachments
Patch (9.00 KB, patch)
2013-04-09 11:49 PDT, Danilo de Paula
no flags Details | Formatted Diff | Diff
Patch (9.02 KB, patch)
2013-04-09 11:52 PDT, Danilo de Paula
no flags Details | Formatted Diff | Diff
Patch (10.05 KB, patch)
2013-04-10 07:17 PDT, Danilo de Paula
no flags Details | Formatted Diff | Diff
Patch (10.06 KB, patch)
2013-04-10 09:29 PDT, Danilo de Paula
no flags Details | Formatted Diff | Diff
Patch (10.06 KB, patch)
2013-04-15 07:27 PDT, Danilo de Paula
no flags Details | Formatted Diff | Diff
Patch (10.07 KB, patch)
2013-04-15 07:46 PDT, Danilo de Paula
no flags Details | Formatted Diff | Diff
Patch (10.08 KB, patch)
2013-04-24 12:29 PDT, Danilo de Paula
no flags Details | Formatted Diff | Diff
Patch (9.83 KB, patch)
2013-04-29 20:51 PDT, Danilo de Paula
no flags Details | Formatted Diff | Diff
Patch (9.75 KB, patch)
2013-08-02 04:56 PDT, Danilo de Paula
buildbot: commit-queue-
Details | Formatted Diff | Diff
Patch (11.39 KB, patch)
2013-11-24 09:03 PST, Arunprasad Rajkumar
no flags Details | Formatted Diff | Diff
Patch (11.42 KB, patch)
2013-11-24 09:17 PST, Arunprasad Rajkumar
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Danilo de Paula 2013-04-09 11:48:58 PDT
Adding SpatialNavigation API to webkit2
Comment 1 Danilo de Paula 2013-04-09 11:49:30 PDT
Created attachment 197155 [details]
Patch
Comment 2 Danilo de Paula 2013-04-09 11:50:48 PDT
*** Bug 114297 has been marked as a duplicate of this bug. ***
Comment 3 Danilo de Paula 2013-04-09 11:52:49 PDT
Created attachment 197156 [details]
Patch
Comment 4 WebKit Review Bot 2013-04-09 12:58:50 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 5 WebKit Review Bot 2013-04-09 12:59:05 PDT
Attachment 197156 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Shared/WebPreferencesStore.h', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h', u'Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp']" exit_code: 1
WARNING: File exempt from style guide. Skipping: "Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h"
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1095:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1097:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1098:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1099:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1100:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 5 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Carlos Garcia Campos 2013-04-10 06:05:04 PDT
Comment on attachment 197156 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=197156&action=review

Patch looks good to me, thanks! r- because it lacks unit tests. It requires the approval of another GTK+ reviewer and one WebKit2 owner.

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1093
> +     */

Add Since: 2.2

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2695
> + */

Since: 2.2 here too

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2717
> + * Returns: %TRUE If HTML5 spatial navigation support is enabled or %FALSE otherwise.

And here too.

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h:388
> +webkit_settings_set_enable_spatial_navigation                  (WebKitSettings *settings,
> +                                                                gboolean enabled);

Nit: Please line up argument names like all other functions.
Comment 7 Mikhail Pozdnyakov 2013-04-10 06:27:36 PDT
Shouldn't the bug title have [WK2][GTK] ?
Comment 8 Danilo de Paula 2013-04-10 06:56:17 PDT
(In reply to comment #7)
> Shouldn't the bug title have [WK2][GTK] ?

It should. Thanks.
Comment 9 Danilo de Paula 2013-04-10 07:17:56 PDT
Created attachment 197265 [details]
Patch
Comment 10 Danilo de Paula 2013-04-10 07:21:12 PDT
(In reply to comment #6)
> (From update of attachment 197156 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=197156&action=review
> 
> Patch looks good to me, thanks! r- because it lacks unit tests. It requires the approval of another GTK+ reviewer and one WebKit2 owner.
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1093
> > +     */
> 
> Add Since: 2.2
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2695
> > + */
> 
> Since: 2.2 here too
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2717
> > + * Returns: %TRUE If HTML5 spatial navigation support is enabled or %FALSE otherwise.
> 
> And here too.
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h:388
> > +webkit_settings_set_enable_spatial_navigation                  (WebKitSettings *settings,
> > +                                                                gboolean enabled);

Fixed the things added above


> 
> Nit: Please line up argument names like all other functions.
I'm following the same rule as the rest of the file
Comment 11 Carlos Garcia Campos 2013-04-10 09:04:24 PDT
(In reply to comment #10)
> (In reply to comment #6)
> > (From update of attachment 197156 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=197156&action=review
> > 
> > Patch looks good to me, thanks! r- because it lacks unit tests. It requires the approval of another GTK+ reviewer and one WebKit2 owner.
> > 
> > > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1093
> > > +     */
> > 
> > Add Since: 2.2
> > 
> > > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2695
> > > + */
> > 
> > Since: 2.2 here too
> > 
> > > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2717
> > > + * Returns: %TRUE If HTML5 spatial navigation support is enabled or %FALSE otherwise.
> > 
> > And here too.
> > 
> > > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h:388
> > > +webkit_settings_set_enable_spatial_navigation                  (WebKitSettings *settings,
> > > +                                                                gboolean enabled);
> 
> Fixed the things added above
> 
> 
> > 
> > Nit: Please line up argument names like all other functions.
> I'm following the same rule as the rest of the file

No, you are not. There's a single space between gboolean and enabled that should be at the same column that settings, like all other functions.
Comment 12 Danilo de Paula 2013-04-10 09:28:33 PDT
(In reply to comment #11)
> No, you are not. There's a single space between gboolean and enabled that should be at the same column that settings, like all other functions.

Sorry, you're right. I thought you were talking about the 58 spaces between gboolean and the beginning of the line. My mistake. fixed.
Comment 13 Danilo de Paula 2013-04-10 09:29:18 PDT
Created attachment 197306 [details]
Patch
Comment 14 WebKit Commit Bot 2013-04-10 11:25:18 PDT
Attachment 197306 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Shared/WebPreferencesStore.h', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h', u'Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt', u'Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp']" exit_code: 1
WARNING: File exempt from style guide. Skipping: "Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h"
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1097:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1099:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1100:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1101:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1102:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 5 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 15 Danilo de Paula 2013-04-11 04:39:43 PDT
Comment on attachment 197306 [details]
Patch

adding cq request
Comment 16 Gustavo Noronha (kov) 2013-04-15 06:52:24 PDT
Comment on attachment 197306 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=197306&action=review

Straight-forward API, looks good to me, cq- because of the wording in the doc

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1087
> +     * Whether to enable Spatial navigation. This feature consists in the ability

I'd use lower case for spatial here

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1091
> +     * there is an element he might be trying to reach towards the right, and if

s/he/they/

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1092
> +     * there are multiple elements, which element he probably wants.

ditto
Comment 17 Danilo de Paula 2013-04-15 07:19:13 PDT
(In reply to comment #16)
> (From update of attachment 197306 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=197306&action=review
> 
> Straight-forward API, looks good to me, cq- because of the wording in the doc
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1087
> > +     * Whether to enable Spatial navigation. This feature consists in the ability
> 
> I'd use lower case for spatial here

Spatial Navigation is a feature described with a capital leading letter on webkitgtk+ API, shouldn't it be "Spatial Navigation" instead of "spatial navigation"?
http://webkitgtk.org/reference/webkitgtk/stable/WebKitWebSettings.html#WebKitWebSettings--enable-spatial-navigation

> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1091
> > +     * there is an element he might be trying to reach towards the right, and if
> 
> s/he/they/

He, in that case, is the user. Also, it's the same text used on webkitgtk+ docs: http://webkitgtk.org/reference/webkitgtk/stable/WebKitWebSettings.html#WebKitWebSettings--enable-spatial-navigation
Comment 18 Danilo de Paula 2013-04-15 07:27:50 PDT
Created attachment 198124 [details]
Patch
Comment 19 WebKit Commit Bot 2013-04-15 07:29:42 PDT
Attachment 198124 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Shared/WebPreferencesStore.h', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h', u'Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt', u'Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp']" exit_code: 1
WARNING: File exempt from style guide. Skipping: "Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h"
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1097:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1099:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1100:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1101:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1102:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 5 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 20 Danilo de Paula 2013-04-15 07:46:07 PDT
Created attachment 198126 [details]
Patch
Comment 21 WebKit Commit Bot 2013-04-15 07:47:37 PDT
Attachment 198126 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Shared/WebPreferencesStore.h', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h', u'Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt', u'Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp']" exit_code: 1
WARNING: File exempt from style guide. Skipping: "Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h"
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1097:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1099:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1100:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1101:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1102:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 5 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 22 Danilo de Paula 2013-04-15 07:48:02 PDT
(In reply to comment #20)
> Created an attachment (id=198126) [details]
> Patch

http://en.wikipedia.org/wiki/Singular_they
^ mentioned by Kov on a private discussion.
Comment 23 Danilo de Paula 2013-04-15 07:48:41 PDT
Comment on attachment 198126 [details]
Patch

asking for cq+ and r+

Still waiting for a WK2 owner review.
Comment 24 Carlos Garcia Campos 2013-04-15 08:12:36 PDT
(In reply to comment #23)
> (From update of attachment 198126 [details])
> asking for cq+ and r+
> 
> Still waiting for a WK2 owner review.

Please don't commit new api patches into trunk until we get trunk in sync with the stable branch.
Comment 25 Danilo de Paula 2013-04-24 12:29:13 PDT
Created attachment 199509 [details]
Patch
Comment 26 WebKit Commit Bot 2013-04-24 12:30:49 PDT
Attachment 199509 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Shared/WebPreferencesStore.h', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h', u'Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt', u'Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp']" exit_code: 1
WARNING: File exempt from style guide. Skipping: "Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h"
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1097:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1099:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1100:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1101:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1102:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 5 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 27 Danilo de Paula 2013-04-29 20:51:16 PDT
Created attachment 200077 [details]
Patch
Comment 28 Danilo de Paula 2013-05-06 13:09:01 PDT
adding wk2 owners.
Comment 29 Danilo de Paula 2013-05-10 05:47:30 PDT
Explaining this API: Enable spatialNavigation is pretty important for vendors who want to ship webkit2 (in this case, webkit2gtk) in their products when there's a lack of a pointer-input-method (such as a mouse or a touch screen).

Ie: TVs that can only be controlled by the directional keys of a remote control
Comment 30 Danilo de Paula 2013-05-17 05:33:25 PDT
Comment on attachment 200077 [details]
Patch

up?
Comment 31 Carlos Garcia Campos 2013-07-15 00:59:05 PDT
API looks good to me too, we just need a WebKit2 owner to approve the cross platform changes.
Comment 32 Kwang Yul Seo 2013-07-29 22:06:03 PDT
Any progress? The patch must be rebased in order to apply on HEAD because other settings were added in the meantime.
Comment 33 Danilo de Paula 2013-07-31 01:47:03 PDT
(In reply to comment #32)
> Any progress? The patch must be rebased in order to apply on HEAD because other settings were added in the meantime.

Although I got a positive feedback from others GTK developers, I didn't get any feedback from a wk2 owner. I asked for it on IRC a few times...

With all the discussion about the ENABLE_CSS_DIRECTIONAL_FOCUS flag, it might be a good opportunity to review this one now (since this patch was created to be able to use the old DIRECTIONAL_FOCUS patch on a wk2 browser for a specific client)
Comment 34 Danilo de Paula 2013-07-31 02:05:31 PDT
(In reply to comment #33)
> (In reply to comment #32)
> > Any progress? The patch must be rebased in order to apply on HEAD because other settings were added in the meantime.
> 
> Although I got a positive feedback from others GTK developers, I didn't get any feedback from a wk2 owner. I asked for it on IRC a few times...
> 
> With all the discussion about the ENABLE_CSS_DIRECTIONAL_FOCUS flag, it might be a good opportunity to review this one now (since this patch was created to be able to use the old DIRECTIONAL_FOCUS patch on a wk2 browser for a specific client)

I will rebase this anyway.
Comment 35 Danilo de Paula 2013-08-02 04:56:44 PDT
Created attachment 208003 [details]
Patch
Comment 36 Build Bot 2013-08-21 15:40:44 PDT
Comment on attachment 208003 [details]
Patch

Attachment 208003 [details] did not pass win-ews (win):
Output: http://webkit-queues.appspot.com/results/1525459
Comment 37 Arunprasad Rajkumar 2013-11-18 09:36:17 PST
(In reply to comment #35)
> Created an attachment (id=208003) [details]
> Patch

Danilo, Thanks for your effort. Let me take this activity if you are busy :)

(I would like to add a WK2 C WKPreference API as well to control spatial navigation.)
Comment 38 Arunprasad Rajkumar 2013-11-24 09:03:28 PST
Created attachment 217761 [details]
Patch
Comment 39 Arunprasad Rajkumar 2013-11-24 09:17:28 PST
Created attachment 217762 [details]
Patch
Comment 40 Arunprasad Rajkumar 2013-11-24 09:33:29 PST
(In reply to comment #39)
> Created an attachment (id=217762) [details]
> Patch

Added WK2 CAPI in WKPreferences.h additional to Danilo's patch. WKPreferences.h API is directly used by Nix port.
Comment 41 WebKit Commit Bot 2013-11-24 10:18:23 PST
Comment on attachment 217762 [details]
Patch

Clearing flags on attachment: 217762

Committed r159734: <http://trac.webkit.org/changeset/159734>
Comment 42 Sergio Villar Senin 2014-12-11 06:36:26 PST
Can we close this bug ?