Skip to content

Commit 76c62c3

Browse files
committed
do away with statements
1 parent 04f4125 commit 76c62c3

2 files changed

Lines changed: 104 additions & 85 deletions

File tree

cssom/Overview.html

Lines changed: 64 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ <h2 class="no-num no-toc" id=toc>Table of Contents</h2>
172172
</span>The <code title="">CSSStyleSheet</code> Interface</a>
173173
</ul>
174174

175-
<li><a href="#css-statements"><span class=secno>7.2. </span>CSS
176-
Statements</a>
175+
<li><a href="#css-rules"><span class=secno>7.2. </span>CSS Rules</a>
177176
<ul class=toc>
178177
<li><a href="#the-cssrulelist-sequence"><span class=secno>7.2.1.
179178
</span>The <code title="">CSSRuleList</code> Sequence</a>
@@ -185,23 +184,23 @@ <h2 class="no-num no-toc" id=toc>Table of Contents</h2>
185184
</span>Extensibility</a>
186185
</ul>
187186

188-
<li><a href="#the-cssstylerule-interface"><span class=secno>7.2.3.
189-
</span>The <code title="">CSSStyleRule</code> Interface</a>
187+
<li><a href="#css-style-rule-rule-set"><span class=secno>7.2.3.
188+
</span>CSS Style Rule (Rule Set)</a>
190189

191-
<li><a href="#the-cssimportrule-interface"><span class=secno>7.2.4.
192-
</span>The <code title="">CSSImportRule</code> Interface</a>
190+
<li><a href="#css-import-rule"><span class=secno>7.2.4. </span>CSS
191+
<code title="">@import</code> Rule</a>
193192

194-
<li><a href="#the-cssmediarule-interface"><span class=secno>7.2.5.
195-
</span>The <code title="">CSSMediaRule</code> Interface</a>
193+
<li><a href="#css-media-rule"><span class=secno>7.2.5. </span>CSS
194+
<code title="">@media</code> Rule</a>
196195

197-
<li><a href="#the-cssfontfacerule-interface"><span class=secno>7.2.6.
198-
</span>The <code title="">CSSFontFaceRule</code> Interface</a>
196+
<li><a href="#css-font-face-rule"><span class=secno>7.2.6. </span>CSS
197+
<code title="">@font-face</code> Rule</a>
199198

200-
<li><a href="#the-csspagerule-interface"><span class=secno>7.2.7.
201-
</span>The <code title="">CSSPageRule</code> Interface</a>
199+
<li><a href="#css-page-rule"><span class=secno>7.2.7. </span>CSS <code
200+
title="">@page</code> Rule</a>
202201

203-
<li><a href="#the-cssnamespacerule-interface"><span class=secno>7.2.8.
204-
</span>The <code title="">CSSNamespaceRule</code> Interface</a>
202+
<li><a href="#css-namespace-rule"><span class=secno>7.2.8. </span>CSS
203+
<code title="">@namespace</code> Rule</a>
205204
</ul>
206205

207206
<li><a href="#css-declaration-blocks"><span class=secno>7.3. </span>CSS
@@ -1725,10 +1724,10 @@ <h4 id=the-cssstylesheet-interface><span class=secno>7.1.1. </span>The
17251724
title=cssstylesheet-cssrules><code>cssRules</code></dfn> attribute, on
17261725
getting, <em class=ct>must</em> return a <code><a
17271726
href="#cssrulelist">CSSRuleList</a></code> object consisting of a list of
1728-
statements in order they were found in the <span>CSS style sheet</span>.
1727+
rules in order they were found in the <span>CSS style sheet</span>.
17291728

1730-
<p class=note>Statements that were dropped during parsing can not be found
1731-
using these APIs.
1729+
<p class=note>Rules that were dropped during parsing can not be found using
1730+
these APIs.
17321731

