From 78d1aba99b81162b5285cbb649d37d59fa94e9e0 Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Thu, 2 May 2024 18:26:00 +1000 Subject: [PATCH 1/5] Editorial: rewrite permissions section The permission sections was confusing features and permissions. APIs can be classified into powerful features, but only the permissions matter. --- index.bs | 41 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/index.bs b/index.bs index 528b9ee..001e693 100644 --- a/index.bs +++ b/index.bs @@ -239,48 +239,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: +This specification is classified as a [=powerful feature=] and, as such, it defines the following [=permissions=] and [=default allowlists=]: - - "accelerometer", whose default allowlist is [=default allowlist/'self'=]. - - "gyroscope", whose default allowlist is [=default allowlist/'self'=]. - - "magnetometer", whose default allowlist is [=default allowlist/'self'=]. + - "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: - - * "accelerometer" - * "gyroscope" - * "magnetometer" - -
-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 events are only [=dispatch=] if the "accelerometer", "gyroscope" are [=permission/granted=]. For the implementation to fall back to absolute orientation data, "magnetometer" needs to also be [=permission/granted=]. + - The deviceorientationabsolute events are only [=dispatch=] if the "accelerometer", "gyroscope", and "magnetometer" are [=permission/granted=]. + - The devicemotion events are only [=dispatch=] if the "accelerometer" and "gyroscope" are [=permission/granted=].
Task Source {#taks-source} From 8a033c800d89482d5936c9037626c994a9aac9b5 Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Fri, 3 May 2024 15:40:58 +1000 Subject: [PATCH 2/5] fix stray reference --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 001e693..70a822c 100644 --- a/index.bs +++ b/index.bs @@ -638,7 +638,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. From da85bd013f40723e7cd0db0ef06ad03739f2ab11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Tue, 7 May 2024 14:56:21 +1000 Subject: [PATCH 3/5] Apply suggestions from code review Co-authored-by: Reilly Grant --- index.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 70a822c..42ab1f9 100644 --- a/index.bs +++ b/index.bs @@ -246,7 +246,7 @@ Permissions {#permissions-integration} This integration is [=at risk=] due to a lack of test coverage in Web Platform Tests. -This specification is classified as a [=powerful feature=] and, as such, it defines the following [=permissions=] and [=default allowlists=]: +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", whose [=default allowlist=] is [=default allowlist/'self'=]. - "gyroscope", whose [=default allowlist=] is [=default allowlist/'self'=]. @@ -255,9 +255,9 @@ This specification is classified as a [=powerful feature=] and, as such, it defi
Note: Which events get [=dispatched=] depends on which [=permissions=] have been [=permission/granted=]: - - When providing relative orientation data, the deviceorientation events are only [=dispatch=] if the "accelerometer", "gyroscope" are [=permission/granted=]. For the implementation to fall back to absolute orientation data, "magnetometer" needs to also be [=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 events are only [=dispatch=] if the "accelerometer", "gyroscope", and "magnetometer" are [=permission/granted=]. - - The devicemotion events are only [=dispatch=] if the "accelerometer" and "gyroscope" are [=permission/granted=]. + - The devicemotion event is only [=dispatched=] if the "accelerometer" and "gyroscope" [=permissions=] are [=permission/granted=].
Task Source {#taks-source} From 9e0230d2089228b74ed90763916bd0785f92537a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Tue, 7 May 2024 14:58:03 +1000 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Reilly Grant --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 42ab1f9..e5340ca 100644 --- a/index.bs +++ b/index.bs @@ -256,7 +256,7 @@ This specification is a [=powerful feature=] and, as such, it defines the follow 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 events are only [=dispatch=] if the "accelerometer", "gyroscope", and "magnetometer" are [=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=]. From 7d8d3bf4aa10fc3b7f1133311db65d40a60cc452 Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Tue, 7 May 2024 14:58:30 +1000 Subject: [PATCH 5/5] Swap issues --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index e5340ca..194a30b 100644 --- a/index.bs +++ b/index.bs @@ -243,7 +243,7 @@ Permissions {#permissions-integration} ==============================
-This integration is [=at risk=] due to a lack of test coverage in Web Platform Tests. +This integration is [=at risk=] due to the low pass rate of the DeviceMotionEvent.requestPermission() and DeviceOrientationEvent.requestPermission() tests.
This specification is a [=powerful feature=] and, as such, it defines the following [=permissions=] which are [=policy-controlled features=] with the given [=default allowlists=]: