Skip to content

Commit e506cbc

Browse files
committed
cleanup of @page and @namespace
1 parent 0565cf3 commit e506cbc

2 files changed

Lines changed: 78 additions & 62 deletions

File tree

cssom/Overview.html

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,60 +2098,68 @@ <h4 id=css-page-rule><span class=secno>7.2.7. </span>CSS <code
20982098
title="">@page</code> Rule</h4>
20992099

21002100
<p class=XXX>Need to define the rules for <dfn
2101-
id=css-page-selectors-parsing title="CSS page selectors parsing">parsing a
2102-
CSS page selector</dfn> and <dfn id=css-page-selectors-serializing
2103-
title="CSS page selectors serializing">serializing a CSS page
2104-
selector</dfn>.
2101+
id=parse-a-css-page-selector>parse a CSS page selector</dfn> and <dfn
2102+
id=serialize-a-css-page-selector>serialize a CSS page selector</dfn>.
21052103

21062104
<p>The <code><a href="#csspagerule">CSSPageRule</a></code> object
2107-
represents an <code>@page</code> rule specified (if any) in a <span>CSS
2108-
style sheet</span>.
2105+
represents an <code>@page</code> rule.
21092106

21102107
<pre
21112108
class=idl>interface <dfn id=csspagerule>CSSPageRule</dfn> : <a href="#cssrule">CSSRule</a> {
2112-
attribute DOMString <a href="#csspagerule-selectortext" title=csspagerule-selectortext>selectorText</a>;
2113-
readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#csspagerule-style" title=csspagerule-style>style</a>;
2109+
attribute DOMString <a href="#dom-csspagerule-selectortext" title=dom-CSSPageRule-selectorText>selectorText</a>;
2110+
readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <span title=dom-CSSPageRule-style>style</span>;
21142111
};</pre>
21152112

2116-
<p>The <dfn id=csspagerule-selectortext
2117-
title=csspagerule-selectortext><code>selectorText</code></dfn> attribute,
2118-
on getting, <em class=ct>must</em> return the result of <a
2119-
href="#css-page-selectors-serializing" title="CSS page selectors
2120-
serializing">serializing CSS page selectors</a>. On setting, the setted
2121-
value <em class=ct>must</em> be used as input for <a
2122-
href="#css-page-selectors-parsing" title="CSS page selectors
2123-
parsing">parsing CSS page selectors</a> and if that returns a non-null
2124-
value that is to be used as a selector for the <code>@page</code> rule. If
2125-
it returns null setting <em class=ct>must not</em> have an effect.
2113+
<p>The <dfn id=dom-csspagerule-selectortext
2114+
title=dom-CSSPageRule-selectorText><code>selectorText</code></dfn>
2115+
attribute, on getting, <em class=ct>must</em> return the result of <a
2116+
href="#serialize-a-css-page-selector" title="serialize a CSS page
2117+
selector">serializing</a> the associated <span>CSS page selector</span>.
2118+
2119+
<p>On setting the <code title=dom-CSSPageRule-selectorText><a
2120+
href="#dom-csspagerule-selectortext">selectorText</a></code> attribute
2121+
these steps <em class=ct>must</em> be run:
2122+
2123+
<ol>
2124+
<li>
2125+
<p>Run the <a href="#parse-a-css-page-selector">parse a CSS page
2126+
selector</a> algorithm on the given value.
2127+
2128+
<li>
2129+
<p>If the algorithm returns a non-null value replace the associated
2130+
<span>CSS page selector</span> with the returned value.
2131+
2132+
<li>
2133+
<p>Otherwise, if the algorithm returns a null value, do nothing.
2134+
</ol>
21262135

21272136
<p>The <dfn id=csspagerule-style
21282137
title=csspagerule-style><code>style</code></dfn> attribute, on getting,
21292138
<em class=ct>must</em> return a <code><a
2130-
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> that contains
2131-
the specified property declarations within the <code>@page</code> rule.
2139+
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> for the
2140+
<code>@page</code> rule.
21322141

21332142
<h4 id=css-namespace-rule><span class=secno>7.2.8. </span>CSS <code
21342143
title="">@namespace</code> Rule</h4>
21352144

