Skip to content

Commit f7ef32b

Browse files
author
Alexander Shalamov
committed
Fixes for review comments
1 parent 51d7d04 commit f7ef32b

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed

index.bs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,26 +1568,24 @@ for each [=sensor types=]:
15681568

15691569
<h3 id="permission-api">Extending the Permission API</h3>
15701570

1571-
{{Sensor}} interface for concrete [=sensor=] must protect it's [=sensor reading|reading=]
1572-
by associated {{PermissionName}} or more complex {{PermissionDescriptor}}.
1573-
[=Low-level=] {{Sensor|sensor}} may use it's interface name as a {{PermissionName}}, for instance
1574-
"gyroscope" or "accelerometer". [=sensor fusion|Fusion sensors=] must
1575-
[=request permission to use|request permission to use=] sensors used as a source of fusion.
1571+
An implementation of the {{Sensor}} interface for each [=sensor type=] must protect its
1572+
[=sensor reading|reading=] by associated {{PermissionName}} or {{PermissionDescriptor}}.
1573+
A [=Low-level=] {{Sensor|sensor}} may use its interface name as a {{PermissionName}},
1574+
for instance, "gyroscope" or "accelerometer". [=sensor fusion|Fusion sensors=] must
1575+
[=request permission to use|request permission to use=] sensors that are used as a source
1576+
of fusion.
15761577

15771578
Even though, it might be difficult to reconstruct [=low-level=] [=sensor readings=] from
15781579
fused data, some of the original information might be inferred. For example, it is easy to
15791580
deduce user's orientation in space if absolute or geomagnetic orientation sensors are used,
15801581
therefore, those sensors must [=request permission to use|request permission to use=]
15811582
"magnetometer" as it provides information about orientation of device in relation to Earth's
15821583
magnetic field. In contrast, relative orientation sensor does not expose such information, thus,
1583-
does not need to [=request permission to use|request permission to use=] "magnetometer".
1584+
it does not need to [=request permission to use|request permission to use=] "magnetometer".
15841585

1585-
In order to provide fine grained control over the sensor's data,
1586-
{{PermissionDescriptor|permission descriptors}} may be used. For example, descriptor can contain
1587-
settings for accuracy or [=sampling frequency=].
1588-
1589-
Here is an example of {{PermissionDescriptor}} for a possible extension of the Permission API for
1590-
accelerometer sensor.
1586+
{{PermissionDescriptor|Permission descriptors}} can also be used to set maximum allowed limits
1587+
for accuracy or [=sampling frequency=]. An example for a possible extension of the Permission API
1588+
for accelerometer sensor is given below.
15911589

