@@ -304,6 +304,24 @@ Each [=box=] representing a [=layout API container=] has a [=map=] of <dfn>layou
304
304
instances</dfn> . Initially this map is empty; it is populated when the user agent calls either
305
305
[=determine the intrinsic sizes=] or [=generate a fragment=] for a [=box=] .
306
306
307
+ Each [=box=] representing a [=layout API container=] has a <dfn>styleMap</dfn> internal slot.
308
+ This is a {{StylePropertyMapReadOnly}} which contains the properties listed in
309
+ <code> inputProperties</code> .
310
+
311
+ The user agent <em> clear</em> the [=styleMap=] internal slot for a [=box=] when:
312
+
313
+ - The [=computed values=] of [=document layout definition/input properties=] for the [=box=]
314
+ changes.
315
+
316
+ - When the [=box=] is removed from the [=box tree=] .
317
+
318
+ - Every 1000 layout passes.
319
+
320
+ Note: The above rule exists to ensure that web developers do not rely on being able to store
321
+ non-regeneratable state on the {{StylePropertyMapReadOnly}} object.
322
+ The 1000 limit was picked as a high upper bound, this limit may improve (downwards) over
323
+ time.
324
+
307
325
<div class='note'>
308
326
Note: The shape of the class should be:
309
327
<pre class='lang-javascript'>
@@ -742,9 +760,8 @@ When a [=box=] is removed from the [=box tree=] the user agent <em>must</em> cle
742
760
The user agent <em> must</em> clear the {{[[layoutChildMap]]}} internal slot every 1000 layout
743
761
passes.
744
762
745
- Note: The above rule exists to ensure that web developers do not rely on being about to store
763
+ Note: The above rule exists to ensure that web developers do not rely on being able to store
746
764
non-regeneratable state on the {{LayoutChild}} object.
747
-
748
765
The 1000 limit was picked as a high upper bound, this limit may improve (downwards) over time.
749
766
750
767
<div algorithm="update a layout child style">
@@ -764,8 +781,8 @@ run the following steps:
764
781
1. |layoutChild|'s {{[[styleMap]]}} to null.
765
782
</div>
766
783
767
- When the computed style of a [=box=] changes the user agent must run the [=update a layout child
768
- style=] algorithm.
784
+ When the [= computed values=] of [=document layout definition/child input properties=] for a [=box=]
785
+ changes the user agent must run the [=update a layout child style=] algorithm.
769
786
770
787
Layout Fragments {#layout-fragments}
771
788
------------------------------------
@@ -2100,12 +2117,14 @@ When the user agent wants to <dfn>get a layout class instance</dfn> given |box|,
2100
2117
When the user agent wants to <dfn>get a style map</dfn> given |box|, and |inputProperties|, it
2101
2118
<em> must</em> run the following steps:
2102
2119
2103
- 1. Let |styleMap| be a new {{StylePropertyMapReadOnly}} populated with <em> only</em> the
2104
- [=computed values=] for properties listed in |inputProperties| for |box|.
2120
+ 1. If |box|'s [=styleMap=] is null, then:
2121
+
2122
+ 1. Let |styleMap| be a new {{StylePropertyMapReadOnly}} populated with <em> only</em> the
2123
+ [=computed values=] for properties listed in |inputProperties| for |box|.
2105
2124
2106
- 2. Return |styleMap|.
2125
+ 2. Set |box|'s [=styleMap=] internal slot to |styleMap|.
2107
2126
2108
- Issue: We may want to store | styleMap| on |box| instead .
2127
+ 2. Return |box|'s {{StylePropertyMapReadOnly}} contained in the [= styleMap=] internal slot .
2109
2128
2110
2129
</div>
2111
2130
0 commit comments