Skip to content

Commit 8d1c838

Browse files
committed
[css-layout-api] Remove layout invalidation section.
1 parent 20ae3df commit 8d1c838

File tree

1 file changed

+8
-99
lines changed

1 file changed

+8
-99
lines changed

css-layout-api/Overview.bs

+8-99
Original file line numberDiff line numberDiff line change
@@ -1502,83 +1502,6 @@ Layout {#layout}
15021502

15031503
This section describes how the CSS Layout API interacts with the user agent's layout engine.
15041504

1505-
Layout Invalidation {#layout-invalidation}
1506-
------------------------------------------
1507-
1508-
Each <a>box</a> has an associated <dfn>layout valid flag</dfn>. It may be either
1509-
<dfn>layout-valid</dfn> or <dfn>layout-invalid</dfn>. It is initially set to <a>layout-invalid</a>.
1510-
1511-
Each <a>box</a> has an associated <dfn>intrinsic sizes valid flag</dfn>. If may be either
1512-
<dfn>intrinsic-sizes-valid</dfn> or <dfn>intrinsic-sizes-invalid</dfn>. It is initially set to
1513-
<a>intrinsic-sizes-invalid</a>.
1514-
1515-
<div algorithm>
1516-
When the user agent wants to <dfn>invalidate layout functions</dfn> given |box|, the user agent
1517-
<em>must</em> run the following steps:
1518-
1519-
1. Let |layoutFunction| be the ''layout()'' function of the 'display' property on the computed
1520-
style for the |box| if it exists. If it is a different type of value (e.g. ''grid'') then
1521-
abort all these steps.
1522-
1523-
2. Let |name| be the first argument of the |layoutFunction|.
1524-
1525-
3. Let |documentDefinition| be the result of <a>get a document layout definition</a> given
1526-
|name|.
1527-
1528-
If <a>get a document layout definition</a> returned failure, or if |documentDefinition| is
1529-
<code>"invalid"</code>, then abort all these steps.
1530-
1531-
4. Let |inputProperties| be |documentDefinition|'s <a for="document layout definition">input
1532-
properties</a>.
1533-
1534-
5. Let |childInputProperties| be |documentDefinition|'s <a for="document layout
1535-
definition">child input properties</a>.
1536-
1537-
6. For each |property| in |inputProperties|, if the |property|'s <a>computed value</a> has
1538-
changed, set the <a>layout valid flag</a> on the <a>box</a> to <a>layout-invalid</a>, and
1539-
set the <a>intrinsic sizes valid flag</a> to <a>intrinsic-sizes-invalid</a>.
1540-
1541-
7. For each |property| in |childInputProperties|, if the |property|'s <a>computed value</a> has
1542-
changed, set the <a>layout valid flag</a> on the <a>box</a> to <a>layout-invalid</a>, and
1543-
set the <a>intrinsic sizes valid flag</a> to <a>intrinsic-sizes-invalid</a>.
1544-
</div>
1545-
1546-
<a>Invalidate layout functions</a> <em>must</em> be run when the user agent recalculates the computed
1547-
style for a box, or when the children's computed style of that box is recalculated.
1548-
1549-
When a child <a>box</a> represented by a {{LayoutChild}} is added or removed from the <a>box
1550-
tree</a> or has its layout invalidated (from a computed style change, or a descendant change),
1551-
<em>and</em> this invalidation is to be propagated up the box tree, set the <a>layout valid flag</a>
1552-
on the current <a>box</a> to <a>layout-invalid</a> and set the <a>intrinsic sizes valid flag</a> on
1553-
the current <a>box</a> to <a>intrinsic-sizes-invalid</a>.
1554-
1555-
When the computed style of a <a>layout API container</a> changes, <em>and</em> this change effects
1556-
the values inside the {{LayoutEdges}} object, set the <a>layout valid flag</a> of the box to
1557-
<a>layout-invalid</a>, and set the <a>intrinsic sizes valid flag</a> of the box to
1558-
<a>intrinsic-sizes-invalid</a>.
1559-
1560-
If the computed style changes effects the values inside the {{LayoutConstraints}} object, just set
1561-
the <a>intrinsic sizes valid flag</a> of the box to <a>intrinsic-sizes-invalid</a>.
1562-
1563-
Note: As the {{LayoutConstraints}} object is only passed into the layout function there is no need
1564-
to invalidate the intrinsic sizes.
1565-
1566-
<div class="note">
1567-
Note: As an example the following properties could change the {{LayoutEdges}} object:
1568-
- 'padding-top'
1569-
- 'border-left-width'
1570-
- 'overflow-y'
1571-
1572-
And the following properties could change the {{LayoutConstraints}} object:
1573-
- 'width'
1574-
- 'max-width'
1575-
- 'height'
1576-
</div>
1577-
1578-
Note: This only describes layout invalidation as it relates to the CSS Layout API. All
1579-
<a>boxes</a> conceptually have a <a>layout valid flag</a> and these changes are propagated
1580-
through the <a>box tree</a>.
1581-
15821505
Performing Layout {#performing-layout}
15831506
--------------------------------------
15841507

@@ -1614,24 +1537,16 @@ context</a> for a given |box|, |childBoxes| it <em>must</em> run the following s
16141537
1. Let |layoutFunction| be the ''layout()'' for the <a>computed value</a> of <<display-inside>>
16151538
for |box|.
16161539

1617-
2. If the <a>intrinsic sizes valid flag</a> for the |layoutFunction| is
1618-
<a>intrinsic-sizes-valid</a> the user agent <em>may</em> use the intrinsic sizes from the
1619-
previous invocation. If so it <em>may</em> abort all these steps and use the previous value
1620-
for the intrinsic sizes.
1621-
1622-
3. Set the <a>intrinsic sizes valid flag</a> for the |layoutFunction| to
1623-
<a>intrinsic-sizes-valid</a>.
1624-
1625-
4. Let |name| be the first argument of the |layoutFunction|.
1540+
2. Let |name| be the first argument of the |layoutFunction|.
16261541

1627-
5. Let |documentDefinition| be the result of <a>get a document layout definition</a> given
1542+
3. Let |documentDefinition| be the result of <a>get a document layout definition</a> given
16281543
|name|.
16291544

16301545
If <a>get a document layout definition</a> returned failure, or if |documentDefinition| is
16311546
<code>"invalid"</code>, then let |box| fallback to the <a>flow layout</a> and abort all
16321547
these steps.
16331548

1634-
6. Let |workletGlobalScope| be a {{LayoutWorkletGlobalScope}} from the list of <a>worklet's
1549+
4. Let |workletGlobalScope| be a {{LayoutWorkletGlobalScope}} from the list of <a>worklet's
16351550
WorkletGlobalScopes</a> from the layout {{Worklet}}.
16361551

16371552
The user agent <em>must</em> have, and select from at least two
@@ -1644,7 +1559,7 @@ context</a> for a given |box|, |childBoxes| it <em>must</em> run the following s
16441559
The user agent <em>may</em> also <a>create a WorkletGlobalScope</a> at this time, given the
16451560
layout {{Worklet}}.
16461561

1647-
7. Run <a>invoke a intrinsic sizes callback</a> given |name|, |box|, |childBoxes|, and
1562+
5. Run <a>invoke a intrinsic sizes callback</a> given |name|, |box|, |childBoxes|, and
16481563
|workletGlobalScope| optionally <a>in parallel</a>.
16491564

16501565
Note: If the user agent runs <a>invoke a intrinsic sizes callback</a> on a thread <a>in
@@ -1735,22 +1650,16 @@ context</a> for a given |box|, |childBoxes|, |internalLayoutConstraints|, and an
17351650
1. Let |layoutFunction| be the ''layout()'' for the <a>computed value</a> of <<display-inside>>
17361651
for |box|.
17371652

1738-
2. If the <a>layout valid flag</a> for the |layoutFunction| is <a>layout-valid</a> the user
1739-
agent <em>may</em> use the intrinsic sizes from the previous invocation. If so it
1740-
<em>may</em> abort all these steps and use the previous value for the intrinsic sizes.
1741-
1742-
3. Set the <a>layout valid flag</a> for the |layoutFunction| to <a>layout-valid</a>.
1743-
1744-
4. Let |name| be the first argument of the |layoutFunction|.
1653+
2. Let |name| be the first argument of the |layoutFunction|.
17451654

1746-
5. Let |documentDefinition| be the result of <a>get a document layout definition</a> given
1655+
3. Let |documentDefinition| be the result of <a>get a document layout definition</a> given
17471656
|name|.
17481657

17491658
If <a>get a document layout definition</a> returned failure, or if |documentDefinition| is
17501659
<code>"invalid"</code>, then let |box| fallback to the <a>flow layout</a> and abort all
17511660
these steps.
17521661

1753-
6. Let |workletGlobalScope| be a {{LayoutWorkletGlobalScope}} from the list of <a>worklet's
1662+
4. Let |workletGlobalScope| be a {{LayoutWorkletGlobalScope}} from the list of <a>worklet's
17541663
WorkletGlobalScopes</a> from the layout {{Worklet}}.
17551664

17561665
The user agent <em>must</em> have, and select from at least two
@@ -1763,7 +1672,7 @@ context</a> for a given |box|, |childBoxes|, |internalLayoutConstraints|, and an
17631672
The user agent <em>may</em> also <a>create a WorkletGlobalScope</a> at this time, given the
17641673
layout {{Worklet}}.
17651674

1766-
7. Run <a>invoke a layout callback</a> given |name|, |box|, |childBoxes|,
1675+
5. Run <a>invoke a layout callback</a> given |name|, |box|, |childBoxes|,
17671676
|internalLayoutConstraints|, |internalBreakToken|, and |workletGlobalScope| optionally <a>in
17681677
parallel</a>.
17691678

0 commit comments

Comments
 (0)