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
[css-viewport-1] Make sure to always return one segment
When the device is not folded (flat) or it's a regular device
always return one segment (typically the size of the viewport).
This is to follow developer feedback and consistency with the rest
of the platform.
Copy file name to clipboardExpand all lines: css-viewport-1/Overview.bs
+2-2
Original file line number
Diff line number
Diff line change
@@ -572,13 +572,13 @@ interface Viewport {
572
572
The {{segments}} property is an array of {{DOMRect}} that represent the dimensions of each existing viewport segment.
573
573
Each {{DOMRect}} contains the geometry of the segment (x, y, width, height) in CSS ''<length>/px''.
574
574
575
-
Additonal details about the definition of a viewport segment can be found here: [[css-env-1#viewport-segments]].
575
+
Additional details about the definition of a viewport segment can be found here: [[css-env-1#viewport-segments]].
576
576
577
577
The {{segments}} attribute getter steps are:
578
578
1. If the {{Viewport}}'s associated {{Document}} is not <a>fully active</a>, return null.
579
579
2. Let |topLevelTraversable| be |document|'s [=relevant global object=]'s [=/navigable=]'s [=browsing context/top-level traversable=].
580
580
3. If |topLevelTraversable|.[=[[DisplayFeaturesOverride]]=] is non-null, return {{Viewport}}'s [[css-env-1#viewport-segments|segments]] array calculated from |topLevelTraversable|.[=[[DisplayFeaturesOverride]]=].
581
-
4. Returns null if there is only a single viewport segment and abort these steps.
581
+
4. If there is only a single viewport segment (typically the size of the {{Viewport}}) return an array with that single segment.
582
582
5. Otherwise, return the {{Viewport}}'s [[css-env-1#viewport-segments|segments]] array calculated from the hardware features.
0 commit comments