New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 666767 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Feature
Proj-XR

Blocking:
issue 779691
issue 670502



Sign in to add a comment

Feature Policy: Support WebVR API

Project Member Reported by iclell...@chromium.org, Nov 18 2016

Issue description

Add support for the "webvr" feature in Feature Policy.

The feature hasn't been defined yet in FeaturePolicy.cpp. It should be defined there, and checked before allowing the use of Document.getVRDisplays.

(Check with VR team about whether any other calls need to be blocked; that is the only one mentioned in the spec under the "allowvr" iframe attribute)

If not allowed by policy, the call to getVRDisplays should return a rejected promise.

 
Cc: sko...@chromium.org bajones@chromium.org meganlindsay@chromium.org
Labels: Proj-VR
WebVR issue: https://github.com/w3c/webvr/issues/86

Comment 2 by sko...@chromium.org, Nov 24 2016

To clarify, you mean having a Chrome policy that can be used to disable WebVR support?
Feature Policy refers to https://github.com/WICG/feature-policy*, which is a mechanisms for apps/servers to control whether features are enabled, including on embedded iframes.

* See the explainer - the spec is out of date.
+1 to everything ddorwin@ said :)

FP GitHub issue: https://github.com/WICG/feature-policy/issues/49

This will hopefully be able to replace the "allowvr" iframe attribute with a more configurable policy that can be set by ancestor frames.

This Chromium issue is to implement the linkage between the feature policy code and the WebVR code, to actually deny access to the API in cases where the policy says it should be disabled.

(Sorry if that means the Component is misleading; I've put out a request for a Blink>FeaturePolicy component, but it's not there yet)
Blocking: 670502
Labels: -OS-Linux -OS-Android -OS-Windows -OS-Chrome -OS-Mac OS-All
I had left iOS out of the OS list, since FeaturePolicy is a Blink-specific feature. I'm not certain that we'll be able to support iOS.
Components: Blink>FeaturePolicy
Blocking: -623682
Labels: -OS-All -Feature-Policy Feature-Policy-V2 OS-Android OS-Chrome OS-Linux OS-Mac OS-Windows
Not blocking launch; slated for V2
Labels: -Pri-3 M-62 Pri-2
iclelland: We'd like to start requiring this in the next update to WebVR, which would be in M62. Is there anything on the Feature Policy side that would block this?
Labels: Type-Feature
Labels: -Pri-2 Pri-1

Comment 13 by bshe@chromium.org, Aug 14 2017

Owner: bshe@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 30 2017

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

commit 36e485aae6fcb3231843941f750df0428bcb401d
Author: Biao She <bshe@chromium.org>
Date: Wed Aug 30 23:52:38 2017

Add vr feature policy

This CL enables vr feature policy. So that, if you want to disable vr within
your application, you can delivering the following HTTP response header:
Feature-Policy: vr 'none'
If you want to enable vr for all frames(including cross-origin iframes),
delivering this:
Feature-Policy: vr *
If you want to enable vr just for your own origin, delivering this:
Feature-Policy: vr 'self'

To request vr for iframes, you can
<iframe src="https://foo.bar" allow="vr"></iframe> to grant vr to this iframe.

Bug:  666767 
Change-Id: I48d7accf8553d6a9ac19d9f41dbbce2ff9934579
Reviewed-on: https://chromium-review.googlesource.com/636663
Reviewed-by: Ian Vollick <vollick@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Commit-Queue: Biao She <bshe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498674}
[modify] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/content/common/feature_policy/feature_policy.cc
[add] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-webvr.html
[add] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/LayoutTests/external/wpt/webvr/webvr-disabled-by-feature-policy.https.sub.html
[add] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/LayoutTests/external/wpt/webvr/webvr-disabled-by-feature-policy.https.sub.html.headers
[add] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/LayoutTests/external/wpt/webvr/webvr-enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html
[add] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/LayoutTests/external/wpt/webvr/webvr-enabled-by-feature-policy-attribute.https.sub.html
[add] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/LayoutTests/external/wpt/webvr/webvr-enabled-by-feature-policy.https.sub.html
[add] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/LayoutTests/external/wpt/webvr/webvr-enabled-by-feature-policy.https.sub.html.headers
[add] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/LayoutTests/external/wpt/webvr/webvr-enabled-on-self-origin-by-feature-policy.https.sub.html
[add] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/LayoutTests/external/wpt/webvr/webvr-enabled-on-self-origin-by-feature-policy.https.sub.html.headers
[modify] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
[modify] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
[modify] https://crrev.com/36e485aae6fcb3231843941f750df0428bcb401d/third_party/WebKit/public/platform/WebFeaturePolicyFeature.h

Comment 15 by bshe@chromium.org, Aug 31 2017

Status: Fixed (was: Assigned)
Blocking: 779691
Components: Blink>WebXR

Sign in to add a comment