New issue
Advanced search Search tips

Issue 863458 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Feature



Sign in to add a comment

Implement API to manage spatial navigation in <webview>

Reported by jaragu...@igalia.com, Jul 13

Issue description

UserAgent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Steps to reproduce the problem:
No steps, this is a feature request.

What is the expected behavior?
When designing an application platform that is completely web-based, webview tags can be used as containers of the different applications, providing isolation, storage, etc. Depending on the contents and the origins of the application inside the webview, we might want to use the webview API to tune the features and permissions inside the tag.

Spatial navigation is important for hardware with no pointer devices, but it is not always required. For example, if we control the web content that is being displayed, we can implement it taking into account the specific input restrictions on the hardware platform. Still, spatial navigation is a must to browse contents that are not under our control, like in a general-purpose browser or social network contents. Ideally, it could even be triggered by users when provided with a set of input options specific to their device.

To be able to use the <webview> tag as a web application container and setup spatial navigation at will depending on the application needs or user choice, we propose the addition of new API for <webview> to check the status of spatial navigation inside the tag, and manage it independently from the spatial navigation status outside the webview or in other webviews. API consists of:

- a new method `setSpatialNavigationEnabled(bool) to enable or disable the feature for a specific webview.
- a new method `isSpatialNavigationEnabled(callback) to check if the feature is enabled or disabled for a specific webview.

The existing `--enable-spatial-navigation` runtime flag, which currently enables the feature in a global way, could be used to decide the default status in newly created webviews.

What went wrong?
Nothing, this is a feature request.

WebStore page: 

Did this work before? N/A 

Chrome version: 69.0.3489.0 (Developer Build) (64-bit)  Channel: n/a
OS Version: Fedora 28
Flash Version: disabled
 
Labels: Needs-Triage-M69
Cc: viswa.karala@chromium.org
Labels: Triaged-ET M-69 Target-69 FoundIn-69
Status: Untriaged (was: Unconfirmed)
As per comment# 0 from the reporter the issue seems a feature request, hence marking it as Untriaged.

Thanks!
Labels: -Type-Bug Type-Feature
Components: -Platform>Extensions Platform>Apps>BrowserTag Platform>Apps
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e58c9eecce5de4f6e40017d8554d966a1a85644f

commit e58c9eecce5de4f6e40017d8554d966a1a85644f
Author: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Date: Fri Sep 14 17:38:06 2018

API to manage spatial navigation in webview tag.

When designing an application platform that is completely web-based,
webview tags can be used as containers of the different applications,
providing isolation, storage, etc. Depending on the contents and the
origins of the application inside the webview, we might want to use
the webview API to tune the features and permissions inside the tag.

Spatial navigation is important for hardware with no pointer devices,
but it is not always required. For example, if we control the web
content that is being displayed, we can implement it taking into
account the specific input restrictions on the hardware platform.
Still, spatial navigation is a must to browse contents that are not
under our control, like in a general-purpose browser.

This patch implements new API for <webview> to check the status of
spatial navigation inside the tag, and manage it independently from
the spatial navigation status outside the webview or in other
webviews. API consists of:

- a new method `setSpatialNavigationEnabled(bool) to enable or
  disable the feature for a specific webview.
- a new method `isSpatialNavigationEnabled(callback) to check if
  the feature is enabled or disabled for a specific webview.

The new API interacts with the `--enable-spatial-navigation` runtime
flag, which enables the feature by default in newly created webviews.

Bug: 863458
Change-Id: I36a8a4fefda1b99bcba6bae537b4f45028073125
Reviewed-on: https://chromium-review.googlesource.com/1133011
Commit-Queue: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Lucas Gadani <lfg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591383}
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/chrome/browser/apps/guest_view/web_view_browsertest.cc
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/chrome/common/extensions/api/webview_tag.json
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/chrome/test/data/extensions/platform_apps/web_view/nopermission/embedder.js
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
[add] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/chrome/test/data/extensions/platform_apps/web_view/spatial_navigation_state_api/main.html
[add] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/chrome/test/data/extensions/platform_apps/web_view/spatial_navigation_state_api/main.js
[add] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/chrome/test/data/extensions/platform_apps/web_view/spatial_navigation_state_api/manifest.json
[add] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/chrome/test/data/extensions/platform_apps/web_view/spatial_navigation_state_api/test.js
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/extensions/browser/api/guest_view/web_view/web_view_internal_api.h
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/extensions/browser/extension_function_histogram_value.h
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/extensions/browser/guest_view/web_view/web_view_guest.cc
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/extensions/browser/guest_view/web_view/web_view_guest.h
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/extensions/common/api/web_view_internal.json
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/extensions/common/extension_messages.h
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/extensions/renderer/extension_frame_helper.cc
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/extensions/renderer/extension_frame_helper.h
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/extensions/renderer/resources/guest_view/web_view/web_view_api_methods.js
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/extensions/test/data/web_view/apitest/main.js
[modify] https://crrev.com/e58c9eecce5de4f6e40017d8554d966a1a85644f/tools/metrics/histograms/enums.xml

Sign in to add a comment