Skip to content

Commit 6accd98

Browse files
committed
[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.
1 parent 273fbf7 commit 6accd98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

css-viewport-1/Overview.bs

+2-2
Original file line numberDiff line numberDiff line change
@@ -572,13 +572,13 @@ interface Viewport {
572572
The {{segments}} property is an array of {{DOMRect}} that represent the dimensions of each existing viewport segment.
573573
Each {{DOMRect}} contains the geometry of the segment (x, y, width, height) in CSS ''<length>/px''.
574574

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]].
576576

577577
The {{segments}} attribute getter steps are:
578578
1. If the {{Viewport}}'s associated {{Document}} is not <a>fully active</a>, return null.
579579
2. Let |topLevelTraversable| be |document|'s [=relevant global object=]'s [=/navigable=]'s [=browsing context/top-level traversable=].
580580
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.
582582
5. Otherwise, return the {{Viewport}}'s [[css-env-1#viewport-segments|segments]] array calculated from the hardware features.
583583

584584
<div class=non-normative>

0 commit comments

Comments
 (0)