From 07917208ec7be7f651d611dab78ee0669f12e9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Wed, 8 May 2024 10:02:03 +1000 Subject: [PATCH] Editorial: rewrite permissions section (#165) Co-authored-by: Reilly Grant --- index.bs | 43 ++++++++++--------------------------------- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/index.bs b/index.bs index 2a18115..cc01ee2 100644 --- a/index.bs +++ b/index.bs @@ -225,48 +225,25 @@ The rotation rate measures the rate at which the device rotates about Note: [[MOTION-SENSORS]] and [[GYROSCOPE]] both contain a more detailed discussion of gyroscopes, rotation rates and measurements. -Permissions Policy integration {#permissions-policy-integration} +Permissions {#permissions-integration} ============================== -
-This integration is [=at risk=] due to a lack of test coverage in Web Platform Tests. -
- -This specification defines the following policy-controlled features: - - - "accelerometer", whose default allowlist is [=default allowlist/'self'=]. - - "gyroscope", whose default allowlist is [=default allowlist/'self'=]. - - "magnetometer", whose default allowlist is [=default allowlist/'self'=]. - -
-Note: Usage of the policy-controlled features above by this specification is as follows: - - - The deviceorientation event requires the "accelerometer" and "gyroscope" features when providing relative orientation data. For the implementation to fall back to absolute orientation data, the "magnetometer" feature is also used. - - The deviceorientationabsolute event requires the "accelerometer", "gyroscope" and "magnetometer" features. - - The devicemotion event requires the "accelerometer" and "gyroscope" features. - -
- -Permissions API integration {#permissions-api-integration} -=========================== -
This integration is [=at risk=] due to the low pass rate of the DeviceMotionEvent.requestPermission() and DeviceOrientationEvent.requestPermission() tests.
-This specification defines the following default powerful features: +This specification is a [=powerful feature=] and, as such, it defines the following [=permissions=] which are [=policy-controlled features=] with the given [=default allowlists=]: - * "accelerometer" - * "gyroscope" - * "magnetometer" + - "accelerometer", whose [=default allowlist=] is [=default allowlist/'self'=]. + - "gyroscope", whose [=default allowlist=] is [=default allowlist/'self'=]. + - "magnetometer", whose [=default allowlist=] is [=default allowlist/'self'=].
-Note: Usage of the powerful features above by this specification is as follows: - - - The deviceorientation event requires "accelerometer" and "gyroscope" when providing relative orientation data. For the implementation to fall back to absolute orientation data, "magnetometer" is also required. - - The deviceorientationabsolute event requires "accelerometer", "gyroscope" and "magnetometer". - - The devicemotion event requires "accelerometer" and "gyroscope". + Note: Which events get [=dispatched=] depends on which [=permissions=] have been [=permission/granted=]: + - When providing relative orientation data, the deviceorientation event is only [=dispatched=] if the "accelerometer" and "gyroscope" [=permissions=] are [=permission/granted=]. For the implementation to fall back to absolute orientation data, the "magnetometer" [=permission=] must also be [=permission/granted=]. + - The deviceorientationabsolute event is only [=dispatched=] if the "accelerometer", "gyroscope", and "magnetometer" [=permissions=] are [=permission/granted=]. + - The devicemotion event is only [=dispatched=] if the "accelerometer" and "gyroscope" [=permissions=] are [=permission/granted=].
Task Source {#taks-source} @@ -647,7 +624,7 @@ In light of that, implementations may consider visual indicators to signify the Furthermore, to minimize privacy risks, the chance of fingerprinting and other attacks the implementations must: * fire events only when a [=/navigable=]'s [=navigable/active document=]'s [=visibility state=] is "visible", -* implement [[#permissions-policy-integration]] so that events are fired on [=child navigables=] (including but not restricted to cross-origin ones) only if allowed by the [=/top-level traversable=], +* implement [[#permissions-integration]] so that events are fired on [=child navigables=] (including but not restricted to cross-origin ones) only if allowed by the [=/top-level traversable=], * fire events on a [=/navigable=]'s [=navigable/active windows=] only when its [=relevant settings object=] is a [=secure context=], * limit precision of attribute values as described in the previous sections.