@@ -1673,6 +1673,7 @@ Performing Layout {#performing-layout}
1673
1673
dictionary FragmentResultOptions {
1674
1674
double inlineSize = 0;
1675
1675
double blockSize = 0;
1676
+ double autoBlockSize = 0;
1676
1677
sequence<LayoutFragment> childFragments = [];
1677
1678
any data = null;
1678
1679
BreakTokenOptions breakToken = null;
@@ -1895,49 +1896,67 @@ following steps:
1895
1896
8. Let |layoutConstraints| be the result of <a>create a layout constraints object</a> given
1896
1897
|internalLayoutConstraints|, |box|, and |sizingMode|.
1897
1898
1898
- 8 . Let |styleMap| be a new {{StylePropertyMapReadOnly}} populated with <em> only</em> the
1899
+ 9 . Let |styleMap| be a new {{StylePropertyMapReadOnly}} populated with <em> only</em> the
1899
1900
<a>computed values</a> for properties listed in |inputProperties| for |box|.
1900
1901
1901
1902
Issue: We may want to store |styleMap| on |box| instead, similar to |layoutInstance|.
1902
1903
1903
- 9 . Let |breakToken| be a new {{BreakToken}} populated with the appropriate information from
1904
+ 10 . Let |breakToken| be a new {{BreakToken}} populated with the appropriate information from
1904
1905
|internalBreakToken|.
1905
1906
1906
1907
If |internalBreakToken| is null, let |breakToken| be null.
1907
1908
1908
- 10 . At this stage the user agent may re-use a <a>fragment</a> from a previous invocation if
1909
+ 11 . At this stage the user agent may re-use a <a>fragment</a> from a previous invocation if
1909
1910
|children|, |styleMap|, |layoutConstraints|, |breakToken| are equivalent to that previous
1910
1911
invocation. If so let the fragment output be that cached fragment and abort all these steps.
1911
1912
1912
- 11 . Let |layoutGeneratorFunction| be |definition|'s <a>layout generator function</a> .
1913
+ 12 . Let |layoutGeneratorFunction| be |definition|'s <a>layout generator function</a> .
1913
1914
1914
- 12 . Let |layoutGenerator| be the result of <a>Invoke</a> (|layoutGeneratorFunction|,
1915
+ 13 . Let |layoutGenerator| be the result of <a>Invoke</a> (|layoutGeneratorFunction|,
1915
1916
|layoutInstance|, «|children|, |edges|, |layoutConstraints|, |styleMap|, |breakToken|»).
1916
1917
1917
1918
If an exception is <a>thrown</a> the let |box| fallback to the <a>flow layout</a> and abort
1918
1919
all these steps.
1919
1920
1920
- 13 . Let |fragmentValue| be the result of <a>run a generator</a> given |layoutGenerator|, and
1921
+ 14 . Let |fragmentValue| be the result of <a>run a generator</a> given |layoutGenerator|, and
1921
1922
<code> "layout"</code> .
1922
1923
1923
1924
If <a>run a generator</a> returned failure, then let |box| fallback to the <a>flow
1924
1925
layout</a> and abort all these steps.
1925
1926
1926
- 14 . Let |fragment| be the result of <a>converting</a> |fragmentValue| to a
1927
+ 15 . Let |fragment| be the result of <a>converting</a> |fragmentValue| to a
1927
1928
{{FragmentResultOptions}} . If an exception is <a>thrown</a> , let |box| fallback to the
1928
1929
<a>flow layout</a> and abort all these steps.
1929
1930
1930
- 15 . <a for=list>For each</a> |childFragment| in |fragment|'s
1931
+ 16 . <a for=list>For each</a> |childFragment| in |fragment|'s
1931
1932
{{FragmentResultOptions/childFragments}} , perform the following stubsteps:
1932
1933
1933
1934
1. If |childFragment|'s {{[[generator]]}} internal slot is not equal to |layoutGenerator|,
1934
1935
then let |box| fallback to the <a>flow layout</a> and abort all these steps.
1935
1936
1936
- 16. Create a <a>fragment</a> for |box| with :
1937
+ 17. If |sizingMode| is <code> "block-like" </code> :
1937
1938
1938
- - The <a>inline size</a> set to |fragment|'s {{FragmentResultOptions/inlineSize}} .
1939
+ - Then:
1939
1940
1940
- - The <a>block size</a> set to |fragment|'s {{FragmentResultOptions/blockSize}} .
1941
+ 1. Let |inlineSize| be |layoutConstraints|' {{LayoutConstraints/fixedInlineSize}} . (This
1942
+ value must be set if we are using <code> "block-like"</code> sizing).
1943
+
1944
+ 2. Let |blockSize| be the result of calculating |box|'s <b> border-box</b>
1945
+ <a>block size</a> (relative to |box|'s writing mode) exactly like block containers
1946
+ do, given |fragment|'s {{FragmentResultOptions/autoBlockSize}} as the "intrinsic
1947
+ height".
1948
+
1949
+ - Otherwise (|sizingMode| is <code> "manual"</code> ):
1950
+
1951
+ 1. Let |inlineSize| be |fragment|'s {{FragmentResultOptions/inlineSize}} .
1952
+
1953
+ 2. Let |blockSize| be |fragment|'s {{FragmentResultOptions/blockSize}} .
1954
+
1955
+ 18. Return a <a>fragment</a> for |box| with:
1956
+
1957
+ - The <a>inline size</a> set to |inlineSize|.
1958
+
1959
+ - The <a>block size</a> set to |blockSize|.
1941
1960
1942
1961
- The child fragments set to |fragment|'s {{FragmentResultOptions/childFragments}}
1943
1962
<a>list</a> . The ordering <em> is</em> important as this dictates their paint order
0 commit comments