Skip to content

Commit f954ab4

Browse files
committed
(1) restore CSSCharsetRule;
(2) specify text argument for MediaList constructor; (3) issue formatting cleanup;
1 parent 91ca252 commit f954ab4

5 files changed

Lines changed: 70 additions & 30 deletions

File tree

cssom/Overview.html

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h1 id="cssom">CSS Object Model (CSSOM)</h1>
1818

1919
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
2020

21-
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 13 August 2012</h2>
21+
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 21 August 2012</h2>
2222

2323
<dl>
2424

@@ -83,7 +83,7 @@ <h2 class="no-num no-toc" id="sotd">Status of this Document</h2>
8383
can be found in the
8484
<a href="http://www.w3.org/TR/">W3C technical reports index at http://www.w3.org/TR/.</a></em>
8585

86-
<p class="dontpublish">This is the 13 August 2012 Editor's Draft of CSSOM. Please send comments to
86+
<p class="dontpublish">This is the 21 August 2012 Editor's Draft of CSSOM. Please send comments to
8787
<a href="mailto:www-style@w3.org?subject=%5Bcssom%5D%20">www-style@w3.org</a>
8888
(<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
8989
with <samp>[cssom]</samp> at the start of the subject line.
@@ -153,11 +153,12 @@ <h2 class="no-num no-toc" id="toc">Table of Contents</h2>
153153
<li><a href="#the-cssrulelist-sequence"><span class="secno">6.4.1 </span>The <code>CSSRuleList</code> Sequence</a></li>
154154
<li><a href="#the-cssrule-interface"><span class="secno">6.4.2 </span>The <code>CSSRule</code> Interface</a></li>
155155
<li><a href="#the-cssstylerule-interface"><span class="secno">6.4.3 </span>The <code>CSSStyleRule</code> Interface</a></li>
156-
<li><a href="#the-cssimportrule-interface"><span class="secno">6.4.4 </span>The <code>CSSImportRule</code> Interface</a></li>
157-
<li><a href="#the-cssmediarule-interface"><span class="secno">6.4.5 </span>The <code>CSSMediaRule</code> Interface</a></li>
158-
<li><a href="#the-cssfontfacerule-interface"><span class="secno">6.4.6 </span>The <code>CSSFontFaceRule</code> Interface</a></li>
159-
<li><a href="#the-csspagerule-interface"><span class="secno">6.4.7 </span>The <code>CSSPageRule</code> Interface</a></li>
160-
<li><a href="#the-cssnamespacerule-interface"><span class="secno">6.4.8 </span>The <code>CSSNamespaceRule</code> Interface</a></ol></li>
156+
<li><a href="#the-csscharsetrule-interface"><span class="secno">6.4.4 </span>The <code>CSSCharsetRule</code> Interface</a></li>
157+
<li><a href="#the-cssimportrule-interface"><span class="secno">6.4.5 </span>The <code>CSSImportRule</code> Interface</a></li>
158+
<li><a href="#the-cssmediarule-interface"><span class="secno">6.4.6 </span>The <code>CSSMediaRule</code> Interface</a></li>
159+
<li><a href="#the-cssfontfacerule-interface"><span class="secno">6.4.7 </span>The <code>CSSFontFaceRule</code> Interface</a></li>
160+
<li><a href="#the-csspagerule-interface"><span class="secno">6.4.8 </span>The <code>CSSPageRule</code> Interface</a></li>
161+
<li><a href="#the-cssnamespacerule-interface"><span class="secno">6.4.9 </span>The <code>CSSNamespaceRule</code> Interface</a></ol></li>
161162
<li><a href="#css-declaration-blocks"><span class="secno">6.5 </span>CSS Declaration Blocks</a>
162163
<ol class="toc">
163164
<li><a href="#the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The <code>CSSStyleDeclaration</code> Interface</a></ol></li>
@@ -532,7 +533,7 @@ <h3 id="comparing-media-queries"><span class="secno">4.3 </span>Comparing Media
532533
<h3 id="the-medialist-interface"><span class="secno">4.4 </span>The <code>MediaList</code> Interface</h3>
533534

534535
<p>An object that implements the <a class="idlType" href="#widl-def-MediaList"><code>MediaList</code></a> interface has an associated <dfn id="collection-of-media-queries">collection of media queries</dfn>.</p>
535-
<pre class="idl"><span class="idlInterface" id="widl-def-MediaList">[Constructor]
536+
<pre class="idl"><span class="idlInterface" id="widl-def-MediaList">[Constructor(DOMString text)]
536537
interface <span class="idlInterfaceID">MediaList</span> {
537538
<span class="idlAttribute"> stringifier attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MediaList-mediaText">mediaText</a></span>;</span>
538539
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>unsigned long</a></span> <span class="idlAttrName"><a href="#widl-MediaList-length">length</a></span>;</span>
@@ -541,10 +542,10 @@ <h3 id="the-medialist-interface"><span class="secno">4.4 </span>The <code>MediaL
541542
<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-MediaList-deleteMedium-void-DOMString-medium">deleteMedium</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">medium</span></span>);</span>
542543
};</span></pre>
543544
<dl class="constructors">
544-
<dt class="constructor" id="widl-MediaList-void">
545-
<code>MediaList</code> ()</dt>
545+
<dt class="constructor" id="widl-MediaList-DOMString-text">
546+
<code>MediaList</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>)</dt>
546547
<dd>
547-
<p>To <dfn id="create-a-medialist-object">create a <code>MediaList</code> object</dfn> from a string <var>s</var>, run these steps:</p> <ol> <li><p>Create a new <code>MediaList</code> object.</li> <li><p>Set its <span title="dom-MediaList-mediaText">mediaText</span> attribute to <var>s</var>.</li> <li><p>Return the newly created <code><code>MediaList</code></code> object.</li> </ol></dd>
548+
<p>To <dfn id="create-a-medialist-object">create a <code>MediaList</code> object</dfn> from a string <var>text</var>, run these steps:</p> <ol> <li><p>Create a new <code>MediaList</code> object.</li> <li><p>Set its <span title="dom-MediaList-mediaText">mediaText</span> attribute to <var>text</var>.</li> <li><p>Return the newly created <code><code>MediaList</code></code> object.</li> </ol></dd>
548549
</dl>
549550
<dl class="attributes">
550551
<dt class="attribute" id="widl-MediaList-mediaText">
@@ -1525,7 +1526,10 @@ <h3 id="css-rules"><span class="secno">6.4 </span>CSS Rules</h3>
15251526

