@@ -2000,7 +2000,7 @@ The <code>CSSStyleRule</code> interface represents a style rule.
20002000[Exposed=Window]
20012001interface CSSStyleRule : CSSGroupingRule {
20022002 attribute CSSOMString selectorText;
2003- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
2003+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleProperties style;
20042004};
20052005</pre>
20062006
@@ -2013,11 +2013,13 @@ On setting the {{CSSStyleRule/selectorText}} attribute these steps must be run:
20132013 <li> Otherwise, if the algorithm returns a null value, do nothing.
20142014</ol>
20152015
2016- The <dfn attribute for=CSSStyleRule>style</dfn> attribute must return a <code> CSSStyleDeclaration </code> object for the style rule, with the
2016+ The <dfn attribute for=CSSStyleRule>style</dfn> attribute must return a <code> CSSStyleProperties </code> object for the style rule, with the
20172017following properties:
20182018<dl>
20192019 <dt> <a for="CSSStyleDeclaration">computed flag</a>
20202020 <dd> Unset.
2021+ <dt> <a for="CSSStyleDeclaration">readonly flag</a>
2022+ <dd> Unset.
20212023 <dt> <a for="CSSStyleDeclaration">declarations</a>
20222024 <dd> The declared declarations in the rule, in <a>specified order</a> .
20232025 <dt> <a for="CSSStyleDeclaration">parent CSS rule</a>
@@ -2106,14 +2108,30 @@ Issue: Need to define the rules for
21062108<dfn export>serialize a list of CSS page selectors</dfn> .
21072109
21082110<pre class=idl>
2111+ [Exposed=Window]
2112+ interface CSSPageDescriptors : CSSStyleDeclaration {
2113+ attribute [LegacyNullToEmptyString] CSSOMString margin;
2114+ attribute [LegacyNullToEmptyString] CSSOMString marginTop;
2115+ attribute [LegacyNullToEmptyString] CSSOMString marginRight;
2116+ attribute [LegacyNullToEmptyString] CSSOMString marginBottom;
2117+ attribute [LegacyNullToEmptyString] CSSOMString marginLeft;
2118+ attribute [LegacyNullToEmptyString] CSSOMString margin-top;
2119+ attribute [LegacyNullToEmptyString] CSSOMString margin-right;
2120+ attribute [LegacyNullToEmptyString] CSSOMString margin-bottom;
2121+ attribute [LegacyNullToEmptyString] CSSOMString margin-left;
2122+ attribute [LegacyNullToEmptyString] CSSOMString size;
2123+ attribute [LegacyNullToEmptyString] CSSOMString marks;
2124+ attribute [LegacyNullToEmptyString] CSSOMString bleed;
2125+ };
2126+
21092127[Exposed=Window]
21102128interface CSSPageRule : CSSGroupingRule {
21112129 attribute CSSOMString selectorText;
2112- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
2130+ [SameObject, PutForwards=cssText] readonly attribute CSSPageDescriptors style;
21132131};
21142132</pre>
21152133
2116- The <dfn attribute for=CSSGroupingRule >selectorText</dfn> attribute, on getting, must return the result of
2134+ The <dfn attribute for=CSSPageRule >selectorText</dfn> attribute, on getting, must return the result of
21172135<a lt="serialize a list of CSS page selectors">serializing</a> the associated <a>list of CSS page selectors</a> .
21182136On setting the {{CSSPageRule/selectorText}} attribute these steps must be run:
21192137<ol>
@@ -2122,13 +2140,15 @@ On setting the {{CSSPageRule/selectorText}} attribute these steps must be run:
21222140 <li> Otherwise, if the algorithm returns a null value, do nothing.
21232141</ol>
21242142
2125- The <dfn attribute for=CSSGroupingRule >style</dfn> attribute must return a <code> CSSStyleDeclaration </code> object for the
2143+ The <dfn attribute for=CSSPageRule >style</dfn> attribute must return a <code> CSSPageDescriptors </code> object for the
21262144<code> @page</code> at-rule, with the following properties:
21272145<dl>
21282146 <dt> <a for="CSSStyleDeclaration">computed flag</a>
21292147 <dd> Unset.
2148+ <dt> <a for="CSSStyleDeclaration">readonly flag</a>
2149+ <dd> Unset.
21302150 <dt> <a for="CSSStyleDeclaration">declarations</a>
2131- <dd> The declared declarations in the rule, in <a>specified order</a> .
2151+ <dd> The declared descriptors in the rule, in <a>specified order</a> .
21322152 <dt> <a for="CSSStyleDeclaration">parent CSS rule</a>
21332153 <dd> The <a>context object</a> .
21342154 <dt> <a for="CSSStyleDeclaration">owner node</a>
@@ -2145,18 +2165,20 @@ The <code>CSSMarginRule</code> interface represents a margin at-rule (e.g. <code
21452165[Exposed=Window]
21462166interface CSSMarginRule : CSSRule {
21472167 readonly attribute CSSOMString name;
2148- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
2168+ [SameObject, PutForwards=cssText] readonly attribute CSSMarginDescriptors style;
21492169};
21502170</pre>
21512171
21522172The <dfn attribute for=CSSMarginRule>name</dfn> attribute must return the name of the margin at-rule. The <code> @</code> character is not
21532173included in the name. [[!CSS3SYN]]
21542174
2155- The <dfn attribute for=CSSMarginRule>style</dfn> attribute must return a <code> CSSStyleDeclaration </code> object for the
2175+ The <dfn attribute for=CSSMarginRule>style</dfn> attribute must return a <code> CSSMarginDescriptors </code> object for the
21562176margin at-rule, with the following properties:
21572177<dl>
21582178 <dt> <a for="CSSStyleDeclaration">computed flag</a>
21592179 <dd> Unset.
2180+ <dt> <a for="CSSStyleDeclaration">readonly flag</a>
2181+ <dd> Unset.
21602182 <dt> <a for="CSSStyleDeclaration">declarations</a>
21612183 <dd> The declared declarations in the rule, in <a>specified order</a> .
21622184 <dt> <a for="CSSStyleDeclaration">parent CSS rule</a>
@@ -2217,6 +2239,9 @@ the DOM a <a>CSS declaration block</a> is a
22172239 <dd> Set if the object is a computed style declaration, rather than a specified
22182240 style. Unless otherwise stated it is unset.
22192241
2242+ <dt> <dfn>readonly flag</dfn>
2243+ <dd> Set if the object is not modifiable.</dd>
2244+
22202245 <dt> <dfn>declarations</dfn>
22212246 <dd> The <a>CSS declarations</a> associated with the object.
22222247
@@ -2373,6 +2398,10 @@ interface CSSStyleDeclaration {
23732398 [CEReactions] undefined setProperty(CSSOMString property, [LegacyNullToEmptyString] CSSOMString value, optional [LegacyNullToEmptyString] CSSOMString priority = "");
23742399 [CEReactions] CSSOMString removeProperty(CSSOMString property);
23752400 readonly attribute CSSRule? parentRule;
2401+ };
2402+
2403+ [Exposed=Window]
2404+ interface CSSStyleProperties : CSSStyleDeclaration {
23762405 [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString cssFloat;
23772406};
23782407</pre>
@@ -2388,7 +2417,7 @@ Getting the <dfn attribute for="CSSStyleDeclaration">cssText</dfn> attribute mus
23882417
23892418Setting the {{CSSStyleDeclaration/cssText}} attribute must run these steps:
23902419<ol>
2391- <li> If the <a for="CSSStyleDeclaration">computed flag</a> is set,
2420+ <li> If the <a for="CSSStyleDeclaration">readonly flag</a> is set,
23922421 then <a>throw</a> a {{NoModificationAllowedError}} exception.
23932422 <li> Empty the <a for="CSSStyleDeclaration">declarations</a> .
23942423 <li> <a lt="Parse a CSS declaration block">Parse</a> the given value and, if the return value is not the empty list, insert the items in the list
@@ -2454,7 +2483,7 @@ value would be "<code>important</code>".</div>
24542483
24552484The <dfn method for=CSSStyleDeclaration>setProperty(<var>property</var>, <var>value</var>, <var>priority</var>)</dfn> method must run these steps:
24562485<ol>
2457- <li> If the <a for="CSSStyleDeclaration">computed flag</a> is set,
2486+ <li> If the <a for="CSSStyleDeclaration">readonly flag</a> is set,
24582487 then <a>throw</a> a {{NoModificationAllowedError}} exception.
24592488 <li> If <var> property</var> is not a <a>custom property</a> , follow these substeps:
24602489 <ol>
@@ -2569,7 +2598,7 @@ use different algorithms as long as the constraints above hold.
25692598
25702599The <dfn method for=CSSStyleDeclaration>removeProperty(<var>property</var>)</dfn> method must run these steps:
25712600<ol>
2572- <li> If the <a for="CSSStyleDeclaration">computed flag</a> is set,
2601+ <li> If the <a for="CSSStyleDeclaration">readonly flag</a> is set,
25732602 then <a>throw</a> a {{NoModificationAllowedError}} exception.
25742603 <li> If <var> property</var> is not a <a>custom property</a> ,
25752604 let <var> property</var> be <var> property</var> <a lt="ASCII lowercase">converted to ASCII lowercase</a> .
@@ -2592,7 +2621,7 @@ The <dfn method for=CSSStyleDeclaration>removeProperty(<var>property</var>)</dfn
25922621The <dfn attribute for=CSSStyleDeclaration>parentRule</dfn> attribute must return the
25932622<a for="CSSStyleDeclaration">parent CSS rule</a> .
25942623
2595- The <dfn attribute for=CSSStyleDeclaration >cssFloat</dfn>
2624+ The <dfn attribute for=CSSStyleProperties >cssFloat</dfn>
25962625attribute, on getting, must return the result of invoking
25972626{{CSSStyleDeclaration/getPropertyValue()}} with
25982627<code> float</code> as argument. On setting, the attribute must invoke
@@ -2606,17 +2635,17 @@ is obtained by running the <a>CSS property to IDL attribute</a> algorithm for
26062635<var> property</var> .
26072636
26082637<pre class="idl extract">
2609- partial interface CSSStyleDeclaration {
2638+ partial interface CSSStyleProperties {
26102639 [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString _<var> camel_cased_attribute</var> ;
26112640};
26122641</pre>
26132642
2614- The <a attribute for=CSSStyleDeclaration ><var>camel-cased attribute</var></a> attribute, on getting, must return the
2643+ The <a attribute for=CSSStyleProperties ><var>camel-cased attribute</var></a> attribute, on getting, must return the
26152644result of invoking {{CSSStyleDeclaration/getPropertyValue()}} with the
26162645argument being the result of running the <a>IDL attribute to CSS property</a>
26172646algorithm for <var> camel-cased attribute</var> .
26182647
2619- Setting the <a attribute for=CSSStyleDeclaration ><var>camel-cased attribute</var></a> attribute must invoke
2648+ Setting the <a attribute for=CSSStyleProperties ><var>camel-cased attribute</var></a> attribute must invoke
26202649{{CSSStyleDeclaration/setProperty()}} with the
26212650first argument being the result of running the <a>IDL attribute to CSS property</a>
26222651algorithm for <var> camel-cased attribute</var> , as second argument the given value, and no third argument. Any
@@ -2630,12 +2659,12 @@ with the string <code>-webkit-</code>, the following partial interface applies w
26302659algorithm for <var> property</var> , with the <i> lowercase first</i> flag set.
26312660
26322661<pre class="idl extract">
2633- partial interface CSSStyleDeclaration {
2662+ partial interface CSSStyleProperties {
26342663 [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString _<var> webkit_cased_attribute</var> ;
26352664};
26362665</pre>
26372666
2638- The <dfn attribute for=CSSStyleDeclaration ><var>webkit-cased attribute</var></dfn> attribute, on
2667+ The <dfn attribute for=CSSStyleProperties ><var>webkit-cased attribute</var></dfn> attribute, on
26392668getting, must return the result of invoking {{CSSStyleDeclaration/getPropertyValue()}} with the
26402669argument being the result of running the <a>IDL attribute to CSS property</a> algorithm for
26412670<var> webkit-cased attribute</var> , with the <i> dash prefix</i> flag set.
@@ -2655,16 +2684,16 @@ except for properties that have no "<code>-</code>" (U+002D) in the property nam
26552684the following partial interface applies where <var> dashed attribute</var> is <var> property</var> .
26562685
26572686<pre class="idl extract">
2658- partial interface CSSStyleDeclaration {
2687+ partial interface CSSStyleProperties {
26592688 [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString _<var> dashed_attribute</var> ;
26602689};
26612690</pre>
26622691
2663- The <dfn attribute for=CSSStyleDeclaration ><var>dashed attribute</var></dfn> attribute, on getting, must return the
2692+ The <dfn attribute for=CSSStyleProperties ><var>dashed attribute</var></dfn> attribute, on getting, must return the
26642693result of invoking {{CSSStyleDeclaration/getPropertyValue()}} with the
26652694argument being <var> dashed attribute</var> .
26662695
2667- Setting the <a attribute for=CSSStyleDeclaration ><var>dashed attribute</var></a> attribute must invoke
2696+ Setting the <a attribute for=CSSStyleProperties ><var>dashed attribute</var></a> attribute must invoke
26682697{{CSSStyleDeclaration/setProperty()}} with the
26692698first argument being <var> dashed attribute</var> , as second argument the given value, and no third argument. Any
26702699exceptions thrown must be re-thrown.
@@ -2976,7 +3005,7 @@ interface mixin ElementCSSInlineStyle {
29763005</pre>
29773006
29783007The <dfn attribute for=ElementCSSInlineStyle>style</dfn> attribute must return a <a>CSS declaration block</a> object whose
2979- <a for="CSSStyleDeclaration">computed flag</a> is unset, whose <a for="CSSStyleDeclaration">parent CSS rule</a> is null, and
3008+ <a for="CSSStyleDeclaration">readonly flag</a> is unset, whose <a for="CSSStyleDeclaration">parent CSS rule</a> is null, and
29803009whose <a for="CSSStyleDeclaration">owner node</a> is the <a>context object</a> .
29813010
29823011If the user agent supports HTML, the following IDL applies: [[HTML]]
@@ -3043,18 +3072,19 @@ steps:
30433072 <a href="https://github.com/w3c/csswg-drafts/issues/4947">#4947</a> .
30443073
30453074 <li>
3046- Return a live <a>CSS declaration block </a> with the following properties:
3075+ Return a live <a>CSSStyleProperties </a> object with the following properties:
30473076 <dl>
30483077 <dt> <a for="CSSStyleDeclaration">computed flag</a>
30493078 <dd> Set.
3079+ <dt> <a for="CSSStyleDeclaration">readonly flag</a>
3080+ <dd> Set.
30503081 <dt> <a for="CSSStyleDeclaration">declarations</a>
30513082 <dd><var> decls</var> .
30523083 <dt> <a for="CSSStyleDeclaration">parent CSS rule</a>
30533084 <dd> Null.
30543085 <dt> <a for="CSSStyleDeclaration">owner node</a>
30553086 <dd><var> obj</var> .
30563087 </dl>
3057-
30583088</ol>
30593089
30603090<p class=warning> The {{Window/getComputedStyle()}} method exposes information from <a lt="CSS style sheet">CSS style
0 commit comments