@@ -2000,7 +2000,7 @@ The <code>CSSStyleRule</code> interface represents a style rule.
2000
2000
[Exposed=Window]
2001
2001
interface CSSStyleRule : CSSGroupingRule {
2002
2002
attribute CSSOMString selectorText;
2003
- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
2003
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleProperties style;
2004
2004
};
2005
2005
</pre>
2006
2006
@@ -2013,11 +2013,13 @@ On setting the {{CSSStyleRule/selectorText}} attribute these steps must be run:
2013
2013
<li> Otherwise, if the algorithm returns a null value, do nothing.
2014
2014
</ol>
2015
2015
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
2017
2017
following properties:
2018
2018
<dl>
2019
2019
<dt> <a for="CSSStyleDeclaration">computed flag</a>
2020
2020
<dd> Unset.
2021
+ <dt> <a for="CSSStyleDeclaration">readonly flag</a>
2022
+ <dd> Unset.
2021
2023
<dt> <a for="CSSStyleDeclaration">declarations</a>
2022
2024
<dd> The declared declarations in the rule, in <a>specified order</a> .
2023
2025
<dt> <a for="CSSStyleDeclaration">parent CSS rule</a>
@@ -2106,14 +2108,30 @@ Issue: Need to define the rules for
2106
2108
<dfn export>serialize a list of CSS page selectors</dfn> .
2107
2109
2108
2110
<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
+
2109
2127
[Exposed=Window]
2110
2128
interface CSSPageRule : CSSGroupingRule {
2111
2129
attribute CSSOMString selectorText;
2112
- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
2130
+ [SameObject, PutForwards=cssText] readonly attribute CSSPageDescriptors style;
2113
2131
};
2114
2132
</pre>
2115
2133
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
2117
2135
<a lt="serialize a list of CSS page selectors">serializing</a> the associated <a>list of CSS page selectors</a> .
2118
2136
On setting the {{CSSPageRule/selectorText}} attribute these steps must be run:
2119
2137
<ol>
@@ -2122,13 +2140,15 @@ On setting the {{CSSPageRule/selectorText}} attribute these steps must be run:
2122
2140
<li> Otherwise, if the algorithm returns a null value, do nothing.
2123
2141
</ol>
2124
2142
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
2126
2144
<code> @page</code> at-rule, with the following properties:
2127
2145
<dl>
2128
2146
<dt> <a for="CSSStyleDeclaration">computed flag</a>
2129
2147
<dd> Unset.
2148
+ <dt> <a for="CSSStyleDeclaration">readonly flag</a>
2149
+ <dd> Unset.
2130
2150
<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> .
2132
2152
<dt> <a for="CSSStyleDeclaration">parent CSS rule</a>
2133
2153
<dd> The <a>context object</a> .
2134
2154
<dt> <a for="CSSStyleDeclaration">owner node</a>
@@ -2145,18 +2165,20 @@ The <code>CSSMarginRule</code> interface represents a margin at-rule (e.g. <code
2145
2165
[Exposed=Window]
2146
2166
interface CSSMarginRule : CSSRule {
2147
2167
readonly attribute CSSOMString name;
2148
- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
2168
+ [SameObject, PutForwards=cssText] readonly attribute CSSMarginDescriptors style;
2149
2169
};
2150
2170
</pre>
2151
2171
2152
2172
The <dfn attribute for=CSSMarginRule>name</dfn> attribute must return the name of the margin at-rule. The <code> @</code> character is not
2153
2173
included in the name. [[!CSS3SYN]]
2154
2174
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
2156
2176
margin at-rule, with the following properties:
2157
2177
<dl>
2158
2178
<dt> <a for="CSSStyleDeclaration">computed flag</a>
2159
2179
<dd> Unset.
2180
+ <dt> <a for="CSSStyleDeclaration">readonly flag</a>
2181
+ <dd> Unset.
2160
2182
<dt> <a for="CSSStyleDeclaration">declarations</a>
2161
2183
<dd> The declared declarations in the rule, in <a>specified order</a> .
2162
2184
<dt> <a for="CSSStyleDeclaration">parent CSS rule</a>
@@ -2217,6 +2239,9 @@ the DOM a <a>CSS declaration block</a> is a
2217
2239
<dd> Set if the object is a computed style declaration, rather than a specified
2218
2240
style. Unless otherwise stated it is unset.
2219
2241
2242
+ <dt> <dfn>readonly flag</dfn>
2243
+ <dd> Set if the object is not modifiable.</dd>
2244
+
2220
2245
<dt> <dfn>declarations</dfn>
2221
2246
<dd> The <a>CSS declarations</a> associated with the object.
2222
2247
@@ -2373,6 +2398,10 @@ interface CSSStyleDeclaration {
2373
2398
[CEReactions] undefined setProperty(CSSOMString property, [LegacyNullToEmptyString] CSSOMString value, optional [LegacyNullToEmptyString] CSSOMString priority = "");
2374
2399
[CEReactions] CSSOMString removeProperty(CSSOMString property);
2375
2400
readonly attribute CSSRule? parentRule;
2401
+ };
2402
+
2403
+ [Exposed=Window]
2404
+ interface CSSStyleProperties : CSSStyleDeclaration {
2376
2405
[CEReactions] attribute [LegacyNullToEmptyString] CSSOMString cssFloat;
2377
2406
};
2378
2407
</pre>
@@ -2388,7 +2417,7 @@ Getting the <dfn attribute for="CSSStyleDeclaration">cssText</dfn> attribute mus
2388
2417
2389
2418
Setting the {{CSSStyleDeclaration/cssText}} attribute must run these steps:
2390
2419
<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,
2392
2421
then <a>throw</a> a {{NoModificationAllowedError}} exception.
2393
2422
<li> Empty the <a for="CSSStyleDeclaration">declarations</a> .
2394
2423
<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>
2454
2483
2455
2484
The <dfn method for=CSSStyleDeclaration>setProperty(<var>property</var>, <var>value</var>, <var>priority</var>)</dfn> method must run these steps:
2456
2485
<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,
2458
2487
then <a>throw</a> a {{NoModificationAllowedError}} exception.
2459
2488
<li> If <var> property</var> is not a <a>custom property</a> , follow these substeps:
2460
2489
<ol>
@@ -2569,7 +2598,7 @@ use different algorithms as long as the constraints above hold.
2569
2598
2570
2599
The <dfn method for=CSSStyleDeclaration>removeProperty(<var>property</var>)</dfn> method must run these steps:
2571
2600
<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,
2573
2602
then <a>throw</a> a {{NoModificationAllowedError}} exception.
2574
2603
<li> If <var> property</var> is not a <a>custom property</a> ,
2575
2604
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
2592
2621
The <dfn attribute for=CSSStyleDeclaration>parentRule</dfn> attribute must return the
2593
2622
<a for="CSSStyleDeclaration">parent CSS rule</a> .
2594
2623
2595
- The <dfn attribute for=CSSStyleDeclaration >cssFloat</dfn>
2624
+ The <dfn attribute for=CSSStyleProperties >cssFloat</dfn>
2596
2625
attribute, on getting, must return the result of invoking
2597
2626
{{CSSStyleDeclaration/getPropertyValue()}} with
2598
2627
<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
2606
2635
<var> property</var> .
2607
2636
2608
2637
<pre class="idl extract">
2609
- partial interface CSSStyleDeclaration {
2638
+ partial interface CSSStyleProperties {
2610
2639
[CEReactions] attribute [LegacyNullToEmptyString] CSSOMString _<var> camel_cased_attribute</var> ;
2611
2640
};
2612
2641
</pre>
2613
2642
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
2615
2644
result of invoking {{CSSStyleDeclaration/getPropertyValue()}} with the
2616
2645
argument being the result of running the <a>IDL attribute to CSS property</a>
2617
2646
algorithm for <var> camel-cased attribute</var> .
2618
2647
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
2620
2649
{{CSSStyleDeclaration/setProperty()}} with the
2621
2650
first argument being the result of running the <a>IDL attribute to CSS property</a>
2622
2651
algorithm 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
2630
2659
algorithm for <var> property</var> , with the <i> lowercase first</i> flag set.
2631
2660
2632
2661
<pre class="idl extract">
2633
- partial interface CSSStyleDeclaration {
2662
+ partial interface CSSStyleProperties {
2634
2663
[CEReactions] attribute [LegacyNullToEmptyString] CSSOMString _<var> webkit_cased_attribute</var> ;
2635
2664
};
2636
2665
</pre>
2637
2666
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
2639
2668
getting, must return the result of invoking {{CSSStyleDeclaration/getPropertyValue()}} with the
2640
2669
argument being the result of running the <a>IDL attribute to CSS property</a> algorithm for
2641
2670
<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
2655
2684
the following partial interface applies where <var> dashed attribute</var> is <var> property</var> .
2656
2685
2657
2686
<pre class="idl extract">
2658
- partial interface CSSStyleDeclaration {
2687
+ partial interface CSSStyleProperties {
2659
2688
[CEReactions] attribute [LegacyNullToEmptyString] CSSOMString _<var> dashed_attribute</var> ;
2660
2689
};
2661
2690
</pre>
2662
2691
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
2664
2693
result of invoking {{CSSStyleDeclaration/getPropertyValue()}} with the
2665
2694
argument being <var> dashed attribute</var> .
2666
2695
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
2668
2697
{{CSSStyleDeclaration/setProperty()}} with the
2669
2698
first argument being <var> dashed attribute</var> , as second argument the given value, and no third argument. Any
2670
2699
exceptions thrown must be re-thrown.
@@ -2976,7 +3005,7 @@ interface mixin ElementCSSInlineStyle {
2976
3005
</pre>
2977
3006
2978
3007
The <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
2980
3009
whose <a for="CSSStyleDeclaration">owner node</a> is the <a>context object</a> .
2981
3010
2982
3011
If the user agent supports HTML, the following IDL applies: [[HTML]]
@@ -3043,18 +3072,19 @@ steps:
3043
3072
<a href="https://github.com/w3c/csswg-drafts/issues/4947">#4947</a> .
3044
3073
3045
3074
<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:
3047
3076
<dl>
3048
3077
<dt> <a for="CSSStyleDeclaration">computed flag</a>
3049
3078
<dd> Set.
3079
+ <dt> <a for="CSSStyleDeclaration">readonly flag</a>
3080
+ <dd> Set.
3050
3081
<dt> <a for="CSSStyleDeclaration">declarations</a>
3051
3082
<dd><var> decls</var> .
3052
3083
<dt> <a for="CSSStyleDeclaration">parent CSS rule</a>
3053
3084
<dd> Null.
3054
3085
<dt> <a for="CSSStyleDeclaration">owner node</a>
3055
3086
<dd><var> obj</var> .
3056
3087
</dl>
3057
-
3058
3088
</ol>
3059
3089
3060
3090
<p class=warning> The {{Window/getComputedStyle()}} method exposes information from <a lt="CSS style sheet">CSS style
0 commit comments