17331732
<p>The <dfn id=cssstylesheet-insertrule
17341733
title=cssstylesheet-insertrule><code>insertRule(<var title="">rule</var>,
@@ -1747,14 +1746,7 @@ <h4 id=the-cssstylesheet-interface><span class=secno>7.1.1. </span>The
17471746
<code title=cssmediarule-cssrules><a
17481747
href="#cssmediarule-cssrules">cssRules</a></code>.
17491748

1750-
<h3 id=css-statements><span class=secno>7.2. </span>CSS Statements</h3>
1751-
<!-- move this down -->
1752-
1753-
<p class=XXX>Need to define the rules for <dfn
1754-
id=css-page-selectors-parsing title="CSS page selectors parsing">parsing a
1755-
CSS page selector</dfn> and <dfn id=css-page-selectors-serializing
1756-
title="CSS page selectors serializing">serializing a CSS page
1757-
selector</dfn>.
1749+
<h3 id=css-rules><span class=secno>7.2. </span>CSS Rules</h3>
17581750

17591751
<p class=XXX>Need to split this up in parsing and common algorithms.
17601752

@@ -1840,7 +1832,7 @@ <h4 id=the-cssrulelist-sequence><span class=secno>7.2.1. </span>The <code
18401832
title="">CSSRuleList</code> Sequence</h4>
18411833

18421834
<p>The <code><a href="#cssrulelist">CSSRuleList</a></code> object
1843-
represents an ordered collection of CSS statements.
1835+
represents an ordered collection of CSS rules.
18441836

18451837
<pre
18461838
class=idl>typedef sequence&lt;<a href="#cssrule">CSSRule</a>> <dfn id=cssrulelist>CSSRuleList</dfn>;</pre>
@@ -1959,38 +1951,51 @@ <h5 id=extensibility><span class=secno>7.2.2.1. </span>Extensibility</h5>
19591951
<p>In general, vendors are encouraged to discuss extensions on a public
19601952
forum, such as <code>www-style@w3.org</code>.
19611953

1962-
<h4 id=the-cssstylerule-interface><span class=secno>7.2.3. </span>The <code
1963-
title="">CSSStyleRule</code> Interface</h4>
1954+
<h4 id=css-style-rule-rule-set><span class=secno>7.2.3. </span>CSS Style
1955+
Rule (Rule Set)</h4>
19641956

19651957
<p>The <code><a href="#cssstylerule">CSSStyleRule</a></code> object
1966-
represents a ruleset specified (if any) in a <span>CSS style sheet</span>.
1967-
It provides access to a declaration block as well as to the associated
1968-
group of selectors.
1958+
represents a rule set, providing access to its associated <span>group of
1959+
selectors</span> and <span>CSS declaration block</span>.</p>
1960+
<!-- XXX ref -->
19691961

19701962
<pre
19711963
class=idl>interface <dfn id=cssstylerule>CSSStyleRule</dfn> : <a href="#cssrule">CSSRule</a> {
1972-
attribute DOMString <a href="#cssstylerule-selectortext" title=cssstylerule-selectortext>selectorText</a>;
1973-
readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#cssstylerule-style" title=cssstylerule-style>style</a>;
1964+
attribute DOMString <a href="#dom-cssstylerule-selectortext" title=dom-CSSStyleRule-selectorText>selectorText</a>;
1965+
readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <span title=dom-CSSStyleRule-style>style</span>;
19741966
};</pre>
19751967

1976-
<p>The <dfn id=cssstylerule-selectortext
1977-
title=cssstylerule-selectortext><code>selectorText</code></dfn> attribute,
1978-
on getting, <em class=ct>must</em> return the result of <span
1979-
title="selectors serializing">serializing a group of selectors</span>. On
1980-
setting, the setted value <em class=ct>must</em> be used as input for
1981-
<span title="selectors parsing">parsing a group of selectors</span> and if
1982-
that returns a non-null value that is to be used as a selector for the CSS
1983-
statement. If it returns null setting <em class=ct>must not</em> have an
1984-
effect.
1968+
<p>The <dfn id=dom-cssstylerule-selectortext
1969+
title=dom-CSSStyleRule-selectorText><code>selectorText</code></dfn>
1970+
attribute, on getting, <em class=ct>must</em> return the result of <a
1971+
href="#serialize-a-group-of-selectors" title="serialize a group of
1972+
selectors">serializing</a> the associated <span>group of selectors</span>.
1973+
1974+
<p>On setting the <code title=dom-CSSStyleRule-selectorText><a
1975+
href="#dom-cssstylerule-selectortext">selectorText</a></code> attribute
1976+
these steps <em class=ct>must</em> be run:
1977+
1978+
<ol>
1979+
<li>
1980+
<p>Run the <a href="#parse-a-group-of-selectors">parse a group of
1981+
selectors</a> algorithm on the given value.
1982+
1983+
<li>
1984+
<p>If the algorithm returns a non-null value replace the associated
1985+
<span>group of selectors</span> with the returned value.
1986+
1987+
<li>
1988+
<p>Otherwise, if the algorithm returns a null value, do nothing.
1989+
</ol>
19851990

19861991
<p>The <dfn id=cssstylerule-style
19871992
title=cssstylerule-style><code>style</code></dfn> attribute <em
19881993
class=ct>must</em> return a live <code><a
19891994
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> object for the
1990-
ruleset.
1995+
rule set.
19911996

1992-
<h4 id=the-cssimportrule-interface><span class=secno>7.2.4. </span>The
1993-
<code title="">CSSImportRule</code> Interface</h4>
1997+
<h4 id=css-import-rule><span class=secno>7.2.4. </span>CSS <code
1998+
title="">@import</code> Rule</h4>
19941999

19952000
<p>The <code><a href="#cssimportrule">CSSImportRule</a></code> object
19962001
represents an <code>@import</code> rule specified (if any) in a <span>CSS
@@ -2025,8 +2030,8 @@ <h4 id=the-cssimportrule-interface><span class=secno>7.2.4. </span>The
20252030
title=cssstylesheet-cssrules><a
20262031
href="#cssstylesheet-cssrules">cssRules</a></code> list is simply empty.
20272032

2028-
<h4 id=the-cssmediarule-interface><span class=secno>7.2.5. </span>The <code
2029-
title="">CSSMediaRule</code> Interface</h4>
2033+
<h4 id=css-media-rule><span class=secno>7.2.5. </span>CSS <code
2034+
title="">@media</code> Rule</h4>
20302035

20312036
<p>The <code><a href="#cssmediarule">CSSMediaRule</a></code> object
20322037
represents an <code title="">@media</code> rule specified (if any) in a
@@ -2071,8 +2076,8 @@ <h4 id=the-cssmediarule-interface><span class=secno>7.2.5. </span>The <code
20712076
<code title=cssmediarule-cssrules><a
20722077
href="#cssmediarule-cssrules">cssRules</a></code>.
20732078

2074-
<h4 id=the-cssfontfacerule-interface><span class=secno>7.2.6. </span>The
2075-
<code title="">CSSFontFaceRule</code> Interface</h4>
2079+
<h4 id=css-font-face-rule><span class=secno>7.2.6. </span>CSS <code
2080+
title="">@font-face</code> Rule</h4>
20762081

20772082
<p>The <code><a href="#cssfontfacerule">CSSFontFaceRule</a></code> object
20782083
represents an <code>@font-face</code> rule specified (if any) in a
@@ -2090,8 +2095,14 @@ <h4 id=the-cssfontfacerule-interface><span class=secno>7.2.6. </span>The
20902095
contains the property declarations specified within the
20912096
<code>@font-face</code> rule.
20922097

2093-
<h4 id=the-csspagerule-interface><span class=secno>7.2.7. </span>The <code
2094-
title="">CSSPageRule</code> Interface</h4>
2098+
<h4 id=css-page-rule><span class=secno>7.2.7. </span>CSS <code
2099+
title="">@page</code> Rule</h4>
2100+
2101+
<p class=XXX>Need to define the rules for <dfn
2102+
id=css-page-selectors-parsing title="CSS page selectors parsing">parsing a
2103+
CSS page selector</dfn> and <dfn id=css-page-selectors-serializing
2104+
title="CSS page selectors serializing">serializing a CSS page
2105+
selector</dfn>.
20952106

20962107
<p>The <code><a href="#csspagerule">CSSPageRule</a></code> object
20972108
represents an <code>@page</code> rule specified (if any) in a <span>CSS
@@ -2120,8 +2131,8 @@ <h4 id=the-csspagerule-interface><span class=secno>7.2.7. </span>The <code
21202131
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> that contains
21212132
the specified property declarations within the <code>@page</code> rule.
21222133

2123-
<h4 id=the-cssnamespacerule-interface><span class=secno>7.2.8. </span>The
2124-
<code title="">CSSNamespaceRule</code> Interface</h4>
2134+
<h4 id=css-namespace-rule><span class=secno>7.2.8. </span>CSS <code
2135+
title="">@namespace</code> Rule</h4>
21252136

21262137
<p>The <code><a href="#cssnamespacerule">CSSNamespaceRule</a></code> object
21272138
represents an <code>@namespace</code> rule specified (if any) in a

cssom/Overview.src.html

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,10 +1382,10 @@ <h4>The <code title="">CSSStyleSheet</code> Interface</h4>
13821382
<p>The
13831383
<dfn id="cssstylesheet-cssrules" title="cssstylesheet-cssrules"><code>cssRules</code></dfn>
13841384
attribute, on getting, <em class="ct">must</em> return a
1385-
<code>CSSRuleList</code> object consisting of a list of statements in order
1385+
<code>CSSRuleList</code> object consisting of a list of rules in order
13861386
they were found in the <span>CSS style sheet</span>.</p>
13871387

1388-
<p class="note">Statements that were dropped during parsing can not be found
1388+
<p class="note">Rules that were dropped during parsing can not be found
13891389
using these APIs.</p>
13901390

13911391
<p>The
@@ -1402,14 +1402,7 @@ <h4>The <code title="">CSSStyleSheet</code> Interface</h4>
14021402
<code title="cssmediarule-cssrules">cssRules</code>.</p>
14031403

14041404

1405-
<h3>CSS Statements</h3>
1406-
1407-
<!-- move this down -->
1408-
<p class="XXX">Need to define the rules for
1409-
<dfn id="css-page-selectors-parsing" title="CSS page selectors parsing">parsing a CSS page selector</dfn> and
1410-
<dfn id="css-page-selectors-serializing" title="CSS page selectors serializing">serializing a CSS page
1411-
selector</dfn>.</p>
1412-
1405+
<h3>CSS Rules</h3>
14131406

14141407
<p class="XXX">Need to split this up in parsing and common algorithms.</p>
14151408

@@ -1456,8 +1449,7 @@ <h3>CSS Statements</h3>
14561449
list</var>.</p></li>
14571450
</ol>
14581451

1459-
<p>The rules for <dfn title="replace a statement">replacing a
1460-
statement</dfn> are as given in the following algorithm. The variable
1452+
<p>The rules for <dfn title="replace a statement">replacing a statement</dfn> are as given in the following algorithm. The variable
14611453
<var>rule</var> and <var>old object</var> are to be considered equivalent to
14621454
the identically named variables used when invoking this algorithm. If an
14631455
exception is raised this algorithm is to be aborted. The steps
@@ -1482,7 +1474,7 @@ <h3>CSS Statements</h3>
14821474
<h4>The <code title="">CSSRuleList</code> Sequence</h4>
14831475

14841476
<p>The <code>CSSRuleList</code> object represents an ordered collection of
1485-
CSS statements.</p>
1477+
CSS rules.</p>
14861478

14871479
<pre class="idl">typedef sequence&lt;<span>CSSRule</span>> <dfn>CSSRuleList</dfn>;</pre>
14881480

@@ -1577,34 +1569,45 @@ <h5>Extensibility</h5>
15771569
such as <code>www-style@w3.org</code>.</p>
15781570

15791571

1580-
<h4>The <code title="">CSSStyleRule</code> Interface</h4>
1572+
<h4>CSS Style Rule (Rule Set)</h4>
15811573

1582-
<p>The <code>CSSStyleRule</code> object represents a ruleset specified (if
1583-
any) in a <span>CSS style sheet</span>. It provides access to a declaration
1584-
block as well as to the associated group of selectors.</p>
1574+
<p>The <code>CSSStyleRule</code> object represents a rule set, providing
1575+
access to its associated <span>group of selectors</span> and
1576+
<span>CSS declaration block</span>.</p> <!-- XXX ref -->
15851577

15861578
<pre class="idl">interface <dfn>CSSStyleRule</dfn> : <span>CSSRule</span> {
1587-
attribute DOMString <span title="cssstylerule-selectortext">selectorText</span>;
1588-
readonly attribute <span>CSSStyleDeclaration</span> <span title="cssstylerule-style">style</span>;
1579+
attribute DOMString <span title="dom-CSSStyleRule-selectorText">selectorText</span>;
1580+
readonly attribute <span>CSSStyleDeclaration</span> <span title="dom-CSSStyleRule-style">style</span>;
15891581
};</pre>
15901582

15911583
<p>The
1592-
<dfn id="cssstylerule-selectortext" title="cssstylerule-selectortext"><code>selectorText</code></dfn>
1584+
<dfn id="dom-cssstylerule-selectortext" title="dom-CSSStyleRule-selectorText"><code>selectorText</code></dfn>
15931585
attribute, on getting, <em class="ct">must</em> return the result of
1594-
<span title="selectors serializing">serializing a group of
1595-
selectors</span>. On setting, the setted value <em class="ct">must</em> be
1596-
used as input for <span title="selectors parsing">parsing a group of
1597-
selectors</span> and if that returns a non-null value that is to be used
1598-
as a selector for the CSS statement. If it returns null setting
1599-
<em class="ct">must not</em> have an effect.</p>
1586+
<span title="serialize a group of selectors">serializing</span> the
1587+
associated <span>group of selectors</span>.</p>
1588+
1589+
<p>On setting the
1590+
<code title="dom-CSSStyleRule-selectorText">selectorText</code> attribute
1591+
these steps <em class="ct">must</em> be run:</p>
1592+
1593+
<ol>
1594+
<li><p>Run the <span>parse a group of selectors</span> algorithm on the
1595+
given value.</p></li>
1596+
1597+
<li><p>If the algorithm returns a non-null value replace the associated
1598+
<span>group of selectors</span> with the returned value.</p></li>
1599+
1600+
<li><p>Otherwise, if the algorithm returns a null value, do
1601+
nothing.</p></li>
1602+
</ol>
16001603

16011604
<p>The
16021605
<dfn id="cssstylerule-style" title="cssstylerule-style"><code>style</code></dfn>
16031606
attribute <em class="ct">must</em> return a live
1604-
<code>CSSStyleDeclaration</code> object for the ruleset.</p>
1607+
<code>CSSStyleDeclaration</code> object for the rule set.</p>
16051608

16061609

1607-
<h4>The <code title="">CSSImportRule</code> Interface</h4>
1610+
<h4>CSS <code title="">@import</code> Rule</h4>
16081611

16091612
<p>The <code>CSSImportRule</code> object represents an <code>@import</code>
16101613
rule specified (if any) in a <span>CSS style sheet</span>.</p>
@@ -1636,7 +1639,7 @@ <h4>The <code title="">CSSImportRule</code> Interface</h4>
16361639
<code title="cssstylesheet-cssrules">cssRules</code> list is simply empty.</p>
16371640

16381641

1639-
<h4>The <code title="">CSSMediaRule</code> Interface</h4>
1642+
<h4>CSS <code title="">@media</code> Rule</h4>
16401643

16411644
<p>The <code>CSSMediaRule</code> object represents an
16421645
<code title="">@media</code> rule specified (if any) in a <span>CSS style
@@ -1677,7 +1680,7 @@ <h4>The <code title="">CSSMediaRule</code> Interface</h4>
16771680
<code title="cssmediarule-cssrules">cssRules</code>.</p>
16781681

16791682

1680-
<h4>The <code title="">CSSFontFaceRule</code> Interface</h4>
1683+
<h4>CSS <code title="">@font-face</code> Rule</h4>
16811684

16821685
<p>The <code>CSSFontFaceRule</code> object represents an
16831686
<code>@font-face</code> rule specified (if any) in a <span>CSS style
@@ -1694,7 +1697,12 @@ <h4>The <code title="">CSSFontFaceRule</code> Interface</h4>
16941697
<code>@font-face</code> rule.</p>
16951698

16961699

1697-
<h4>The <code title="">CSSPageRule</code> Interface</h4>
1700+
<h4>CSS <code title="">@page</code> Rule</h4>
1701+
1702+
<p class="XXX">Need to define the rules for
1703+
<dfn id="css-page-selectors-parsing" title="CSS page selectors parsing">parsing a CSS page selector</dfn> and
1704+
<dfn id="css-page-selectors-serializing" title="CSS page selectors serializing">serializing a CSS page
1705+
selector</dfn>.</p>
16981706

16991707
<p>The <code>CSSPageRule</code> object represents an <code>@page</code> rule
17001708
specified (if any) in a <span>CSS style sheet</span>.</p>
@@ -1721,7 +1729,7 @@ <h4>The <code title="">CSSPageRule</code> Interface</h4>
17211729
declarations within the <code>@page</code> rule.</p>
17221730

17231731

1724-
<h4>The <code title="">CSSNamespaceRule</code> Interface</h4>
1732+
<h4>CSS <code title="">@namespace</code> Rule</h4>
17251733

17261734
<p>The <code>CSSNamespaceRule</code> object represents an
17271735
<code>@namespace</code> rule specified (if any) in a <span>CSS style

0 commit comments

Comments
 (0)