21362145
<p>The <code><a href="#cssnamespacerule">CSSNamespaceRule</a></code> object
2137-
represents an <code>@namespace</code> rule specified (if any) in a
2138-
<span>CSS style sheet</span> that consists of a prefix and namespace.
2146+
represents an <code>@namespace</code> rule.
21392147

21402148
<pre
21412149
class=idl>interface <dfn id=cssnamespacerule>CSSNamespaceRule</dfn> : <a href="#cssrule">CSSRule</a> {
2142-
readonly attribute DOMString <a href="#cssnamespacerule-namespaceuri">namespaceURI</a>;
2143-
readonly attribute DOMString <a href="#cssnamespacerule-prefix">prefix</a>;
2150+
readonly attribute DOMString <a href="#dom-cssnamespacerule-namespaceuri" title=dom-CSSNamespaceRule-namespaceURI>namespaceURI</a>;
2151+
readonly attribute DOMString <a href="#dom-cssnamespacerule-prefix" title=dom-CSSNamespaceRule-prefix>prefix</a>;
21442152
};</pre>
21452153

2146-
<p>The <dfn
2147-
id=cssnamespacerule-namespaceuri><code>namespaceURI</code></dfn>
2148-
attribute, on getting, <em class=ct>must</em> return specified namespace
2149-
IRI from the <code>@namespace</code> rule.
2150-
2151-
<p>The <dfn id=cssnamespacerule-prefix><code>prefix</code></dfn> attribute,
2152-
on getting, <em class=ct>must</em> return the specified prefix from the
2153-
<code>@namespace</code> rule or the empty string if there is no prefix.</p>
2154-
<!-- XXX lowercased? -->
2154+
<p>The <dfn id=dom-cssnamespacerule-namespaceuri
2155+
title=dom-CSSNamespaceRule-namespaceURI><code>namespaceURI</code></dfn>
2156+
attribute, on getting, <em class=ct>must</em> return the namespace of the
2157+
<code>@namespace</code> rule.
2158+
2159+
<p>The <dfn id=dom-cssnamespacerule-prefix
2160+
title=dom-CSSNamespaceRule-prefix><code>prefix</code></dfn> attribute, on
2161+
getting, <em class=ct>must</em> return the prefix of the
2162+
<code>@namespace</code> rule or the empty string if there is no prefix.
21552163

21562164
<h3 id=css-declaration-blocks><span class=secno>7.3. </span>CSS Declaration
21572165
Blocks</h3>

cssom/Overview.src.html

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,56 +1702,64 @@ <h4>CSS <code title="">@font-face</code> Rule</h4>
17021702
<h4>CSS <code title="">@page</code> Rule</h4>
17031703

17041704
<p class="XXX">Need to define the rules for
1705-
<dfn id="css-page-selectors-parsing" title="CSS page selectors parsing">parsing a CSS page selector</dfn> and
1706-
<dfn id="css-page-selectors-serializing" title="CSS page selectors serializing">serializing a CSS page
1707-
selector</dfn>.</p>
1705+
<dfn id="parse-a-css-page-selector">parse a CSS page selector</dfn> and
1706+
<dfn id="serialize-a-css-page-selector">serialize a CSS page selector</dfn>.</p>
17081707

1709-
<p>The <code>CSSPageRule</code> object represents an <code>@page</code> rule
1710-
specified (if any) in a <span>CSS style sheet</span>.</p>
1708+
<p>The <code>CSSPageRule</code> object represents an <code>@page</code>
1709+
rule.</p>
17111710

17121711
<pre class="idl">interface <dfn>CSSPageRule</dfn> : <span>CSSRule</span> {
1713-
attribute DOMString <span title="csspagerule-selectortext">selectorText</span>;
1714-
readonly attribute <span>CSSStyleDeclaration</span> <span title="csspagerule-style">style</span>;
1712+
attribute DOMString <span title="dom-CSSPageRule-selectorText">selectorText</span>;
1713+
readonly attribute <span>CSSStyleDeclaration</span> <span title="dom-CSSPageRule-style">style</span>;
17151714
};</pre>
17161715