15921590
<pre class=example>
15931591
dictionary AccelerometerPermissionDescriptor : PermissionDescriptor {

index.html

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@
14581458
<div class="head">
14591459
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
14601460
<h1 class="p-name no-ref" id="title">Generic Sensor API</h1>
1461-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2017-09-07">7 September 2017</time></span></h2>
1461+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2017-09-08">8 September 2017</time></span></h2>
14621462
<div data-fill-with="spec-metadata">
14631463
<dl>
14641464
<dt>This version:
@@ -2972,26 +2972,27 @@ <h3 class="heading settled" data-level="10.6" id="definition-reqs"><span class="
29722972
<p>A set of <a data-link-type="dfn" href="#identifying-parameters" id="ref-for-identifying-parameters②">identifying parameters</a>. TODO: replace that by an abstract operation.</p>
29732973
</ul>
29742974
<h3 class="heading settled" data-level="10.7" id="permission-api"><span class="secno">10.7. </span><span class="content">Extending the Permission API</span><a class="self-link" href="#permission-api"></a></h3>
2975-
<p><code class="idl"><a data-link-type="idl" href="#sensor" id="ref-for-sensor③⓪">Sensor</a></code> interface for concrete <a data-link-type="dfn" href="#concept-sensor" id="ref-for-concept-sensor⑤①">sensor</a> must protect it’s <a data-link-type="dfn" href="#sensor-readings" id="ref-for-sensor-readings④⑥">reading</a> by associated <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#enumdef-permissionname" id="ref-for-enumdef-permissionname⑥">PermissionName</a></code> or more complex <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#dictdef-permissiondescriptor" id="ref-for-dictdef-permissiondescriptor①">PermissionDescriptor</a></code>. <a data-link-type="dfn" href="#low-level" id="ref-for-low-level①③">Low-level</a> <code class="idl"><a data-link-type="idl" href="#sensor" id="ref-for-sensor③①">sensor</a></code> may use it’s interface name as a <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#enumdef-permissionname" id="ref-for-enumdef-permissionname⑦">PermissionName</a></code>, for instance
2976-
"gyroscope" or "accelerometer". <a data-link-type="dfn" href="#sensor-fusion" id="ref-for-sensor-fusion⑦">Fusion sensors</a> must <a data-link-type="dfn" href="https://w3c.github.io/permissions/#request-permission-to-use" id="ref-for-request-permission-to-use①">request permission to use</a> sensors used as a source of fusion.</p>
2975+
<p>An implementation of the <code class="idl"><a data-link-type="idl" href="#sensor" id="ref-for-sensor③⓪">Sensor</a></code> interface for each <a data-link-type="dfn" href="#sensor-type" id="ref-for-sensor-type③⑥">sensor type</a> must protect its <a data-link-type="dfn" href="#sensor-readings" id="ref-for-sensor-readings④⑥">reading</a> by associated <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#enumdef-permissionname" id="ref-for-enumdef-permissionname⑥">PermissionName</a></code> or <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#dictdef-permissiondescriptor" id="ref-for-dictdef-permissiondescriptor①">PermissionDescriptor</a></code>.
2976+
A <a data-link-type="dfn" href="#low-level" id="ref-for-low-level①③">Low-level</a> <code class="idl"><a data-link-type="idl" href="#sensor" id="ref-for-sensor③①">sensor</a></code> may use its interface name as a <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#enumdef-permissionname" id="ref-for-enumdef-permissionname⑦">PermissionName</a></code>,
2977+
for instance, "gyroscope" or "accelerometer". <a data-link-type="dfn" href="#sensor-fusion" id="ref-for-sensor-fusion⑦">Fusion sensors</a> must <a data-link-type="dfn" href="https://w3c.github.io/permissions/#request-permission-to-use" id="ref-for-request-permission-to-use①">request permission to use</a> sensors that are used as a source
2978+
of fusion.</p>
29772979
<p>Even though, it might be difficult to reconstruct <a data-link-type="dfn" href="#low-level" id="ref-for-low-level①④">low-level</a> <a data-link-type="dfn" href="#sensor-readings" id="ref-for-sensor-readings④⑦">sensor readings</a> from
29782980
fused data, some of the original information might be inferred. For example, it is easy to
29792981
deduce user’s orientation in space if absolute or geomagnetic orientation sensors are used,
29802982
therefore, those sensors must <a data-link-type="dfn" href="https://w3c.github.io/permissions/#request-permission-to-use" id="ref-for-request-permission-to-use②">request permission to use</a> "magnetometer" as it provides information about orientation of device in relation to Earth’s
29812983
magnetic field. In contrast, relative orientation sensor does not expose such information, thus,
2982-
does not need to <a data-link-type="dfn" href="https://w3c.github.io/permissions/#request-permission-to-use" id="ref-for-request-permission-to-use③">request permission to use</a> "magnetometer".</p>
2983-
<p>In order to provide fine grained control over the sensor’s data, <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#dictdef-permissiondescriptor" id="ref-for-dictdef-permissiondescriptor②">permission descriptors</a></code> may be used. For example, descriptor can contain
2984-
settings for accuracy or <a data-link-type="dfn" href="#sampling-frequency" id="ref-for-sampling-frequency⑥">sampling frequency</a>.</p>
2985-
<p>Here is an example of <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#dictdef-permissiondescriptor" id="ref-for-dictdef-permissiondescriptor③">PermissionDescriptor</a></code> for a possible extension of the Permission API for
2986-
accelerometer sensor.</p>
2984+
it does not need to <a data-link-type="dfn" href="https://w3c.github.io/permissions/#request-permission-to-use" id="ref-for-request-permission-to-use③">request permission to use</a> "magnetometer".</p>
2985+
<p><code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#dictdef-permissiondescriptor" id="ref-for-dictdef-permissiondescriptor②">Permission descriptors</a></code> can also be used to set maximum allowed limits
2986+
for accuracy or <a data-link-type="dfn" href="#sampling-frequency" id="ref-for-sampling-frequency⑥">sampling frequency</a>. An example for a possible extension of the Permission API
2987+
for accelerometer sensor is given below.</p>
29872988
<pre class="example" id="example-6d08453b"><a class="self-link" href="#example-6d08453b"></a>dictionary AccelerometerPermissionDescriptor : PermissionDescriptor {
29882989
boolean highAccuracy = false;
29892990
boolean highFrequency = false;
29902991
};
29912992
</pre>
29922993
<h3 class="heading settled" data-level="10.8" id="example-webidl"><span class="secno">10.8. </span><span class="content">Example WebIDL</span><a class="self-link" href="#example-webidl"></a></h3>
29932994
<p>Here’s example WebIDL for a possible extension of this specification
2994-
for proximity <a data-link-type="dfn" href="#concept-sensor" id="ref-for-concept-sensor⑤">sensors</a>.</p>
2995+
for proximity <a data-link-type="dfn" href="#concept-sensor" id="ref-for-concept-sensor⑤">sensors</a>.</p>
29952996
<pre class="example" id="example-be4b13c4"><a class="self-link" href="#example-be4b13c4"></a>[Constructor(optional ProximitySensorOptions proximitySensorOptions),
29962997
SecureContext, Exposed=Window]
29972998
interface ProximitySensor : Sensor {
@@ -3105,8 +3106,8 @@ <h3 class="no-ref no-num heading settled" id="conventions"><span class="content"
31053106
<a class="self-link" href="#example-f839f6c8"></a>
31063107
<p>This is an example of an informative example.</p>
31073108
</div>
3108-
<p>Because this document doesn’t itself define APIs for specific <a data-link-type="dfn" href="#sensor-type" id="ref-for-sensor-type③">sensor types</a><wbr>that is the role of extensions to this specification—<wbr>all examples are inevitably (wishful) fabrications.
3109-
Although all of the <a data-link-type="dfn" href="#concept-sensor" id="ref-for-concept-sensor⑤">sensors</a> used a examples
3109+
<p>Because this document doesn’t itself define APIs for specific <a data-link-type="dfn" href="#sensor-type" id="ref-for-sensor-type③">sensor types</a><wbr>that is the role of extensions to this specification—<wbr>all examples are inevitably (wishful) fabrications.
3110+
Although all of the <a data-link-type="dfn" href="#concept-sensor" id="ref-for-concept-sensor⑤">sensors</a> used a examples
31103111
would be great candidates for building atop the Generic Sensor API,
31113112
their inclusion in this document does not imply that the relevant Working Groups
31123113
are planning to do so. </p>
@@ -3662,6 +3663,7 @@ <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">I
36623663
<li><a href="#ref-for-sensor-type②⑨">9.2. Connect to sensor</a>
36633664
<li><a href="#ref-for-sensor-type③⓪">10. Extensibility</a> <a href="#ref-for-sensor-type③①">(2)</a>
36643665
<li><a href="#ref-for-sensor-type③②">10.6. Definition Requirements</a> <a href="#ref-for-sensor-type③③">(2)</a> <a href="#ref-for-sensor-type③④">(3)</a> <a href="#ref-for-sensor-type③⑤">(4)</a>
3666+
<li><a href="#ref-for-sensor-type③⑥">10.7. Extending the Permission API</a>
36653667
</ul>
36663668
</aside>
36673669
<aside class="dfn-panel" data-for="associated-sensors">
@@ -3710,8 +3712,7 @@ <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">I
37103712
<li><a href="#ref-for-concept-sensor④⑤">9.15. Request sensor access</a>
37113713
<li><a href="#ref-for-concept-sensor④⑥">10.2. Naming</a> <a href="#ref-for-concept-sensor④⑦">(2)</a> <a href="#ref-for-concept-sensor④⑧">(3)</a>
37123714
<li><a href="#ref-for-concept-sensor④⑨">10.6. Definition Requirements</a> <a href="#ref-for-concept-sensor⑤⓪">(2)</a>
3713-
<li><a href="#ref-for-concept-sensor⑤①">10.7. Extending the Permission API</a>
3714-
<li><a href="#ref-for-concept-sensor⑤②">10.8. Example WebIDL</a>
3715+
<li><a href="#ref-for-concept-sensor⑤①">10.8. Example WebIDL</a>
37153716
</ul>
37163717
</aside>
37173718
<aside class="dfn-panel" data-for="activated-sensor-objects">

0 commit comments

Comments
 (0)