Skip to content

Commit

Permalink
Editorial: use bikeshed shorthands for devicemotion firing steps (#176)
Browse files Browse the repository at this point in the history
SHA: d80265a
Reason: push, by marcoscaceres

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
marcoscaceres and github-actions[bot] committed May 21, 2024
1 parent d5b077e commit 799453a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel="stylesheet">
<meta content="Bikeshed version 82ce88815, updated Thu Sep 7 16:33:55 2023 -0700" name="generator">
<link href="https://www.w3.org/TR/orientation-event/" rel="canonical">
<meta content="39c015eec889a01f04c42c268f0ef9151806dcb5" name="document-revision">
<meta content="d80265a4cf12552a028848d1f64994dc037f5cf1" name="document-revision">
<style>/* Boilerplate: style-autolinks */
.css.css, .property.property, .descriptor.descriptor {
color: var(--a-normal-text);
Expand Down Expand Up @@ -889,7 +889,7 @@
<div class="head">
<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/2021/logos/W3C" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">Device Orientation and Motion</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-05-14">14 May 2024</time></p>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-05-21">21 May 2024</time></p>
<details open>
<summary>More details about this document</summary>
<div data-fill-with="spec-metadata">
Expand Down Expand Up @@ -1543,20 +1543,20 @@ <h4 class="heading settled" data-level="6.3.3" id="device-motion-event-api"><spa
</ol>
</div>
<div class="algorithm" data-algorithm="devicemotion firing steps">
At an <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#implementation-defined" id="ref-for-implementation-defined②">implementation-defined</a> interval <var>interval</var>, the user agent must execute the following steps on a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/document-sequences.html#navigable" id="ref-for-navigable②">navigable</a>s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/document-sequences.html#nav-window" id="ref-for-nav-window②">active window</a> <var>window</var>:
At an <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#implementation-defined" id="ref-for-implementation-defined②">implementation-defined</a> interval <var>interval</var>, the user agent must execute the following steps on a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/document-sequences.html#navigable" id="ref-for-navigable②">navigable</a>'s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/document-sequences.html#nav-window" id="ref-for-nav-window②">active window</a> <var>window</var>:
<ol>
<li data-md>
<p>Let <var>document</var> be <var>window</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-document-window" id="ref-for-concept-document-window①">associated Document</a>.</p>
<li data-md>
<p>If <var>document</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#visibility-state" id="ref-for-visibility-state①">visibility state</a> is not "<code>visible</code>", return.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑥">For each</a> <var>policy</var> of « "<a data-link-type="dfn"><code>accelerometer</code></a>", "<a data-link-type="dfn"><code>gyroscope</code></a>" »:</p>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑥">For each</a> <var>policy</var> of « <a class="idl-code" data-link-type="permission" href="#permissiondef-accelerometer" id="ref-for-permissiondef-accelerometer⑧">"accelerometer"</a>, <a class="idl-code" data-link-type="permission" href="#permissiondef-gyroscope" id="ref-for-permissiondef-gyroscope⑧">"gyroscope"</a> »:</p>
<ol>
<li data-md>
<p>If <var>document</var> is not <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/iframe-embed-object.html#allowed-to-use" id="ref-for-allowed-to-use①">allowed to use</a> the <a data-link-type="dfn" href="https://w3c.github.io/webappsec-permissions-policy/#policy-controlled-feature" id="ref-for-policy-controlled-feature①">policy-controlled feature</a> named <var>policy</var>, return.</p>
</ol>
<li data-md>
<p>Let <var>topLevelTraversable</var> be <var>window</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/nav-history-apis.html#window-navigable" id="ref-for-window-navigable①">navigable</a>s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/document-sequences.html#nav-top" id="ref-for-nav-top①">top-level traversable</a>.</p>
<p>Let <var>topLevelTraversable</var> be <var>window</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/nav-history-apis.html#window-navigable" id="ref-for-window-navigable①">navigable</a>'s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/document-sequences.html#nav-top" id="ref-for-nav-top①">top-level traversable</a>.</p>
<li data-md>
<p>Let <var>platformLinearAcceleration</var> be null.</p>
<li data-md>
Expand Down Expand Up @@ -1671,18 +1671,18 @@ <h4 class="heading settled" data-level="6.3.3" id="device-motion-event-api"><spa
<p>Run these steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel③">in parallel</a>:</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑦">For each</a> <var>permission name</var> in « "<a class="idl-code" data-link-type="permission" href="#permissiondef-accelerometer" id="ref-for-permissiondef-accelerometer">accelerometer</a>", "<a class="idl-code" data-link-type="permission" href="#permissiondef-gyroscope" id="ref-for-permissiondef-gyroscope">gyroscope</a>" »:</p>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑦">For each</a> <var>permission</var> in « <a class="idl-code" data-link-type="permission" href="#permissiondef-accelerometer" id="ref-for-permissiondef-accelerometer">"accelerometer"</a>, <a class="idl-code" data-link-type="permission" href="#permissiondef-gyroscope" id="ref-for-permissiondef-gyroscope">"gyroscope"</a> »:</p>
<ol>
<li data-md>
<p>Let <var>state</var> be the result of <a data-link-type="dfn" href="https://w3c.github.io/permissions/#dfn-getting-the-current-permission-state" id="ref-for-dfn-getting-the-current-permission-state①">getting the current permission state</a> with <var>permission name</var> and <var>environment</var>.</p>
<p>Let <var>state</var> be the result of <a data-link-type="dfn" href="https://w3c.github.io/permissions/#dfn-getting-the-current-permission-state" id="ref-for-dfn-getting-the-current-permission-state①">getting the current permission state</a> with <var>permission</var> and <var>environment</var>.</p>
<li data-md>
<p>If <var>state</var> is not "<code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#dom-permissionstate-granted" id="ref-for-dom-permissionstate-granted⑤">granted</a></code>", return.</p>
</ol>
<li data-md>
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task" id="ref-for-queue-a-global-task⑤">Queue a global task</a> on the <a data-link-type="dfn" href="#device-motion-and-orientation-task-source" id="ref-for-device-motion-and-orientation-task-source⑤">device motion and orientation task source</a> given <var>window</var> to run the following steps:</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire①">Fire an event</a> named <a class="idl-code" data-link-type="event" href="#def-devicemotion" id="ref-for-def-devicemotion③"><code>devicemotion</code></a> at <var>window</var>, using <code class="idl"><a data-link-type="idl" href="#devicemotionevent" id="ref-for-devicemotionevent">DeviceMotionEvent</a></code>, with the <code class="idl"><a data-link-type="idl" href="#dom-devicemotionevent-acceleration" id="ref-for-dom-devicemotionevent-acceleration③">acceleration</a></code> attribute initialized to <var>acceleration</var>, the <code class="idl"><a data-link-type="idl" href="#dom-devicemotionevent-accelerationincludinggravity" id="ref-for-dom-devicemotionevent-accelerationincludinggravity④">accelerationIncludingGravity</a></code> attribute initialized to <var>accelerationIncludingGravity</var>, the <code class="idl"><a data-link-type="idl" href="#dom-devicemotionevent-rotationrate" id="ref-for-dom-devicemotionevent-rotationrate②">rotationRate</a></code> attribute initialized to <var>rotationRate</var>, and the <code class="idl"><a data-link-type="idl" href="#dom-devicemotionevent-interval" id="ref-for-dom-devicemotionevent-interval①">interval</a></code> attribute initialized to <var>interval</var>.</p>
<p><a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire①">Fire an event</a> named "<a class="idl-code" data-link-type="event" href="#def-devicemotion" id="ref-for-def-devicemotion③">devicemotion</a>" at <var>window</var>, using <code class="idl"><a data-link-type="idl" href="#devicemotionevent" id="ref-for-devicemotionevent">DeviceMotionEvent</a></code>, with the <code class="idl"><a data-link-type="idl" href="#dom-devicemotionevent-acceleration" id="ref-for-dom-devicemotionevent-acceleration③">acceleration</a></code> attribute initialized to <var>acceleration</var>, the <code class="idl"><a data-link-type="idl" href="#dom-devicemotionevent-accelerationincludinggravity" id="ref-for-dom-devicemotionevent-accelerationincludinggravity④">accelerationIncludingGravity</a></code> attribute initialized to <var>accelerationIncludingGravity</var>, the <code class="idl"><a data-link-type="idl" href="#dom-devicemotionevent-rotationrate" id="ref-for-dom-devicemotionevent-rotationrate②">rotationRate</a></code> attribute initialized to <var>rotationRate</var>, and the <code class="idl"><a data-link-type="idl" href="#dom-devicemotionevent-interval" id="ref-for-dom-devicemotionevent-interval①">interval</a></code> attribute initialized to <var>interval</var>.</p>
</ol>
</ol>
</ol>
Expand Down Expand Up @@ -3309,8 +3309,8 @@ <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">I
window.dfnpanelData['linear-device-acceleration'] = {"dfnID": "linear-device-acceleration", "url": "#linear-device-acceleration", "dfnText": "Linear device acceleration", "refSections": [{"refs": [{"id": "ref-for-linear-device-acceleration"}, {"id": "ref-for-linear-device-acceleration\u2460"}, {"id": "ref-for-linear-device-acceleration\u2461"}], "title": "3.2. Device Motion"}, {"refs": [{"id": "ref-for-linear-device-acceleration\u2462"}, {"id": "ref-for-linear-device-acceleration\u2463"}, {"id": "ref-for-linear-device-acceleration\u2464"}, {"id": "ref-for-linear-device-acceleration\u2465"}], "title": "6.3.3. The DeviceMotionEvent interface"}, {"refs": [{"id": "ref-for-linear-device-acceleration\u2466"}], "title": "9.2. Device Motion Automation"}], "external": false};
window.dfnpanelData['acceleration-with-gravity'] = {"dfnID": "acceleration-with-gravity", "url": "#acceleration-with-gravity", "dfnText": "includes gravity", "refSections": [{"refs": [{"id": "ref-for-acceleration-with-gravity"}], "title": "3.2. Device Motion"}, {"refs": [{"id": "ref-for-acceleration-with-gravity\u2460"}, {"id": "ref-for-acceleration-with-gravity\u2461"}], "title": "6.3.3. The DeviceMotionEvent interface"}, {"refs": [{"id": "ref-for-acceleration-with-gravity\u2462"}], "title": "9.2. Device Motion Automation"}], "external": false};
window.dfnpanelData['rotation-rate'] = {"dfnID": "rotation-rate", "url": "#rotation-rate", "dfnText": "rotation rate", "refSections": [{"refs": [{"id": "ref-for-rotation-rate"}], "title": "3.2. Device Motion"}, {"refs": [{"id": "ref-for-rotation-rate\u2460"}], "title": "6.3.2. The DeviceMotionEventRotationRate interface"}, {"refs": [{"id": "ref-for-rotation-rate\u2461"}, {"id": "ref-for-rotation-rate\u2462"}, {"id": "ref-for-rotation-rate\u2463"}], "title": "6.3.3. The DeviceMotionEvent interface"}, {"refs": [{"id": "ref-for-rotation-rate\u2464"}], "title": "9.2. Device Motion Automation"}], "external": false};
window.dfnpanelData['permissiondef-accelerometer'] = {"dfnID": "permissiondef-accelerometer", "url": "#permissiondef-accelerometer", "dfnText": "\"accelerometer\"", "refSections": [{"refs": [{"id": "ref-for-permissiondef-accelerometer"}, {"id": "ref-for-permissiondef-accelerometer\u2460"}, {"id": "ref-for-permissiondef-accelerometer\u2461"}], "title": "4. Permissions"}, {"refs": [{"id": "ref-for-permissiondef-accelerometer\u2462"}, {"id": "ref-for-permissiondef-accelerometer\u2463"}, {"id": "ref-for-permissiondef-accelerometer\u2464"}, {"id": "ref-for-permissiondef-accelerometer\u2465"}], "title": "6.1. deviceorientation Event"}, {"refs": [{"id": "ref-for-permissiondef-accelerometer\u2466"}, {"id": "ref-for-permissiondef-accelerometer\u2467"}], "title": "6.3.3. The DeviceMotionEvent interface"}], "external": false};
window.dfnpanelData['permissiondef-gyroscope'] = {"dfnID": "permissiondef-gyroscope", "url": "#permissiondef-gyroscope", "dfnText": "\"gyroscope\"", "refSections": [{"refs": [{"id": "ref-for-permissiondef-gyroscope"}, {"id": "ref-for-permissiondef-gyroscope\u2460"}, {"id": "ref-for-permissiondef-gyroscope\u2461"}], "title": "4. Permissions"}, {"refs": [{"id": "ref-for-permissiondef-gyroscope\u2462"}, {"id": "ref-for-permissiondef-gyroscope\u2463"}, {"id": "ref-for-permissiondef-gyroscope\u2464"}, {"id": "ref-for-permissiondef-gyroscope\u2465"}], "title": "6.1. deviceorientation Event"}, {"refs": [{"id": "ref-for-permissiondef-gyroscope\u2466"}, {"id": "ref-for-permissiondef-gyroscope\u2467"}], "title": "6.3.3. The DeviceMotionEvent interface"}], "external": false};
window.dfnpanelData['permissiondef-accelerometer'] = {"dfnID": "permissiondef-accelerometer", "url": "#permissiondef-accelerometer", "dfnText": "\"accelerometer\"", "refSections": [{"refs": [{"id": "ref-for-permissiondef-accelerometer"}, {"id": "ref-for-permissiondef-accelerometer\u2460"}, {"id": "ref-for-permissiondef-accelerometer\u2461"}], "title": "4. Permissions"}, {"refs": [{"id": "ref-for-permissiondef-accelerometer\u2462"}, {"id": "ref-for-permissiondef-accelerometer\u2463"}, {"id": "ref-for-permissiondef-accelerometer\u2464"}, {"id": "ref-for-permissiondef-accelerometer\u2465"}], "title": "6.1. deviceorientation Event"}, {"refs": [{"id": "ref-for-permissiondef-accelerometer\u2466"}, {"id": "ref-for-permissiondef-accelerometer\u2467"}, {"id": "ref-for-permissiondef-accelerometer\u2468"}], "title": "6.3.3. The DeviceMotionEvent interface"}], "external": false};
window.dfnpanelData['permissiondef-gyroscope'] = {"dfnID": "permissiondef-gyroscope", "url": "#permissiondef-gyroscope", "dfnText": "\"gyroscope\"", "refSections": [{"refs": [{"id": "ref-for-permissiondef-gyroscope"}, {"id": "ref-for-permissiondef-gyroscope\u2460"}, {"id": "ref-for-permissiondef-gyroscope\u2461"}], "title": "4. Permissions"}, {"refs": [{"id": "ref-for-permissiondef-gyroscope\u2462"}, {"id": "ref-for-permissiondef-gyroscope\u2463"}, {"id": "ref-for-permissiondef-gyroscope\u2464"}, {"id": "ref-for-permissiondef-gyroscope\u2465"}], "title": "6.1. deviceorientation Event"}, {"refs": [{"id": "ref-for-permissiondef-gyroscope\u2466"}, {"id": "ref-for-permissiondef-gyroscope\u2467"}, {"id": "ref-for-permissiondef-gyroscope\u2468"}], "title": "6.3.3. The DeviceMotionEvent interface"}], "external": false};
window.dfnpanelData['permissiondef-magnetometer'] = {"dfnID": "permissiondef-magnetometer", "url": "#permissiondef-magnetometer", "dfnText": "\"magnetometer\"", "refSections": [{"refs": [{"id": "ref-for-permissiondef-magnetometer"}, {"id": "ref-for-permissiondef-magnetometer\u2460"}], "title": "4. Permissions"}, {"refs": [{"id": "ref-for-permissiondef-magnetometer\u2461"}, {"id": "ref-for-permissiondef-magnetometer\u2462"}, {"id": "ref-for-permissiondef-magnetometer\u2463"}], "title": "6.1. deviceorientation Event"}], "external": false};
window.dfnpanelData['device-motion-and-orientation-task-source'] = {"dfnID": "device-motion-and-orientation-task-source", "url": "#device-motion-and-orientation-task-source", "dfnText": "device motion and orientation task source", "refSections": [{"refs": [{"id": "ref-for-device-motion-and-orientation-task-source"}, {"id": "ref-for-device-motion-and-orientation-task-source\u2460"}, {"id": "ref-for-device-motion-and-orientation-task-source\u2461"}], "title": "6.1. deviceorientation Event"}, {"refs": [{"id": "ref-for-device-motion-and-orientation-task-source\u2462"}, {"id": "ref-for-device-motion-and-orientation-task-source\u2463"}, {"id": "ref-for-device-motion-and-orientation-task-source\u2464"}], "title": "6.3.3. The DeviceMotionEvent interface"}], "external": false};
window.dfnpanelData['deviceorientationevent'] = {"dfnID": "deviceorientationevent", "url": "#deviceorientationevent", "dfnText": "DeviceOrientationEvent", "refSections": [{"refs": [{"id": "ref-for-deviceorientationevent"}], "title": "6.1. deviceorientation Event"}], "external": false};
Expand Down

0 comments on commit 799453a

Please sign in to comment.