- Updating the device posture information
+ Calculating the device posture information
- The steps to update the device posture information of a
- document are as follows:
+ The steps to calculate the device posture information of a
+ {{Document}} |document:Document| are as follows:
Return a {{DevicePostureType}} value determined in an
+ [=implementation-defined=] way based on the current hinge angle
+ value, [=current screen orientation=], as well as potential
+ implementation-specific signals, according to the [=posture values
+ table=].
@@ -464,74 +466,70 @@
Device Posture change
- Whenever the screen(s) fold angle, screen orientation or device
- specific signals change, the user agent MUST run the following
- steps as part of the next animation frame task:
+ When the user agent determines that the screen(s)' fold angle,
+ orientation or device-specific signals have changed for a [=top-level
+ traversable=], it MUST run the [=device posture change steps=] with
+ the [=top-level traversable=]'s [=navigable/active document=].
+
+
+ The device posture change steps for a {{Document}}
+ |document:Document| and an optional boolean |disallowRecursion|
+ (default false) are as follows:
[=Fire an event=] named "{{DevicePosture/change}}" at the
+ {{DevicePosture}} object associated with |document|'s [=relevant
+ global object=]'s associated {{Navigator}}.
-
- Fire an event named `change` at |document|'s
- {{Window.navigator.devicePosture}} object.
+
+
+
If |disallowRecursion| is true, abort these steps.
+
Run the [=device posture change steps=] with
+ |descendantNavigable|'s [=navigable/active document=] and true.
- Whenever a document becomes visible per [[PAGE-VISIBILITY]],
- in other words after the now visible algorithm is run, the
- user agent MUST run the following substeps as part of the next
- animation frame task:
+ This specification defines the following [=page visibility change
+ steps=] given |visibility state| and |document:Document|: