@@ -763,6 +763,52 @@ The <a>current layout</a> can choose not to fragment a {{LayoutChild}} based on
763
763
{{LayoutConstraints/blockFragmentationType}} , for example if the child has a property like
764
764
''break-inside: avoid-page;'' .
765
765
766
+ <div algorithm>
767
+ When the user agent wants to <dfn>create a layout constraints object</dfn> given |sizingMode|, box|,
768
+ and |internalLayoutConstraints|, it <em> must</em> run the following steps:
769
+
770
+ 1. If |sizingMode| is <code> "block-like"</code> then:
771
+
772
+ 1. Let |fixedInlineSize| be the result of calculating |box|'s <b> border-box</b>
773
+ <a>inline size</a> (relative to |box|'s writing mode) exactly like block containers do.
774
+
775
+ 2. Let |fixedBlockSize| be null if |box|'s <a>block size</a> is ''height/auto' ', otherwise
776
+ the result of calculating |box|'s <b> border-box</b> <a>block size</a> exactly like block
777
+ containers do.
778
+
779
+ 3. Return a new {{LayoutConstraints}} object with:
780
+
781
+ - {{LayoutConstraints/fixedInlineSize}} , and {{LayoutConstraints/availableInlineSize}}
782
+ set to |fixedInlineSize|.
783
+
784
+ - {{LayoutConstraints/percentageInlineSize}} set to |internalLayoutConstraints|'
785
+ percentage resolution size in the inline axis (relative to |box|'s writing mode).
786
+
787
+ - {{LayoutConstraints/fixedBlockSize}} set to |fixedBlockSize|.
788
+
789
+ - {{LayoutConstraints/availableBlockSize}} set to |fixedBlockSize| if not null,
790
+ otherwise |internalLayoutConstraints|' <a>available space</a> in the block axis
791
+ (relative to |box|'s writing mode).
792
+
793
+ - {{LayoutConstraints/percentageBlockSize}} set to |internalLayoutConstraints|'
794
+ percentage resolution size in the block axis (relative to |box|'s writing mode).
795
+
796
+ 2. If |sizingMode| is <code> "manual"</code> then:
797
+
798
+ 1. Return a new {{LayoutConstraints}} object with:
799
+ - {{LayoutConstraints/fixedInlineSize}} /{{LayoutConstraints/fixedBlockSize}} set to
800
+ |internalLayoutConstraints|' fixed inline/block size (relative to |box|' s writing
801
+ mode) imposed by the <a>parent layout</a> . Either may be null.
802
+
803
+ Note: See [[#interaction-sizing]] for different scenarios when this can occur.
804
+
805
+ - {{LayoutConstraints/availableInlineSize}} /{{LayoutConstraints/availableBlockSize}} set
806
+ to |internalLayoutConstraints|' <a>available space</a> .
807
+
808
+ - {{LayoutConstraints/percentageInlineSize}} /{{LayoutConstraints/percentageBlockSize}}
809
+ set to |internalLayoutConstraints|' percentage resolution size.
810
+ </div>
811
+
766
812
Breaking and Fragmentation {#breaking-and-fragmentation}
767
813
--------------------------------------------------------
768
814
@@ -1016,7 +1062,7 @@ If the value of <a for="document layout definition">layout options'</a> {{Layout
1016
1062
ahead of time, {{LayoutConstraints/fixedBlockSize}} must be set to <code> null</code> .
1017
1063
1018
1064
If the value of <a for="document layout definition">layout options'</a> {{LayoutOptions/sizing}} is
1019
- <code> "manual"</code> , then the user-agent shouldn't pre-calculate
1065
+ <code> "manual"</code> , then the user-agent must not pre-calculate
1020
1066
{{LayoutConstraints/fixedInlineSize}} and/or {{LayoutConstraints/fixedBlockSize}} ahead of time,
1021
1067
except when it is being forced to a particular size by the formatting context in which it
1022
1068
participates, for example:
@@ -1829,22 +1875,25 @@ following steps:
1829
1875
If <a>get a layout class instance</a> returned failure, let the |box| fallback to the
1830
1876
<a>flow layout</a> and abort all these steps.
1831
1877
1832
- 3. Let |inputProperties| be |definition|'s <a for="layout definition">input properties</a> .
1878
+ 3. Let |sizingMode| be |definition|'s <a for="layout definition">layout options</a>'
1879
+ {{LayoutOptions/sizing}} property.
1833
1880
1834
- 4. Let |children | be a new <a>list </a> .
1881
+ 4. Let |inputProperties | be |definition|'s <a for="layout definition">input properties </a> .
1835
1882
1836
- 5. <a for=list>For each</a> |childBox| in |childBoxes| perform the following substeps:
1883
+ 5. Let |children| be a new <a>list</a> .
1884
+
1885
+ 6. <a for=list>For each</a> |childBox| in |childBoxes| perform the following substeps:
1837
1886
1838
1887
1. Let |layoutChild| be the result of <a>get a layout child</a> given |workletGlobalScope|,
1839
1888
|name|, and |childBox|.
1840
1889
1841
1890
2. <a for=list>Append</a> |layoutChild| to |children|.
1842
1891
1843
- 6 . Let |edges| be a new {{LayoutEdgeSizes}} populated with the <a>computed value</a> for all the
1892
+ 7 . Let |edges| be a new {{LayoutEdgeSizes}} populated with the <a>computed value</a> for all the
1844
1893
<a>box model edges</a> for |box|.
1845
1894
1846
- 7 . Let |layoutConstraints| be a new {{LayoutConstraints}} object populated with the appropriate
1847
- information from |internalLayoutConstraints |.
1895
+ 8 . Let |layoutConstraints| be the result of <a>create a layout constraints object</a> given
1896
+ |internalLayoutConstraints|, |box|, and |sizingMode |.
1848
1897
1849
1898
8. Let |styleMap| be a new {{StylePropertyMapReadOnly}} populated with <em> only</em> the
1850
1899
<a>computed values</a> for properties listed in |inputProperties| for |box|.
0 commit comments