15261527
<dl class="switch">
15271528
<dt><code>CSSStyleRule</code></dt>
1528-
<dd class="issue">...</dd>
1529+
<dd><p class="issue">...</dd>
1530+
1531+
<dt><code>CSSCharsetRule</code></dt>
1532+
<dd><p class="issue">...</dd>
15291533

15301534
<dt><code>CSSImportRule</code></dt>
15311535
<dd>
@@ -1544,13 +1548,13 @@ <h3 id="css-rules"><span class="secno">6.4 </span>CSS Rules</h3>
15441548
</dd>
15451549

15461550
<dt><code>CSSMediaRule</code></dt>
1547-
<dd class="issue">...</dd>
1551+
<dd><p class="issue">...</dd>
15481552

15491553
<dt><code>CSSFontFaceRule</code></dt>
1550-
<dd class="issue">...</dd>
1554+
<dd><p class="issue">...</dd>
15511555

15521556
<dt><code>CSSPageRule</code></dt>
1553-
<dd class="issue">...</dd>
1557+
<dd><p class="issue">...</dd>
15541558

15551559
<dt><code>CSSNamespaceRule</code></dt>
15561560
<dd><p>The literal string "<code>@namespace</code>", followed by a space
@@ -1621,6 +1625,7 @@ <h4 id="the-cssrule-interface"><span class="secno">6.4.2 </span>The <code>CSSRul
16211625
<p>The <code>CSSRule</code> interface represents an abstract, base CSS style rule. Each distinct CSS style rule type is represented by a distinct interface that inherits from this interface.</p>
16221626
<pre class="idl"><span class="idlInterface" id="widl-def-CSSRule">interface <span class="idlInterfaceID">CSSRule</span> {
16231627
<span class="idlConst"> const <span class="idlConstType"><a>unsigned short</a></span> <span class="idlConstName"><a href="#widl-CSSRule-STYLE_RULE">STYLE_RULE</a></span> = <span class="idlConstValue">1</span>;</span>
1628+
<span class="idlConst"> const <span class="idlConstType"><a>unsigned short</a></span> <span class="idlConstName"><a href="#widl-CSSRule-CHARSET_RULE">CHARSET_RULE</a></span> = <span class="idlConstValue">2</span>;</span>
16241629
<span class="idlConst"> const <span class="idlConstType"><a>unsigned short</a></span> <span class="idlConstName"><a href="#widl-CSSRule-IMPORT_RULE">IMPORT_RULE</a></span> = <span class="idlConstValue">3</span>;</span>
16251630
<span class="idlConst"> const <span class="idlConstType"><a>unsigned short</a></span> <span class="idlConstName"><a href="#widl-CSSRule-MEDIA_RULE">MEDIA_RULE</a></span> = <span class="idlConstValue">4</span>;</span>
16261631
<span class="idlConst"> const <span class="idlConstType"><a>unsigned short</a></span> <span class="idlConstName"><a href="#widl-CSSRule-FONT_FACE_RULE">FONT_FACE_RULE</a></span> = <span class="idlConstValue">5</span>;</span>
@@ -1636,6 +1641,10 @@ <h4 id="the-cssrule-interface"><span class="secno">6.4.2 </span>The <code>CSSRul
16361641
<code>STYLE_RULE</code> of type <span class="idlConstType"><a>unsigned short</a></span>, with value 1</dt>
16371642
<dd>
16381643
<p>When the value of the <code>type</code> attribute is <code>STYLE_RULE</code>, then the object that implements this interface must implement the <code>CSSStyleRule</code> interface.</dd>
1644+
<dt class="constant" id="widl-CSSRule-CHARSET_RULE">
1645+
<code>CHARSET_RULE</code> of type <span class="idlConstType"><a>unsigned short</a></span>, with value 2</dt>
1646+
<dd>
1647+
<p>When the value of the <code>type</code> attribute is <code>CHARSET_RULE</code>, then the object that implements this interface must implement the <code>CSSCharsetRule</code> interface.</dd>
16391648
<dt class="constant" id="widl-CSSRule-IMPORT_RULE">
16401649
<code>IMPORT_RULE</code> of type <span class="idlConstType"><a>unsigned short</a></span>, with value 3</dt>
16411650
<dd>
@@ -1700,7 +1709,13 @@ <h4 id="the-cssstylerule-interface"><span class="secno">6.4.3 </span>The <code>C
17001709

17011710
<!-- ........................................................................................................................ -->
17021711

1703-
<h4 id="the-cssimportrule-interface"><span class="secno">6.4.4 </span>The <code>CSSImportRule</code> Interface</h4>
1712+
<h4 id="the-csscharsetrule-interface"><span class="secno">6.4.4 </span>The <code>CSSCharsetRule</code> Interface</h4>
1713+
1714+
1715+
1716+
<!-- ........................................................................................................................ -->
1717+
1718+
<h4 id="the-cssimportrule-interface"><span class="secno">6.4.5 </span>The <code>CSSImportRule</code> Interface</h4>
17041719

17051720
<p>The <code>CSSImportRule</code> interface represents an <code>@import</code> rule.</p>
17061721
<pre class="idl"><span class="idlInterface" id="widl-def-CSSImportRule">interface <span class="idlInterfaceID">CSSImportRule</span> : <span class="idlSuperclass"><a class="idlType" href="#widl-def-CSSRule"><code>CSSRule</code></a></span> {
@@ -1726,7 +1741,7 @@ <h4 id="the-cssimportrule-interface"><span class="secno">6.4.4 </span>The <code>
17261741

17271742
<!-- ........................................................................................................................ -->
17281743

1729-
<h4 id="the-cssmediarule-interface"><span class="secno">6.4.5 </span>The <code>CSSMediaRule</code> Interface</h4>
1744+
<h4 id="the-cssmediarule-interface"><span class="secno">6.4.6 </span>The <code>CSSMediaRule</code> Interface</h4>
17301745

17311746
<p>The <code>CSSMediaRule</code> interface represents a <code>@media</code> rule.</p>
17321747
<pre class="idl"><span class="idlInterface" id="widl-def-CSSMediaRule">interface <span class="idlInterfaceID">CSSMediaRule</span> : <span class="idlSuperclass"><a class="idlType" href="#widl-def-CSSRule"><code>CSSRule</code></a></span> {
@@ -1759,7 +1774,7 @@ <h4 id="the-cssmediarule-interface"><span class="secno">6.4.5 </span>The <code>C
17591774

17601775
<!-- ........................................................................................................................ -->
17611776

1762-
<h4 id="the-cssfontfacerule-interface"><span class="secno">6.4.6 </span>The <code>CSSFontFaceRule</code> Interface</h4>
1777+
<h4 id="the-cssfontfacerule-interface"><span class="secno">6.4.7 </span>The <code>CSSFontFaceRule</code> Interface</h4>
17631778

17641779
<p>The <code>CSSFontFaceRule</code> interface represents a <code>@font-face</code> rule.</p>
17651780
<pre class="idl"><span class="idlInterface" id="widl-def-CSSFontFaceRule">interface <span class="idlInterfaceID">CSSFontFaceRule</span> : <span class="idlSuperclass"><a class="idlType" href="#widl-def-CSSRule"><code>CSSRule</code></a></span> {
@@ -1775,7 +1790,7 @@ <h4 id="the-cssfontfacerule-interface"><span class="secno">6.4.6 </span>The <cod
17751790

17761791
<!-- ........................................................................................................................ -->
17771792

1778-
<h4 id="the-csspagerule-interface"><span class="secno">6.4.7 </span>The <code>CSSPageRule</code> Interface</h4>
1793+
<h4 id="the-csspagerule-interface"><span class="secno">6.4.8 </span>The <code>CSSPageRule</code> Interface</h4>
17791794

17801795
<p>The <code>CSSPageRule</code> interface represents a <code>@page</code> rule.</p> <p class="note">Need to define the rules for <dfn id="parse-a-css-page-selector">parse a CSS page selector</dfn> and <dfn id="serialize-a-css-page-selector">serialize a CSS page selector</dfn>.</p>
17811796
<pre class="idl"><span class="idlInterface" id="widl-def-CSSPageRule">interface <span class="idlInterfaceID">CSSPageRule</span> : <span class="idlSuperclass"><a class="idlType" href="#widl-def-CSSRule"><code>CSSRule</code></a></span> {
@@ -1796,7 +1811,7 @@ <h4 id="the-csspagerule-interface"><span class="secno">6.4.7 </span>The <code>CS
17961811

17971812
<!-- ........................................................................................................................ -->
17981813

1799-
<h4 id="the-cssnamespacerule-interface"><span class="secno">6.4.8 </span>The <code>CSSNamespaceRule</code> Interface</h4>
1814+
<h4 id="the-cssnamespacerule-interface"><span class="secno">6.4.9 </span>The <code>CSSNamespaceRule</code> Interface</h4>
18001815

18011816
<p>The <code>CSSNamespaceRule</code> interface represents a <code>@namespace</code> rule.</p>
18021817
<pre class="idl"><span class="idlInterface" id="widl-def-CSSNamespaceRule">interface <span class="idlInterfaceID">CSSNamespaceRule</span> : <span class="idlSuperclass"><a class="idlType" href="#widl-def-CSSRule"><code>CSSRule</code></a></span> {

cssom/cssom-source

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,10 @@
12971297

12981298
<dl class="switch">
12991299
<dt><code>CSSStyleRule</code></dt>
1300-
<dd class="issue">...</dd>
1300+
<dd><p class="issue">...</p></dd>
1301+
1302+
<dt><code>CSSCharsetRule</code></dt>
1303+
<dd><p class="issue">...</p></dd>
13011304

13021305
<dt><code>CSSImportRule</code></dt>
13031306
<dd>
@@ -1316,13 +1319,13 @@
13161319
</dd>
13171320

13181321
<dt><code>CSSMediaRule</code></dt>
1319-
<dd class="issue">...</dd>
1322+
<dd><p class="issue">...</p></dd>
13201323

13211324
<dt><code>CSSFontFaceRule</code></dt>
1322-
<dd class="issue">...</dd>
1325+
<dd><p class="issue">...</p></dd>
13231326

13241327
<dt><code>CSSPageRule</code></dt>
1325-
<dd class="issue">...</dd>
1328+
<dd><p class="issue">...</p></dd>
13261329

13271330
<dt><code>CSSNamespaceRule</code></dt>
13281331
<dd><p>The literal string "<code>@namespace</code>", followed by a space
@@ -1397,6 +1400,12 @@
13971400

13981401
<!-- ........................................................................................................................ -->
13991402

1403+
<h4>The <code>CSSCharsetRule</code> Interface</h4>
1404+
1405+
<!--{@idl(CSSCharsetRule)}-->
1406+
1407+
<!-- ........................................................................................................................ -->
1408+
14001409
<h4>The <code>CSSImportRule</code> Interface</h4>
14011410

14021411
<!--{@idl(CSSImportRule)}-->

cssom/idl/CSSCharsetRule.idl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Documentation=
2+
"<p>The {@name} {@type} represents an <code>@charset</code> rule.</p>"
3+
]
4+
interface CSSCharsetRule : CSSRule {
5+
6+
[Documentation=
7+
"<p>The {@name} {@type} must return the encoding information specified by the <code>@charset</code> rule.</p>"
8+
]
9+
attribute DOMString encoding;
10+
11+
};

cssom/idl/CSSRule.idl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
// All members defined since DOM-2 Style. The only differences are:
33
//
44
// 1. removal of UNKNOWN_RULE = 0 constant
5-
// 2. removal of CHARSET_RULE = 2 constant
6-
// 3. addition of NAMESPACE_RULE = 10 constant
7-
// 4. removal of commented raises(DOMException) on setting cssText
5+
// 2. addition of NAMESPACE_RULE = 10 constant
6+
// 3. removal of commented raises(DOMException) on setting cssText
87
//
98

109
[Documentation=
@@ -20,6 +19,12 @@ interface CSSRule {
2019
]
2120
const unsigned short STYLE_RULE = 1;
2221

22+
[Documentation=
23+
"<p>When the value of the <code>type</code> attribute is {@name}, then the object that implements\
24+
this interface must implement the <code>CSSCharsetRule</code> interface.</p>"
25+
]
26+
const unsigned short CHARSET_RULE = 2;
27+
2328
[Documentation=
2429
"<p>When the value of the <code>type</code> attribute is {@name}, then the object that implements\
2530
this interface must implement the <code>CSSImportRule</code> interface.</p>"

cssom/idl/MediaList.idl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
[Documentation=
1010
"<p>An object that implements the {@link} {@type} has an associated <dfn>collection of media queries</dfn>.</p>",
1111
[ Documentation=
12-
"<p>To <dfn id='create-a-medialist-object'>create a <code>MediaList</code> object</dfn> from a string <var>s</var>, run these steps:</p>\
12+
"<p>To <dfn id='create-a-medialist-object'>create a <code>MediaList</code> object</dfn> from a string <var>text</var>, run these steps:</p>\
1313
<ol>\
1414
<li><p>Create a new {@name} object.</p></li>\
15-
<li><p>Set its <span title='dom-MediaList-mediaText'>mediaText</span> attribute to <var>s</var>.</p></li>\
15+
<li><p>Set its <span title='dom-MediaList-mediaText'>mediaText</span> attribute to <var>text</var>.</p></li>\
1616
<li><p>Return the newly created <code>{@name}</code> object.</p></li>\
1717
</ol>"
1818
]
19-
Constructor
19+
Constructor(DOMString text)
2020
]
2121
interface MediaList {
2222

0 commit comments

Comments
 (0)