Skip to content

Commit 3bf22fe

Browse files
committed
Renamed 'property model' to 'contained properties map', properly type it with Infra types.
1 parent 297a681 commit 3bf22fe

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

css-typed-om/Overview.bs

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,15 @@ interface StylePropertyMap : StylePropertyMapReadOnly {
213213
};
214214
</pre>
215215

216-
A {{StylePropertyMapReadOnly}} object has an associated <dfn>property model</dfn>,
217-
which is a list of property - sequence&lt;{{CSSStyleValue}}> pairs. This list
218-
is initialized differently depending on where the {{CSSStyleValue}} is used
216+
A {{StylePropertyMapReadOnly}} object has an associated <dfn export for="StylePropertyMapReadonly, StylePropertyMap">contained properties map</dfn>,
217+
which is a [=map=] of property name ([=string=]) → values ([=list=] of {{CSSStyleValue}} objects) pairs.
218+
This list is initialized differently depending on where the {{CSSStyleValue}} is used
219219
(see
220220
[[#computed-stylepropertymapreadonly-objects]],
221221
[[#declared-stylepropertymap-objects]], and
222222
[[#inline-stylepropertymap-objects]]).
223223

224-
All properties stored on the [=property model=] in {{StylePropertyMapReadOnly}} are [=ASCII case-insensitive=].
224+
All properties stored on the [=contained properties map=] in {{StylePropertyMapReadOnly}} are [=ASCII case-insensitive=].
225225

226226
<div class='note'>
227227
The sequence of {{CSSStyleValue}}s associated with a property do
@@ -251,10 +251,10 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
251251
3. If |property| is not a [=list-valued property=],
252252
[=throw=] a {{TypeError}} and exit this algorithm.
253253

254-
4. If {{StylePropertyMap}}’s [=property model=] contains an entry for |property|,
254+
4. If {{StylePropertyMap}}’s [=contained properties map=] contains an entry for |property|,
255255
let |entry| be that entry.
256256
Otherwise, create a new entry for |property| with an empty list,
257-
add it to the [=property model=],
257+
add it to the [=contained properties map=],
258258
and let |entry| be the newly-created entry.
259259

260260
5. Let |values to append| be the empty list.
@@ -273,8 +273,8 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
273273
2. If |property| is not a [=supported property name=],
274274
[=throw=] a {{TypeError}} and exit this algorithm.
275275

276-
3. If {{StylePropertyMap}}’s [=property model=] contains an entry for |property|,
277-
remove that entry from the [=property model=].
276+
3. If {{StylePropertyMap}}’s [=contained properties map=] contains an entry for |property|,
277+
remove that entry from the [=contained properties map=].
278278
</div>
279279

280280
<div algorithm>
@@ -300,7 +300,7 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
300300
2. If |property| is not a [=supported property name=],
301301
[=throw=] a {{TypeError}} and exit this algorithm.
302302

303-
3. If {{StylePropertyMap}}’s [=property model=] contains an entry for |property|,
303+
3. If {{StylePropertyMap}}’s [=contained properties map=] contains an entry for |property|,
304304
return the first value found in that entry.
305305

306306
4. Else, return `null`.
@@ -315,7 +315,7 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
315315
2. If |property| is not a [=supported property name=],
316316
[=throw=] a {{TypeError}} and exit this algorithm.
317317

318-
3. If {{StylePropertyMap}}’s [=property model=] contains an entry for |property|:
318+
3. If {{StylePropertyMap}}’s [=contained properties map=] contains an entry for |property|:
319319

320320
1. If |property| is a [=list-valued property=],
321321
return the list of |values| assigned to that property.
@@ -341,15 +341,18 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
341341

342342

343343
<div algorithm>
344-
To <dfn>set a value on a StylePropertyMap</dfn>, run these steps:
344+
To <dfn>set a value on a StylePropertyMap</dfn>,
345+
given a [=string=] |property|
346+
and a [=list=] of {{CSSPropertyValue}} objects |value|,
347+
run these steps:
345348

346349
1. If |property| does not start with two dashes (U+002D HYPHEN),
347350
let |property| be |property| [=ASCII lowercased=].
348351

349352
2. If |property| is not a [=supported property name=],
350353
[=throw=] a {{TypeError}} and exit this algorithm.
351354

352-
3. If {{StylePropertyMap}}’s [=property model=] contains an entry for |property|,
355+
3. If {{StylePropertyMap}}’s [=contained properties map=] contains an entry for |property|,
353356
let |entry| be that entry.
354357
Otherwise, exit the algorithm.
355358

@@ -385,8 +388,8 @@ map set to the object this method was invoked on .
385388

386389
</div>
387390

388-
The <dfn method for=StylePropertyMap>getProperties()</dfn> method returns all of the properties listed in
389-
the [=property model=]. This list of properties is sorted in the following manner:
391+
The <dfn method for=StylePropertyMap>getProperties()</dfn> method returns all of the contained properties maped in
392+
the [=contained properties map=]. This list of properties is sorted in the following manner:
390393

391394
* normal properties are sorted alphabetically.
392395
* custom properties are sorted by increasing code point order.
@@ -413,7 +416,7 @@ partial interface Element {
413416
{{Element}} or pseudo element, and are accessed by calling the
414417
{{Element/computedStyleMap()}} method.
415418

416-
When constructed, the [=property model=] for [=computed StylePropertyMap=]
419+
When constructed, the [==] for [=computed StylePropertyMap=]
417420
objects is initialized to contain an entry for every valid CSS property supported by the User Agent.
418421

419422
Note: The StylePropertyMap returned by computedStyleMap represents computed style,
@@ -433,7 +436,7 @@ partial interface CSSStyleRule {
433436
in a style rule, and are accessed via the <dfn attribute for=CSSStyleRule>attributeStyleMap</dfn>
434437
attribute of {{CSSStyleRule}} objects.
435438

436-
When constructed, the [=property model=] for [=declared StylePropertyMap=]
439+
When constructed, the [=contained properties map=] for [=declared StylePropertyMap=]
437440
objects is initialized to contain
438441
an entry for each property that is paired with at least one valid value inside the
439442
{{CSSStyleRule}} that the object represents. The value for a given property is
@@ -453,7 +456,7 @@ partial interface Element {
453456
directly to {{Element}}s. They are accessed via the <dfn attribute for=Element>attributeStyleMap</dfn>
454457
attribute of {{Element}} objects.
455458

456-
When constructed, the [=property model=] for [=inline StylePropertyMap=] objects
459+
When constructed, the [=contained properties map=] for [=inline StylePropertyMap=] objects
457460
is initialized to contain an
458461
entry for each property that is paired with at least one valid value in the string
459462
representing the style attribute for the Element that the object is associated with.

0 commit comments

Comments
 (0)