Skip to content

Commit 4e21469

Browse files
committed
[css-layout-api] Modify produce a generator result algorithm to work on boxes.
1 parent 9522644 commit 4e21469

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

css-layout-api/Overview.bs

+18-14
Original file line numberDiff line numberDiff line change
@@ -846,8 +846,6 @@ A subsequent {{LayoutFragment}} is produced by using the previous {{LayoutFragme
846846
{{LayoutFragment/breakToken}}. This tells the <a>child layout</a> to produce a {{LayoutFragment}}
847847
starting at the point encoded in the {{ChildBreakToken}}.
848848

849-
Issue: Explain resuming the author defined layout.
850-
851849
<div class="example">
852850
This example shows a simple layout which indents child fragments for a certain number of
853851
lines.
@@ -2128,16 +2126,19 @@ When the user agent wants to <dfn>produce a generator result</dfn> given |reques
21282126
1. Let |layoutChild| be the result of looking up the internal slot
21292127
{{IntrinsicSizesRequest/[[layoutChild]]}} on |request|.
21302128

2131-
2. If |layoutChild| is <em>not</em> attached to the <a>box tree</a>, return failure and
2132-
abort all these steps.
2129+
2. Let |box| be the result of looking up the internal slot {{LayoutChild/[[box]]}} on
2130+
|layoutChild|.
2131+
2132+
3. If |box| is <em>not</em> attached to the <a>box tree</a>, return failure and abort all
2133+
these steps.
21332134

21342135
Note: The author may hold onto a {{LayoutChild}} from a previous invocation. It is
21352136
assumed that a box is only ever attached to the box-tree once, and not re-used.
21362137

2137-
3. Let |internalIntrinsicSizes| be the result of the user agent calculating the <b>border
2138-
box</b> min/max content contribution of |layoutChild|.
2138+
4. Let |internalIntrinsicSizes| be the result of the user agent calculating the <b>border
2139+
box</b> min/max content contribution of |box|.
21392140

2140-
4. Return the result of <a>create an intrinsic sizes object</a> given |request|, and
2141+
5. Return the result of <a>create an intrinsic sizes object</a> given |request|, and
21412142
|internalIntrinsicSizes|.
21422143

21432144
2. If |request| is a {{LayoutFragmentRequest}} and |generatorType| is <code>"layout"</code>
@@ -2146,22 +2147,25 @@ When the user agent wants to <dfn>produce a generator result</dfn> given |reques
21462147
1. Let |layoutChild| be result of looking up the internal slot
21472148
{{LayoutFragmentRequest/[[layoutChild]]}} on |request|.
21482149

2149-
2. If |layoutChild| is <em>not</em> attached to the <a>box tree</a>, return failure and
2150-
abort all these steps.
2150+
2. Let |box| be the result of looking up the internal slot {{LayoutChild/[[box]]}} on
2151+
|layoutChild|.
2152+
2153+
3. If |box| is <em>not</em> attached to the <a>box tree</a>, return failure and abort all
2154+
these steps.
21512155

21522156
Note: The author may hold onto a {{LayoutChild}} from a previous invocation. It is
21532157
assumed that a box is only ever attached to the box-tree once, and not re-used.
21542158

2155-
3. Let |childLayoutConstraints| be the result of looking up the internal slot
2159+
4. Let |childLayoutConstraints| be the result of looking up the internal slot
21562160
{{LayoutFragmentRequest/[[layoutConstraints]]}} on |request|.
21572161

2158-
4. Let |childBreakToken| be the result of looking up the internal slot
2162+
5. Let |childBreakToken| be the result of looking up the internal slot
21592163
{{LayoutFragmentRequest/[[breakToken]]}} on |request|.
21602164

2161-
5. Let |internalFragment| be the result of the user agent producing a <a>fragment</a> based
2162-
on |layoutChild|, |childLayoutConstraints|, and |childBreakToken|.
2165+
6. Let |internalFragment| be the result of the user agent producing a <a>fragment</a> based
2166+
on |box|, |childLayoutConstraints|, and |childBreakToken|.
21632167

2164-
6. Return the result of <a>create a layout fragment</a> given |generator|, |request|, and
2168+
7. Return the result of <a>create a layout fragment</a> given |generator|, |request|, and
21652169
|internalFragment|.
21662170

21672171
3. Return failure (neither of the above branches was taken).

0 commit comments

Comments
 (0)