17171716
<p>The
1718-
<dfn id="csspagerule-selectortext" title="csspagerule-selectortext"><code>selectorText</code></dfn>
1717+
<dfn id="dom-csspagerule-selectortext" title="dom-CSSPageRule-selectorText"><code>selectorText</code></dfn>
17191718
attribute, on getting, <em class="ct">must</em> return the result of
1720-
<span title="CSS page selectors serializing">serializing CSS page
1721-
selectors</span>. On setting, the setted value <em class="ct">must</em> be
1722-
used as input for <span title="CSS page selectors parsing">parsing CSS
1723-
page selectors</span> and if that returns a non-null value that is to be
1724-
used as a selector for the <code>@page</code> rule. If it returns null
1725-
setting <em class="ct">must not</em> have an effect.</p>
1719+
<span title="serialize a CSS page selector">serializing</span> the
1720+
associated <span>CSS page selector</span>.</p>
1721+
1722+
<p>On setting the
1723+
<code title="dom-CSSPageRule-selectorText">selectorText</code> attribute
1724+
these steps <em class="ct">must</em> be run:</p>
1725+
1726+
<ol>
1727+
<li><p>Run the <span>parse a CSS page selector</span> algorithm on the
1728+
given value.</p></li>
1729+
1730+
<li><p>If the algorithm returns a non-null value replace the associated
1731+
<span>CSS page selector</span> with the returned value.</p></li>
1732+
1733+
<li><p>Otherwise, if the algorithm returns a null value, do
1734+
nothing.</p></li>
1735+
</ol>
17261736

17271737
<p>The
17281738
<dfn id="csspagerule-style" title="csspagerule-style"><code>style</code></dfn>
17291739
attribute, on getting, <em class="ct">must</em> return a
1730-
<code>CSSStyleDeclaration</code> that contains the specified property
1731-
declarations within the <code>@page</code> rule.</p>
1740+
<code>CSSStyleDeclaration</code> for the <code>@page</code> rule.</p>
17321741

17331742

17341743
<h4>CSS <code title="">@namespace</code> Rule</h4>
17351744

17361745
<p>The <code>CSSNamespaceRule</code> object represents an
1737-
<code>@namespace</code> rule specified (if any) in a <span>CSS style
1738-
sheet</span> that consists of a prefix and namespace.</p>
1746+
<code>@namespace</code> rule.</p>
17391747

17401748
<pre class="idl">interface <dfn>CSSNamespaceRule</dfn> : <span>CSSRule</span> {
1741-
readonly attribute DOMString <span>namespaceURI</span>;
1742-
readonly attribute DOMString <span>prefix</span>;
1749+
readonly attribute DOMString <span title="dom-CSSNamespaceRule-namespaceURI">namespaceURI</span>;
1750+
readonly attribute DOMString <span title="dom-CSSNamespaceRule-prefix">prefix</span>;
17431751
};</pre>
17441752

1745-
<p>The <dfn id="cssnamespacerule-namespaceuri"><code>namespaceURI</code></dfn>
1746-
attribute, on getting, <em class="ct">must</em> return specified namespace IRI
1747-
from the <code>@namespace</code> rule.</p>
1748-
1749-
<p>The <dfn id="cssnamespacerule-prefix"><code>prefix</code></dfn> attribute,
1750-
on getting, <em class="ct">must</em> return the specified prefix from the
1751-
<code>@namespace</code> rule or the empty string if there is no prefix.</p>
1752-
<!-- XXX lowercased? -->
1753-
1753+
<p>The
1754+
<dfn id="dom-cssnamespacerule-namespaceuri" title="dom-CSSNamespaceRule-namespaceURI"><code>namespaceURI</code></dfn>
1755+
attribute, on getting, <em class="ct">must</em> return the namespace of
1756+
the <code>@namespace</code> rule.</p>
17541757

1758+
<p>The
1759+
<dfn id="dom-cssnamespacerule-prefix" title="dom-CSSNamespaceRule-prefix"><code>prefix</code></dfn>
1760+
attribute, on getting, <em class="ct">must</em> return the prefix of the
1761+
<code>@namespace</code> rule or the empty string if there is no
1762+
prefix.</p>
17551763

17561764

17571765
<h3>CSS Declaration Blocks</h3>

0 commit comments

Comments
 (0)