You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check visibility state in algorithms that fire events (#140)
The requirement to only fire events on documents whose visibility state is
"visible" was already in the normative Security and Privacy section, but it
was not integrated into the algorithms that fire said events.
Related to #33.
Copy file name to clipboardExpand all lines: index.bs
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -373,13 +373,14 @@ Note: Implementations must take [[#automation]] into account to determine whethe
373
373
<div algorithm="deviceorientation firing steps">
374
374
Whenever a <a>significant change in orientation</a> occurs, the user agent must execute the following steps on a <a for="/">navigable</a>'s <a for="navigable">active window</a><var>window</var>:
375
375
376
+
1. Let <var>document</var> be <var>window</var>'s <a>associated Document</a>.
377
+
1. If <var>document</var>'s <a>visibility state</a> is not "<code>visible</code>", return.
376
378
1. If the implementation cannot provide <a>relative orientation</a> or the resulting <a>absolute orientation</a> data is more accurate:
377
379
1. Let <var>absolute</var> be true.
378
380
1. Let <var>policies</var> be « "<a data-lt="accelerometer-feature"><code>accelerometer</code></a>", "<a data-lt="gyroscope-feature"><code>gyroscope</code></a>", "<a data-lt="magnetometer-feature"><code>magnetometer</code></a>" ».
379
381
1. Otherwise:
380
382
1. Let <var>absolute</var> be false.
381
383
1. Let <var>policies</var> be « "<a data-lt="accelerometer-feature"><code>accelerometer</code></a>", "<a data-lt="gyroscope-feature"><code>gyroscope</code></a>" ».
382
-
1. Let <var>document</var> be <var>window</var>'s <a>associated Document</a>.
383
384
1. <a for="list">For each</a><var>policy</var> of <var>policies</var>:
384
385
1. If <var>document</var> is not <a>allowed to use</a> the <a>policy-controlled feature</a> named <var>policy</var>, return.
385
386
1. Invoke <a>fire an orientation event</a> with <a event for="Window"><code>deviceorientation</code></a>, <var>window</var>, and <var>absolute</var>.
@@ -558,6 +559,7 @@ The <dfn method for="DeviceMotionEvent">requestPermission()</dfn> method steps a
558
559
At an <a>implementation-defined</a> interval <var>interval</var>, the user agent must execute the following steps on a <a for="/">navigable</a>'s <a for="navigable">active window</a><var>window</var>:
559
560
560
561
1. Let <var>document</var> be <var>window</var>'s <a>associated Document</a>.
562
+
1. If <var>document</var>'s <a>visibility state</a> is not "<code>visible</code>", return.
0 commit comments