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

Issue 796894 link

Starred by 4 users

Issue metadata

Status: Verified
Owner:
Email to this user bounced
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: ----
Type: Feature



Sign in to add a comment

Feature Policies for the Device Orientation API

Project Member Reported by mikhail....@intel.com, Dec 21 2017

Issue description

Feature description:

By default, the deviceorientation, deviceorientationabsolute and devicemotion events will be restricted to top-level document and same-origin subframes (which follows from the sensor features default allow list 'self').

The default behavior can be modified by explicitly enabling or disabling of the dedicated sensor policy-controlled features. The sensor policy-controlled features are shared between the Device Orientation events and the corresponding Generic Sensor motion sensor classes which expose same sensor data. Please see https://github.com/WICG/feature-policy/blob/gh-pages/features.md#sensor-features for details.

Eng owners: mikhail.pozdnyakov@intel.com, alexander.shalamov@intel.com

Doc: https://github.com/WICG/feature-policy/blob/gh-pages/features.md#sensor-features

Feature Policy integration in the Generic Sensor API: https://w3c.github.io/sensors/#feature-policy-api

Are you planning on experimenting before launch? no
Any new strings? no
Any implications for Google webservices (i.e. sync, translate)? no
Binary size? no significant changes are expected
Do the existing perf tests exercise all aspects of your new feature(s)? yes

 
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 22 2018

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

commit 8ca57e0668cdb054b7e30afd18f9246729764c47
Author: Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Date: Mon Jan 22 21:21:17 2018

[Sensors]Provide error codes from SensorProvider

Return error codes from the SensorProvider.GetSensor() method.

In future it will be used to return correct errors in
Generic Sensor API (e.g. 'NotAllowedError' if permissions
are denied).

Bug:  796894 
Change-Id: I613c6f3792fde3c05142f1b4cf809655b4acb15f
Reviewed-on: https://chromium-review.googlesource.com/864325
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Alexander Shalamov <alexander.shalamov@intel.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Cr-Commit-Position: refs/heads/master@{#530997}
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/content/browser/generic_sensor/sensor_provider_proxy_impl.cc
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/content/browser/generic_sensor_browsertest.cc
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/content/renderer/device_sensors/device_sensor_event_pump.h
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/content/renderer/device_sensors/fake_sensor_and_provider.cc
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/device/vr/orientation/orientation_device.cc
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/device/vr/orientation/orientation_device.h
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/device/vr/test/fake_sensor_provider.cc
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/services/device/generic_sensor/generic_sensor_service_unittest.cc
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/services/device/generic_sensor/sensor_provider_impl.cc
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/services/device/public/interfaces/sensor_provider.mojom
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/third_party/WebKit/LayoutTests/external/wpt/generic-sensor/generic-sensor-tests.js
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
[modify] https://crrev.com/8ca57e0668cdb054b7e30afd18f9246729764c47/third_party/WebKit/Source/modules/sensor/SensorProxy.h

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 25 2018

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

commit ff0799d2f65c78efd3e0bd8f642b3b79ad04f86c
Author: Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Date: Thu Jan 25 12:45:40 2018

[Sensors][DeviceOrientation]Browser-side Feature Policy check

The sensor policy-controlled features should be
checked in the browser process, in order to improve
security robustness.

This patch introduces browser-side feature policy check
for both the Generic Sensor and the Device Orientation APIs.

Bug:  796894 
Bug:  795723 
Change-Id: Idc9869d75bca70f3f9ee915101195c7cbee22587
Reviewed-on: https://chromium-review.googlesource.com/850699
Commit-Queue: Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Jun Cai <juncai@chromium.org>
Reviewed-by: Alexander Shalamov <alexander.shalamov@intel.com>
Cr-Commit-Position: refs/heads/master@{#531874}
[modify] https://crrev.com/ff0799d2f65c78efd3e0bd8f642b3b79ad04f86c/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/ff0799d2f65c78efd3e0bd8f642b3b79ad04f86c/content/browser/generic_sensor/sensor_provider_proxy_impl.cc
[modify] https://crrev.com/ff0799d2f65c78efd3e0bd8f642b3b79ad04f86c/content/browser/generic_sensor/sensor_provider_proxy_impl.h

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 29 2018

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

commit 3adbed213b56cf9a0d875a1f0ffaacd9da039fdd
Author: Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Date: Mon Jan 29 10:34:38 2018

[DeviceOrientation]Blink-side Feature Policy check

DeviceSingleWindowEventController::DidAddEventListener() is not
called if {deviceorientation|deviceorientationabsolute|devicemotion}
events are blocked by feature policy.

A console message referencing to
https://github.com/WICG/feature-policy/blob/gh-pages/features.md
is send to warn the user.

Bug:  796894 
Change-Id: I350ff75ca55766b7ebb42944d66470ecd2b8a4c1
Reviewed-on: https://chromium-review.googlesource.com/870510
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Cr-Commit-Position: refs/heads/master@{#532384}
[modify] https://crrev.com/3adbed213b56cf9a0d875a1f0ffaacd9da039fdd/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/3adbed213b56cf9a0d875a1f0ffaacd9da039fdd/content/test/data/device_sensors/device_motion_test.html
[modify] https://crrev.com/3adbed213b56cf9a0d875a1f0ffaacd9da039fdd/content/test/data/device_sensors/device_orientation_test.html
[modify] https://crrev.com/3adbed213b56cf9a0d875a1f0ffaacd9da039fdd/third_party/WebKit/Source/core/frame/DeviceSingleWindowEventController.cpp
[modify] https://crrev.com/3adbed213b56cf9a0d875a1f0ffaacd9da039fdd/third_party/WebKit/Source/core/frame/DeviceSingleWindowEventController.h
[modify] https://crrev.com/3adbed213b56cf9a0d875a1f0ffaacd9da039fdd/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp
[modify] https://crrev.com/3adbed213b56cf9a0d875a1f0ffaacd9da039fdd/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationAbsoluteController.cpp
[modify] https://crrev.com/3adbed213b56cf9a0d875a1f0ffaacd9da039fdd/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp
[modify] https://crrev.com/3adbed213b56cf9a0d875a1f0ffaacd9da039fdd/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.h

Status: Verified (was: Assigned)

Sign in to add a comment