Mon, 16 Jul 2012 00:55:13 -0600
Transition to new IDL pre-processor.
1.1 --- a/cssom/Makefile Fri Jul 13 15:10:13 2012 -0700 1.2 +++ b/cssom/Makefile Mon Jul 16 00:55:13 2012 -0600 1.3 @@ -1,6 +1,7 @@ 1.4 1.5 ANOLIS = anolis 1.6 PYTHON = python 1.7 +NODE = node 1.8 1.9 XREFS = data/xrefs/css/cssom.json 1.10 EDFILE = Overview.html 1.11 @@ -8,8 +9,8 @@ 1.12 1.13 all: $(EDFILE) 1.14 1.15 -Overview.src.html: cssom-source cssom-generate.py 1.16 - $(PYTHON) cssom-generate.py 1.17 +Overview.src.html: cssom-generate.js idl/cssom.json cssom-source 1.18 + $(NODE) cssom-generate.js > $@ 1.19 1.20 $(XREFS): Overview.src.html Makefile 1.21 $(ANOLIS) --dump-xrefs=$@ $< /tmp/spec; $(RM) /tmp/spec
2.1 --- a/cssom/Overview.html Fri Jul 13 15:10:13 2012 -0700 2.2 +++ b/cssom/Overview.html Mon Jul 16 00:55:13 2012 -0600 2.3 @@ -1,23 +1,7 @@ 2.4 <!DOCTYPE html><html lang="en-US"><head> 2.5 <meta charset="utf-8"> 2.6 <title>CSS Object Model (CSSOM)</title> 2.7 - <style type="text/css"> 2.8 - pre.idl { border:solid thin; background:#eee; color:#000; padding:0.5em } 2.9 - pre.idl :link, pre.idl :visited { color:inherit; background:transparent } 2.10 - dfn { font-weight:bold; font-style:normal } 2.11 - .example { margin-left:1em; padding-left:1em; border-left:double; color:#222; background:#fcfcfc } 2.12 - .example table code { color:inherit } 2.13 - td, th { padding:.1em } 2.14 - .note { margin-left:2em; color:green; font-style:italic; font-weight:bold } 2.15 - p.note::before { content:"Note: " } 2.16 - .XXX { padding:.5em; border:solid red } 2.17 - p.XXX::before { content:"Issue: " } 2.18 - dl.switch { padding-left:2em } 2.19 - dl.switch > dt { text-indent:-1.5em } 2.20 - dl.switch > dt:before { content:'\21AA'; padding:0 0.5em 0 0; display:inline-block; width:1em; text-align:right; line-height:0.5em } 2.21 - code { color:orangered } 2.22 - code :link, code :visited { color:inherit } 2.23 - </style> 2.24 + <link href="cssom.css" rel="stylesheet"> 2.25 <link href="http://www.w3.org/StyleSheets/TR/W3C-ED" rel="stylesheet"> 2.26 </head> 2.27 <body class="draft"> 2.28 @@ -27,18 +11,23 @@ 2.29 <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p> 2.30 <!--end-logo--> 2.31 2.32 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.33 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.34 + 2.35 <h1 id="cssom">CSS Object Model (CSSOM)</h1> 2.36 2.37 - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 14 March 2012</h2> 2.38 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.39 + 2.40 + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 16 July 2012</h2> 2.41 2.42 <dl> 2.43 2.44 <dt>This Version:</dt> 2.45 <dd class="dontpublish"><a href="http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html">http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html</a></dd> 2.46 <dt class="dontpublish">Participate:</dt> 2.47 - <dd class="dontpublish"><a href="mailto:www-style@w3.org?subject==%5Bcssom%5D%20">www-style@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-style/">archives</a>) 2.48 - <dd class="dontpublish"><a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=CSS&component=CSSOM">File a bug</a> 2.49 - <dd class="dontpublish"><a href="http://wiki.whatwg.org/wiki/IRC">IRC: #css on Freenode</a> 2.50 + <dd class="dontpublish"><a href="mailto:www-style@w3.org?subject==%5Bcssom%5D%20">www-style@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-style/">archives</a>)</dd> 2.51 + <dd class="dontpublish"><a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=CSS&component=CSSOM">File a bug</a></dd> 2.52 + <dd class="dontpublish"><a href="http://wiki.whatwg.org/wiki/IRC">IRC: #css on Freenode</a></dd> 2.53 2.54 <dt class="dontpublish">Previous Version:</dt> 2.55 <dd class="dontpublish"><a href="http://www.w3.org/TR/2011/WD-cssom-20110712/">http://www.w3.org/TR/2011/WD-cssom-20110712/</a></dd> 2.56 @@ -48,7 +37,7 @@ 2.57 <dd><a href="http://www.w3.org/wiki/User:Gadams">Glenn Adams</a> 2.58 (<a href="http://www.cox.com/">Cox Communications, Inc.</a>) 2.59 <<a href="mailto:glenn.adams@cox.com">glenn.adams@cox.com</a>></dd> 2.60 - <dd><a href="">Shane Stephens</a> 2.61 + <dd><a>Shane Stephens</a> 2.62 (<a href="http://www.google.com/">Google, Inc.</a>) 2.63 <<a href="mailto:shans@google.com">shans@google.com</a>></dd> 2.64 2.65 @@ -61,18 +50,22 @@ 2.66 <p class="dontpublish copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/80x15.png"></a> 2.67 To the extent possible under law, the editors have waived all copyright and 2.68 related or neighboring rights to this work. In addition, as of 2.69 - 14 March 2012, the editors have made this specification available 2.70 + 16 July 2012, the editors have made this specification available 2.71 under the <a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open 2.72 Web Foundation Agreement, Version 1.0</a>.</p> 2.73 </div> 2.74 2.75 <hr class="top"> 2.76 2.77 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.78 + 2.79 <h2 class="no-num no-toc" id="abstract">Abstract</h2> 2.80 2.81 <p>CSSOM defines APIs (including generic parsing and serialization rules) 2.82 for Media Queries, Selectors, and of course CSS itself.</p> 2.83 2.84 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.85 + 2.86 <h2 class="no-num no-toc" id="sotd">Status of this Document</h2> 2.87 2.88 <p><em>This section describes the status of this document at the time of 2.89 @@ -81,13 +74,13 @@ 2.90 can be found in the 2.91 <a href="http://www.w3.org/TR/">W3C technical reports index at http://www.w3.org/TR/.</a></em> 2.92 2.93 - <p>This is the 14 March 2012 Editor's Draft of CSSOM. Please send 2.94 + <p>This is the 16 July 2012 Editor's Draft of CSSOM. Please send 2.95 comments to 2.96 <a href="mailto:www-style@w3.org?subject=%5Bcssom%5D%20">www-style@w3.org</a> 2.97 (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) 2.98 with <samp>[cssom]</samp> at the start of the subject line. 2.99 2.100 - <p>This is the 14 March 2012 First Public Working Draft of CSSOM, produced by the 2.101 + <p>This is the 16 July 2012 First Public Working Draft of CSSOM, produced by the 2.102 <a href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part 2.103 of the <a href="http://www.w3.org/Style/">Style Activity</a>). 2.104 <!--XXX remove "First Public" after initial publication --> 2.105 @@ -108,6 +101,8 @@ 2.106 obsoleted by other documents at any time. It is inappropriate to cite this 2.107 document as other than work in progress.</p> 2.108 2.109 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.110 + 2.111 <h2 class="no-num no-toc" id="toc">Table of Contents</h2> 2.112 2.113 2.114 @@ -127,8 +122,7 @@ 2.115 <ol class="toc"> 2.116 <li><a href="#serializing-media-feature-values"><span class="secno">4.2.1 </span>Serializing Media Feature Values</a></ol></li> 2.117 <li><a href="#comparing-media-queries"><span class="secno">4.3 </span>Comparing Media Queries</a></li> 2.118 - <li><a href="#the-medialist-interface"><span class="secno">4.4 </span>The <code title="">MediaList</code> Interface</a></li> 2.119 - <li><a href="#creating-a-medialist-object"><span class="secno">4.5 </span>Creating a <code title="">MediaList</code> Object</a></ol></li> 2.120 + <li><a href="#the-medialist-interface"><span class="secno">4.4 </span>The <code>MediaList</code> Interface</a></ol></li> 2.121 <li><a href="#selectors"><span class="secno">5 </span>Selectors</a> 2.122 <ol class="toc"> 2.123 <li><a href="#parsing-selectors"><span class="secno">5.1 </span>Parsing Selectors</a></li> 2.124 @@ -137,38 +131,38 @@ 2.125 <ol class="toc"> 2.126 <li><a href="#style-sheet-0"><span class="secno">6.1 </span>Style Sheet</a> 2.127 <ol class="toc"> 2.128 - <li><a href="#the-stylesheet-interface"><span class="secno">6.1.1 </span>The <code title="">StyleSheet</code> Interface</a></li> 2.129 - <li><a href="#the-cssstylesheet-interface"><span class="secno">6.1.2 </span>The <code title="">CSSStyleSheet</code> Interface</a></ol></li> 2.130 + <li><a href="#the-stylesheet-interface"><span class="secno">6.1.1 </span>The <code>StyleSheet</code> Interface</a></li> 2.131 + <li><a href="#the-cssstylesheet-interface"><span class="secno">6.1.2 </span>The <code>CSSStyleSheet</code> Interface</a></ol></li> 2.132 <li><a href="#style-sheet-collections"><span class="secno">6.2 </span>Style Sheet Collections</a> 2.133 <ol class="toc"> 2.134 - <li><a href="#the-http-default-style-header"><span class="secno">6.2.1 </span>The HTTP <code title="">Default-Style</code> Header</a></li> 2.135 - <li><a href="#the-stylesheetlist-sequence"><span class="secno">6.2.2 </span>The <code title="">StyleSheetList</code> Sequence</a></li> 2.136 - <li><a href="#extensions-to-the-document-interface"><span class="secno">6.2.3 </span>Extensions to the <code title="">Document</code> Interface</a></li> 2.137 + <li><a href="#the-http-default-style-header"><span class="secno">6.2.1 </span>The HTTP <code>Default-Style</code> Header</a></li> 2.138 + <li><a href="#the-stylesheetlist-sequence"><span class="secno">6.2.2 </span>The <code>StyleSheetList</code> Sequence</a></li> 2.139 + <li><a href="#extensions-to-the-document-interface"><span class="secno">6.2.3 </span>Extensions to the <code>Document</code> Interface</a></li> 2.140 <li><a href="#interaction-with-the-user-interface"><span class="secno">6.2.4 </span>Interaction with the User Interface</a> 2.141 <ol class="toc"> 2.142 <li><a href="#persisting-the-selected-style-sheet-set"><span class="secno">6.2.4.1 </span>Persisting the selected style sheet set</a></ol></li> 2.143 <li><a href="#examples"><span class="secno">6.2.5 </span>Examples</a></ol></li> 2.144 <li><a href="#style-sheet-association"><span class="secno">6.3 </span>Style Sheet Association</a> 2.145 <ol class="toc"> 2.146 - <li><a href="#the-linkstyle-interface"><span class="secno">6.3.1 </span>The <code title="">LinkStyle</code> Interface</a></li> 2.147 + <li><a href="#the-linkstyle-interface"><span class="secno">6.3.1 </span>The <code>LinkStyle</code> Interface</a></li> 2.148 <li><a href="#requirements-on-specifications"><span class="secno">6.3.2 </span>Requirements on specifications</a></li> 2.149 <li><a href="#requirements-on-user-agents-implementing-the-xml-stylesheet-processing-instruction"><span class="secno">6.3.3 </span>Requirements on User Agents Implementing the 2.150 - <span title=""><code>xml-stylesheet</code> processing instruction</span></a></li> 2.151 + <span><code>xml-stylesheet</code> processing instruction</span></a></li> 2.152 <li><a href="#requirements-on-user-agents-implementing-the-http-link-header"><span class="secno">6.3.4 </span>Requirements on User Agents Implementing the HTTP 2.153 - <code title="">Link</code> Header</a></ol></li> 2.154 + <code>Link</code> Header</a></ol></li> 2.155 <li><a href="#css-rules"><span class="secno">6.4 </span>CSS Rules</a> 2.156 <ol class="toc"> 2.157 - <li><a href="#the-cssrulelist-sequence"><span class="secno">6.4.1 </span>The <code title="">CSSRuleList</code> Sequence</a></li> 2.158 - <li><a href="#the-cssrule-interface"><span class="secno">6.4.2 </span>The <code title="">CSSRule</code> Interface</a></li> 2.159 - <li><a href="#css-style-rule-rule-set"><span class="secno">6.4.3 </span>CSS Style Rule (Rule Set)</a></li> 2.160 - <li><a href="#css-import-rule"><span class="secno">6.4.4 </span>CSS <code title="">@import</code> Rule</a></li> 2.161 - <li><a href="#css-media-rule"><span class="secno">6.4.5 </span>CSS <code title="">@media</code> Rule</a></li> 2.162 - <li><a href="#css-font-face-rule"><span class="secno">6.4.6 </span>CSS <code title="">@font-face</code> Rule</a></li> 2.163 - <li><a href="#css-page-rule"><span class="secno">6.4.7 </span>CSS <code title="">@page</code> Rule</a></li> 2.164 - <li><a href="#css-namespace-rule"><span class="secno">6.4.8 </span>CSS <code title="">@namespace</code> Rule</a></ol></li> 2.165 + <li><a href="#the-cssrulelist-sequence"><span class="secno">6.4.1 </span>The <code>CSSRuleList</code> Sequence</a></li> 2.166 + <li><a href="#the-cssrule-interface"><span class="secno">6.4.2 </span>The <code>CSSRule</code> Interface</a></li> 2.167 + <li><a href="#the-cssstylerule-interface"><span class="secno">6.4.3 </span>The <code>CSSStyleRule</code> Interface</a></li> 2.168 + <li><a href="#the-cssimportrule-interface"><span class="secno">6.4.4 </span>The <code>CSSImportRule</code> Interface</a></li> 2.169 + <li><a href="#the-cssmediarule-interface"><span class="secno">6.4.5 </span>The <code>CSSMediaRule</code> Interface</a></li> 2.170 + <li><a href="#the-cssfontfacerule-interface"><span class="secno">6.4.6 </span>The <code>CSSFontFaceRule</code> Interface</a></li> 2.171 + <li><a href="#the-csspagerule-interface"><span class="secno">6.4.7 </span>The <code>CSSPageRule</code> Interface</a></li> 2.172 + <li><a href="#the-cssnamespacerule-interface"><span class="secno">6.4.8 </span>The <code>CSSNamespaceRule</code> Interface</a></ol></li> 2.173 <li><a href="#css-declaration-blocks"><span class="secno">6.5 </span>CSS Declaration Blocks</a> 2.174 <ol class="toc"> 2.175 - <li><a href="#the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The <code title="">CSSStyleDeclaration</code> Interface</a></ol></li> 2.176 + <li><a href="#the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The <code>CSSStyleDeclaration</code> Interface</a></ol></li> 2.177 <li><a href="#css-values"><span class="secno">6.6 </span>CSS Values</a> 2.178 <ol class="toc"> 2.179 <li><a href="#parsing-css-values"><span class="secno">6.6.1 </span>Parsing CSS Values</a></li> 2.180 @@ -178,7 +172,7 @@ 2.181 <li><a href="#dom-access-to-css-declaration-blocks"><span class="secno">7 </span>DOM Access to CSS Declaration Blocks</a> 2.182 <ol class="toc"> 2.183 <li><a href="#the-elementcssinlinestyle-interface"><span class="secno">7.1 </span>The <code>ElementCSSInlineStyle</code> Interface</a></li> 2.184 - <li><a href="#extensions-to-the-window-interface"><span class="secno">7.2 </span>Extensions to the <code title="">Window</code> Interface</a></ol></li> 2.185 + <li><a href="#extensions-to-the-window-interface"><span class="secno">7.2 </span>Extensions to the <code>Window</code> Interface</a></ol></li> 2.186 <li><a href="#resolved-values"><span class="secno">8 </span>Resolved Values</a></li> 2.187 <li><a href="#iana-considerations"><span class="secno">9 </span>IANA Considerations</a> 2.188 <ol class="toc"> 2.189 @@ -190,10 +184,15 @@ 2.190 <li><a class="no-num" href="#acknowledgments">Acknowledgments</a></ol> 2.191 <!--end-toc--> 2.192 2.193 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.194 + 2.195 <h2 id="introduction"><span class="secno">1 </span>Introduction</h2> 2.196 2.197 <p class="XXX">...</p> 2.198 2.199 + <!-- ........................................................................................................................ --> 2.200 + <!-- ........................................................................................................................ --> 2.201 + 2.202 <h3 id="history"><span class="secno">1.1 </span>History</h3> 2.203 2.204 <p>Several interfaces from DOM Level 2 Style 2.205 @@ -203,65 +202,69 @@ 2.206 <code>DOMImplementationCSS</code> and <code>CSSCharsetRule</code> have 2.207 been removed as well as they were not deemed necessary.</p> 2.208 2.209 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.210 2.211 <h2 id="conformance"><span class="secno">2 </span>Conformance</h2> 2.212 2.213 -<p>All diagrams, examples, and notes in this specification are 2.214 -non-normative, as are all sections explicitly marked non-normative. 2.215 -Everything else in this specification is normative. 2.216 - 2.217 -<p>The key words "MUST", "MUST NOT", "REQUIRED", <!--"SHALL", "SHALL 2.218 -NOT",--> "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 2.219 -"OPTIONAL" in the normative parts of this document are to be 2.220 -interpreted as described in RFC2119. For readability, these words do 2.221 -not appear in all uppercase letters in this specification. 2.222 -<a href="#refsRFC2119">[RFC2119]</a> 2.223 - 2.224 -<p>Requirements phrased in the imperative as part of algorithms 2.225 -(such as "strip any leading space characters" or "return false and 2.226 -terminate these steps") are to be interpreted with the meaning of the 2.227 -key word ("must", "should", "may", etc) used in introducing the 2.228 -algorithm. 2.229 - 2.230 -<p>Conformance requirements phrased as algorithms or specific steps 2.231 -may be implemented in any manner, so long as the end result is 2.232 -equivalent. (In particular, the algorithms defined in this 2.233 -specification are intended to be easy to follow, and not intended to 2.234 -be performant.) 2.235 - 2.236 -<p id="hardwareLimitations">User agents may impose 2.237 -implementation-specific limits on otherwise unconstrained inputs, 2.238 -e.g. to prevent denial of service attacks, to guard against running 2.239 -out of memory, or to work around platform-specific limitations. 2.240 - 2.241 -<p>When a method or an attribute is said to call another method or attribute, the user agent must invoke its internal API for that attribute or method so that e.g. the author can't change the behavior by overriding attributes or methods with custom properties or functions in ECMAScript. 2.242 - 2.243 -<p>Unless otherwise stated, string comparisons are done in a 2.244 -<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#case-sensitive">case-sensitive</a> manner. 2.245 - 2.246 - 2.247 -<h2 id="terminology"><span class="secno">3 </span>Terminology</h2> 2.248 - 2.249 -<p>Terminology used in this specification is from 2.250 -<cite>DOM4</cite>, 2.251 -<cite>HTML</cite>, 2.252 -<cite>Associating Style Sheets with XML documents</cite> 2.253 -and 2.254 -<cite>XML</cite> 2.255 -<a href="#refsDOM">[DOM]</a> 2.256 -<a href="#refsHTML">[HTML]</a> 2.257 -<a href="#refsXMLSS">[XMLSS]</a> 2.258 -<a href="#refsXML">[XML]</a> 2.259 - 2.260 -<p class="XXX"><dfn id="supported-styling-language">supported styling language</dfn> 2.261 - 2.262 -<p>When this specification talks about object 2.263 -<code title=""><var>A</var></code> where <code title=""><var>A</var></code> is actually an interface, it generally means an object implementing interface 2.264 -<code title=""><var>A</var></code>.</p> 2.265 - 2.266 -<p>The term <dfn id="whitespace">whitespace</dfn> is used as defined in CSS. 2.267 -<!--XXX <a href="#ref-css">[CSS]</a>--></p> 2.268 - 2.269 + <p>All diagrams, examples, and notes in this specification are 2.270 + non-normative, as are all sections explicitly marked non-normative. 2.271 + Everything else in this specification is normative. 2.272 + 2.273 + <p>The key words "MUST", "MUST NOT", "REQUIRED", <!--"SHALL", "SHALL 2.274 + NOT",--> "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 2.275 + "OPTIONAL" in the normative parts of this document are to be 2.276 + interpreted as described in RFC2119. For readability, these words do 2.277 + not appear in all uppercase letters in this specification. 2.278 + <a href="#refsRFC2119">[RFC2119]</a> 2.279 + 2.280 + <p>Requirements phrased in the imperative as part of algorithms 2.281 + (such as "strip any leading space characters" or "return false and 2.282 + terminate these steps") are to be interpreted with the meaning of the 2.283 + key word ("must", "should", "may", etc) used in introducing the 2.284 + algorithm. 2.285 + 2.286 + <p>Conformance requirements phrased as algorithms or specific steps 2.287 + may be implemented in any manner, so long as the end result is 2.288 + equivalent. (In particular, the algorithms defined in this 2.289 + specification are intended to be easy to follow, and not intended to 2.290 + be performant.) 2.291 + 2.292 + <p id="hardwareLimitations">User agents may impose 2.293 + implementation-specific limits on otherwise unconstrained inputs, 2.294 + e.g. to prevent denial of service attacks, to guard against running 2.295 + out of memory, or to work around platform-specific limitations. 2.296 + 2.297 + <p>When a method or an attribute is said to call another method or attribute, the user agent must invoke its internal API for that attribute or method so that e.g. the author can't change the behavior by overriding attributes or methods with custom properties or functions in ECMAScript. 2.298 + 2.299 + <p>Unless otherwise stated, string comparisons are done in a 2.300 + <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#case-sensitive">case-sensitive</a> manner. 2.301 + 2.302 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.303 + 2.304 + <h2 id="terminology"><span class="secno">3 </span>Terminology</h2> 2.305 + 2.306 + <p>Terminology used in this specification is from 2.307 + <cite>DOM4</cite>, 2.308 + <cite>HTML</cite>, 2.309 + <cite>Associating Style Sheets with XML documents</cite> 2.310 + and 2.311 + <cite>XML</cite> 2.312 + <a href="#refsDOM">[DOM]</a> 2.313 + <a href="#refsHTML">[HTML]</a> 2.314 + <a href="#refsXMLSS">[XMLSS]</a> 2.315 + <a href="#refsXML">[XML]</a> 2.316 + 2.317 + <p class="XXX"><dfn id="supported-styling-language">supported styling language</dfn> 2.318 + 2.319 + <p>When this specification talks about object 2.320 + <code><var>A</var></code> where <code><var>A</var></code> is actually an interface, it generally means an object implementing interface 2.321 + <code><var>A</var></code>.</p> 2.322 + 2.323 + <p>The term <dfn id="whitespace">whitespace</dfn> is used as defined in CSS. 2.324 + <!--XXX <a href="#ref-css">[CSS]</a>--></p> 2.325 + 2.326 + <!-- ........................................................................................................................ --> 2.327 + <!-- ........................................................................................................................ --> 2.328 2.329 <h3 id="common-serializing-idioms"><span class="secno">3.1 </span>Common Serializing Idioms</h3> 2.330 2.331 @@ -280,10 +283,10 @@ 2.332 <ul> 2.333 <li>If the character is in the range U+0000 to U+001F or U+007F to 2.334 U+009F, the character 2.335 - <a href="#serialize-a-character-as-code-point" title="serialize a character as code point">escaped as code point</a>. 2.336 + <a href="#serialize-a-character-as-code-point" title="serialize a character as code point">escaped as code point</a>.</li> 2.337 <li>If the character is the first character and is in the range 0-9 2.338 (U+0030 to U+0039), the character 2.339 - <a href="#serialize-a-character-as-code-point" title="serialize a character as code point">escaped as code point</a>. 2.340 + <a href="#serialize-a-character-as-code-point" title="serialize a character as code point">escaped as code point</a>.</li> 2.341 <li>If the character is the second character and is in the range 0-9 2.342 (U+0030 to U+0039) and the first character is a "<code>-</code>" 2.343 (U+002D), the character 2.344 @@ -308,7 +311,7 @@ 2.345 <ul> 2.346 <li>If the character is in the range U+0000 to U+001F or U+007F to 2.347 U+009F, the character 2.348 - <a href="#serialize-a-character-as-code-point" title="serialize a character as code point">escaped as code point</a>. 2.349 + <a href="#serialize-a-character-as-code-point" title="serialize a character as code point">escaped as code point</a>.</li> 2.350 <li>If the character is '<code>"</code>' (U+0022) or '<code>\</code>' 2.351 (U+005C), the <a href="#serialize-a-character" title="serialize a character">escaped</a> character.</li> 2.352 <li>Otherwise, the character itself.</li> 2.353 @@ -318,7 +321,7 @@ 2.354 are always serialized with '<code>"</code>' (U+0022).</p> 2.355 2.356 <p>To <dfn id="serialize-a-url">serialize a URL</dfn> means to create a string represented by 2.357 - "<code title="">url(</code>", followed by the 2.358 + "<code>url(</code>", followed by the 2.359 <a href="#serialize-a-string" title="serialize a string">string escaped</a> value of the given 2.360 string, followed by "<code>)</code>".</p> 2.361 2.362 @@ -329,6 +332,7 @@ 2.363 <p>To <dfn id="serialize-a-whitespace-separated-list">serialize a whitespace-separated list</dfn> concatenate all 2.364 items of the list in list order while separating them a space (U+0020).</p> 2.365 2.366 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.367 2.368 <h2 id="media-queries"><span class="secno">4 </span>Media Queries</h2> 2.369 2.370 @@ -338,27 +342,31 @@ 2.371 2.372 <!-- XXX ref --> 2.373 2.374 + <!-- ........................................................................................................................ --> 2.375 + <!-- ........................................................................................................................ --> 2.376 + 2.377 <h3 id="parsing-media-queries"><span class="secno">4.1 </span>Parsing Media Queries</h3> 2.378 2.379 <p>To 2.380 <dfn id="parse-a-media-query-list">parse a media query list</dfn> for a 2.381 - given string <var title="">s</var> into a media query list is defined in 2.382 + given string <var>s</var> into a media query list is defined in 2.383 the Media Queries specification. Return the list of one or more media 2.384 queries that the algorithm defined there gives.</p> <!-- XXX ref --> 2.385 2.386 <p class="note">A media query that ends up being "ignored" will turn 2.387 - into "<code title="">not all</code>".</p> 2.388 + into "<code>not all</code>".</p> 2.389 2.390 <p>To 2.391 <dfn id="parse-a-media-query">parse a media query</dfn> for a given string 2.392 - <var title="">s</var> means to follow the 2.393 + <var>s</var> means to follow the 2.394 <a href="#parse-a-media-query-list">parse a media query list</a> steps and return null if more 2.395 than one media query is returned or a media query if a 2.396 single media query is returned.</p> 2.397 2.398 <p class="note">Again, a media query that ends up being "ignored" will 2.399 - turn into "<code title="">not all</code>".</p> 2.400 - 2.401 + turn into "<code>not all</code>".</p> 2.402 + 2.403 + <!-- ........................................................................................................................ --> 2.404 2.405 <h3 id="serializing-media-queries"><span class="secno">4.2 </span>Serializing Media Queries</h3> 2.406 2.407 @@ -379,25 +387,25 @@ 2.408 2.409 <p>To 2.410 <dfn id="serialize-a-media-query">serialize a media query</dfn> let 2.411 - <var title="">s</var> be the empty string, run the steps below, and 2.412 - finally return <var title="">s</var>:</p> 2.413 + <var>s</var> be the empty string, run the steps below, and 2.414 + finally return <var>s</var>:</p> 2.415 2.416 <ol> 2.417 <li><p>If the media query is negated append "<code>not</code>", followed 2.418 - by a space (U+0020), to <var title="">s</var>.</li> 2.419 - 2.420 - <li><p>Let <var title="">type</var> be the media type of the media query, 2.421 + by a space (U+0020), to <var>s</var>.</li> 2.422 + 2.423 + <li><p>Let <var>type</var> be the media type of the media query, 2.424 <a href="#serialize-an-identifier" title="serialize an identifier">escaped</a> and 2.425 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#converted-to-ascii-lowercase">converted to ASCII lowercase</a>.</li> 2.426 2.427 <li><p>If the media query does not contain media features append 2.428 - <var title="">type</var>, to <var title="">s</var>, 2.429 - then return <var title="">s</var> and terminate this algorithm.</li> 2.430 - 2.431 - <li><p>If <var title="">type</var> is not "<code>all</code>" or if the 2.432 - media query is negated append <var title="">type</var>, followed by a 2.433 + <var>type</var>, to <var>s</var>, 2.434 + then return <var>s</var> and terminate this algorithm.</li> 2.435 + 2.436 + <li><p>If <var>type</var> is not "<code>all</code>" or if the 2.437 + media query is negated append <var>type</var>, followed by a 2.438 space (U+0020), followed by "<code>and</code>", followed by a space 2.439 - (U+0020), to <var title="">s</var>.</li> 2.440 + (U+0020), to <var>s</var>.</li> 2.441 2.442 <li><p>Sort the media features in lexicographical order.</li> 2.443 2.444 @@ -407,19 +415,19 @@ 2.445 <ol> 2.446 <li>Append a "<code>(</code>" (U+0028), followed by the media feature 2.447 name, <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#converted-to-ascii-lowercase">converted to ASCII lowercase</a>, 2.448 - to <var title="">s</var>.<p></li> 2.449 + to <var>s</var>.<p></li> 2.450 2.451 <li><p>If a value is given append a "<code>:</code>" (U+003A), followed 2.452 by a space (U+0020), followed by the 2.453 <a href="#serialize-a-media-feature-value" title="serialize a media feature value">serialized media feature value</a>, 2.454 - to <var title="">s</var>.</p> 2.455 + to <var>s</var>.</li> 2.456 2.457 <li><p>Append a "<code>)</code>" (U+0029) to 2.458 - <var title="">s</var>.</li> 2.459 + <var>s</var>.</li> 2.460 2.461 <li><p>If this is not the last media feature append a space (U+0020), 2.462 followed by "<code>and</code>", followed by a space (U+0020), to 2.463 - <var title="">s</var>.</li> 2.464 + <var>s</var>.</li> 2.465 </ol> 2.466 </li> 2.467 </ol> 2.468 @@ -442,6 +450,8 @@ 2.469 </div> 2.470 2.471 2.472 + <!-- ........................................................................................................................ --> 2.473 + 2.474 <h4 id="serializing-media-feature-values"><span class="secno">4.2.1 </span>Serializing Media Feature Values</h4> 2.475 2.476 <p class="XXX">This should probably be done in terms of mapping it to 2.477 @@ -449,7 +459,7 @@ 2.478 values after all.</p> 2.479 2.480 <p>To <dfn id="serialize-a-media-feature-value">serialize a media feature value</dfn> 2.481 - named <var title="">v</var> locate <var title="">v</var> in the first 2.482 + named <var>v</var> locate <var>v</var> in the first 2.483 column of the table below and use the serialization format described in 2.484 the second column:</p> 2.485 2.486 @@ -458,171 +468,106 @@ 2.487 <th>Media Feature 2.488 <th>Serialization 2.489 <tr> 2.490 - <td><code title="">width</code> 2.491 + <td><code>width</code> 2.492 <td>... 2.493 <tr> 2.494 - <td><code title="">height</code> 2.495 + <td><code>height</code> 2.496 <td>... 2.497 <tr> 2.498 - <td><code title="">device-width</code> 2.499 + <td><code>device-width</code> 2.500 <td>... 2.501 <tr> 2.502 - <td><code title="">device-height</code> 2.503 + <td><code>device-height</code> 2.504 <td>... 2.505 <tr> 2.506 - <td><code title="">orientation</code> 2.507 + <td><code>orientation</code> 2.508 <td> 2.509 - <p>If the value is `<code title="">portrait</code>`: "<code title="">portrait</code>".</p> 2.510 - <p>If the value is `<code title="">landscape</code>`: "<code title="">landscape</code>".</p> 2.511 + <p>If the value is `<code>portrait</code>`: "<code>portrait</code>".</p> 2.512 + <p>If the value is `<code>landscape</code>`: "<code>landscape</code>".</p> 2.513 <tr> 2.514 - <td><code title="">aspect-ratio</code> 2.515 + <td><code>aspect-ratio</code> 2.516 <td>... 2.517 <tr> 2.518 - <td><code title="">device-aspect-ratio</code> 2.519 + <td><code>device-aspect-ratio</code> 2.520 <td>... 2.521 <tr> 2.522 - <td><code title="">color</code> 2.523 + <td><code>color</code> 2.524 <td>... 2.525 <tr> 2.526 - <td><code title="">color-index</code> 2.527 + <td><code>color-index</code> 2.528 <td>... 2.529 <tr> 2.530 - <td><code title="">monochrome</code> 2.531 + <td><code>monochrome</code> 2.532 <td>... 2.533 <tr> 2.534 - <td><code title="">resolution</code> 2.535 + <td><code>resolution</code> 2.536 <td>... 2.537 <tr> 2.538 - <td><code title="">scan</code> 2.539 + <td><code>scan</code> 2.540 <td> 2.541 - <p>If the value is `<code title="">progressive</code>`: "<code title="">progressive</code>".</p> 2.542 - <p>If the value is `<code title="">interlace</code>`: "<code title="">interlace</code>".</p> 2.543 + <p>If the value is `<code>progressive</code>`: "<code>progressive</code>".</p> 2.544 + <p>If the value is `<code>interlace</code>`: "<code>interlace</code>".</p> 2.545 <tr> 2.546 - <td><code title="">grid</code> 2.547 + <td><code>grid</code> 2.548 <td>... 2.549 </table> 2.550 2.551 <p>Other specifications can extend this table and vendor-prefixed media 2.552 features can have custom serialization formats as well.</p> 2.553 2.554 - 2.555 + <!-- ........................................................................................................................ --> 2.556 + <!-- ........................................................................................................................ --> 2.557 2.558 <h3 id="comparing-media-queries"><span class="secno">4.3 </span>Comparing Media Queries</h3> 2.559 2.560 <p>To 2.561 <dfn id="compare-media-queries">compare media queries</dfn> 2.562 - <var title="">m1</var> and <var title="">m2</var> means to 2.563 + <var>m1</var> and <var>m2</var> means to 2.564 <a href="#serialize-a-media-query" title="serialize a media query">serialize</a> them both and 2.565 return true if they are a 2.566 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#case-sensitive">case-sensitive</a> match and false if they 2.567 are not.</p> 2.568 2.569 - 2.570 - 2.571 - <h3 id="the-medialist-interface"><span class="secno">4.4 </span>The <code title="">MediaList</code> Interface</h3> 2.572 - 2.573 - <p>An object that implements the <code><a href="#medialist">MediaList</a></code> interface has an 2.574 - associated <dfn id="collection-of-media-queries">collection of media queries</dfn>.</p> 2.575 - 2.576 - <!-- http://dev.w3.org/2006/webapi/WebIDL/#idl-indexed-properties --> 2.577 - 2.578 - <pre class="idl">interface <dfn id="medialist">MediaList</dfn> { 2.579 - stringifier attribute DOMString <a href="#dom-medialist-mediatext" title="dom-MediaList-mediaText">mediaText</a>; 2.580 - readonly attribute unsigned long <a href="#dom-medialist-length" title="dom-MediaList-length">length</a>; 2.581 - getter DOMString <a href="#dom-medialist-item" title="dom-MediaList-item">item</a>(unsigned long <var title="">index</var>); 2.582 - void <a href="#dom-medialist-appendmedium" title="dom-MediaList-appendMedium">appendMedium</a>(DOMString <var title="">medium</var>); 2.583 - void <a href="#dom-medialist-deletemedium" title="dom-MediaList-deleteMedium">deleteMedium</a>(DOMString <var title="">medium</var>); 2.584 -};</pre> 2.585 - 2.586 - <p>The 2.587 - <dfn id="dom-medialist-mediatext" title="dom-MediaList-mediaText"><code>mediaText</code></dfn> 2.588 - attribute must return a 2.589 - <a href="#serialize-a-media-query-list" title="serialize a media query list">serialization</a> of 2.590 - the <a href="#collection-of-media-queries">collection of media queries</a>.</p> 2.591 - 2.592 - <p>Setting the <code title="dom-MediaList-mediaText"><a href="#dom-medialist-mediatext">mediaText</a></code> 2.593 - attribute must run these steps: 2.594 - 2.595 - <ol> 2.596 - <li><p>Empty the <a href="#collection-of-media-queries">collection of media queries</a>.</li> 2.597 - 2.598 - <li><p>If the given value is the empty string terminate these 2.599 - steps.</li> 2.600 - 2.601 - <li><p>Append all the media queries as a result of 2.602 - <a href="#parse-a-media-query-list" title="parse a media query list">parsing</a> the given 2.603 - value to the <a href="#collection-of-media-queries">collection of media queries</a>.</li> 2.604 - </ol> 2.605 - 2.606 - <p>The 2.607 - <dfn id="dom-medialist-length" title="dom-MediaList-length"><code>length</code></dfn> 2.608 - attribute must return the number of media queries in 2.609 - the <a href="#collection-of-media-queries">collection of media queries</a>.</p> 2.610 - 2.611 - <p>The 2.612 - <dfn id="dom-medialist-item" title="dom-MediaList-item"><code>item(<var title="">index</var>)</code></dfn> 2.613 - method must return the media query in the 2.614 - <a href="#collection-of-media-queries">collection of media queries</a> given by 2.615 - <var title="">index</var>, or null, if <var title="">index</var> is 2.616 - greater than or equal to the number of media queries in the 2.617 - <a href="#collection-of-media-queries">collection of media queries</a>.</p> 2.618 - <!-- XXX need consistency here WebIDL? list of media queries? --> 2.619 - 2.620 - <p>The 2.621 - <dfn id="dom-medialist-appendmedium" title="dom-MediaList-appendmedium"><code>appendMedium(<var title="">medium</var>)</code></dfn> 2.622 - method must run these steps:</p> 2.623 - 2.624 - <ol> 2.625 - <li><p>Let <var title="">m</var> be the result of 2.626 - <a href="#parse-a-media-query" title="parse a media query">parsing</a> the given 2.627 - value.</li> 2.628 - 2.629 - <li><p>If <var title="">m</var> is null terminate these steps.</li> 2.630 - 2.631 - <li><p>If <a href="#compare-media-queries" title="compare media queries">comparing</a> 2.632 - <var title="">m</var> with any of the media queries in the 2.633 - <a href="#collection-of-media-queries">collection of media queries</a> returns true terminate these 2.634 - steps.</li> 2.635 - 2.636 - <li><p>Append <var title="">m</var> to the 2.637 - <a href="#collection-of-media-queries">collection of media queries</a>.</li> 2.638 - </ol> 2.639 - 2.640 - <p>The 2.641 - <dfn id="dom-medialist-deletemedium" title="dom-MediaList-deletemedium"><code>deleteMedium(<var title="">medium</var>)</code></dfn> 2.642 - method must run these steps:</p> 2.643 - 2.644 - <ol> 2.645 - <li><p>Let <var title="">m</var> be the result of 2.646 - <a href="#parse-a-media-query" title="parse a media query">parsing</a> the given 2.647 - value.</li> 2.648 - 2.649 - <li><p>If <var title="">m</var> is null terminate these steps.</li> 2.650 - 2.651 - <li><p>Remove any media query from the 2.652 - <a href="#collection-of-media-queries">collection of media queries</a> for which 2.653 - <a href="#compare-media-queries" title="compare media queries">comparing</a> the media query with 2.654 - <var title="">m</var> returns true.</li> 2.655 - </ol> 2.656 - 2.657 - 2.658 - <h3 id="creating-a-medialist-object"><span class="secno">4.5 </span>Creating a <code title="">MediaList</code> Object</h3> 2.659 - 2.660 - <p>To 2.661 - <dfn id="create-a-medialist-object">create a <code>MediaList</code> object</dfn> 2.662 - from a string <var title="">s</var>, run these steps:</p> 2.663 - 2.664 - <ol> 2.665 - <li><p>Create a new <code><a href="#medialist">MediaList</a></code> object.</li> 2.666 - 2.667 - <li><p>Set its <a href="#dom-medialist-mediatext" title="dom-MediaList-mediaText">mediaText</a> 2.668 - attribute to <var title="">s</var>.</li> 2.669 - 2.670 - <li><p>Return the newly created <code><a href="#medialist">MediaList</a></code> object.</li> 2.671 - </ol> 2.672 - 2.673 - 2.674 - 2.675 + <!-- ........................................................................................................................ --> 2.676 + <!-- ........................................................................................................................ --> 2.677 + 2.678 + <h3 id="the-medialist-interface"><span class="secno">4.4 </span>The <code>MediaList</code> Interface</h3> 2.679 + 2.680 + <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> 2.681 +<pre class="idl"><span class="idlInterface" id="widl-def-MediaList">interface <span class="idlInterfaceID">MediaList</span> { 2.682 +<span class="idlAttribute"> stringifier attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MediaList-mediaText">mediaText</a></span>;</span> 2.683 +<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> 2.684 +<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-MediaList-item-DOMString-unsigned-long-index">item</a></span> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 2.685 +<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-MediaList-appendMedium-void-DOMString-medium">appendMedium</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">medium</span></span>);</span> 2.686 +<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> 2.687 +};</span></pre> 2.688 +<dl class="attributes"> 2.689 +<dt class="attribute"> 2.690 +<code>mediaText</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 2.691 +<dd> 2.692 +<p>The <code>mediaText</code> attribute must return a <a href="#serialize-a-media-query-list" title="serialize a media query list">serialization</a> of the <a href="#collection-of-media-queries">collection of media queries</a>.</p> <p>Setting the <code>mediaText</code> attribute must run these steps: <ol> <li><p>Empty the <a href="#collection-of-media-queries">collection of media queries</a>.</li> <li><p>If the given value is the empty string terminate these steps.</li> <li><p>Append all the media queries as a result of <a href="#parse-a-media-query-list" title="parse a media query list">parsing</a> the given value to the <a href="#collection-of-media-queries">collection of media queries</a>.</li> </ol></dd> 2.693 +<dt class="attribute"> 2.694 +<code>length</code> of type <span class="idlAttrType"><a>unsigned long</a></span>, readonly</dt> 2.695 +<dd> 2.696 +<p>The <code>length</code> attribute must return the number of media queries in the <a href="#collection-of-media-queries">collection of media queries</a>.</dd> 2.697 +</dl> 2.698 +<dl class="methods"> 2.699 +<dt class="method"> 2.700 +<code>item</code> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>DOMString</a></span></dt> 2.701 +<dd> 2.702 +<p>The <code>item</code> method must return the media query in the <a href="#collection-of-media-queries">collection of media queries</a> given by <var>index</var>, or null, if <var>index</var> is greater than or equal to the number of media queries in the <a href="#collection-of-media-queries">collection of media queries</a>.</dd> 2.703 +<dt class="method"> 2.704 +<code>appendMedium</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 2.705 +<dd> 2.706 +<p>The <code>appendMedium</code> method must run these steps:</p> <ol> <li><p>Let <var>m</var> be the result of <a href="#parse-a-media-query" title="parse a media query">parsing</a> the given value.</li> <li><p>If <var>m</var> is null terminate these steps.</li> <li><p>If <a href="#compare-media-queries" title="compare media queries">comparing</a> <var>m</var> with any of the media queries in the <a href="#collection-of-media-queries">collection of media queries</a> returns true terminate these steps.</li> <li><p>Append <var>m</var> to the <a href="#collection-of-media-queries">collection of media queries</a>.</li> </ol></dd> 2.707 +<dt class="method"> 2.708 +<code>deleteMedium</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 2.709 +<dd> 2.710 +<p>The <code>deleteMedium</code> method must run these steps:</p> <ol> <li><p>Let <var>m</var> be the result of <a href="#parse-a-media-query" title="parse a media query">parsing</a> the given value.</li> <li><p>If <var>m</var> is null terminate these steps.</li> <li><p>Remove any media query from the <a href="#collection-of-media-queries">collection of media queries</a> for which <a href="#compare-media-queries" title="compare media queries">comparing</a> the media query with <var>m</var> returns true.</li> </ol></dd> 2.711 +</dl> 2.712 +<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 {@name} 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>{@name}</code> object.</li> </ol> 2.713 + 2.714 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.715 2.716 <h2 id="selectors"><span class="secno">5 </span>Selectors</h2> 2.717 2.718 @@ -631,15 +576,20 @@ 2.719 2.720 <!-- XXX ref universal selector etc? some are in <span> some not --> 2.721 2.722 + <!-- ........................................................................................................................ --> 2.723 + <!-- ........................................................................................................................ --> 2.724 + 2.725 <h3 id="parsing-selectors"><span class="secno">5.1 </span>Parsing Selectors</h3> 2.726 2.727 <p>To 2.728 <dfn id="parse-a-group-of-selectors">parse a group of selectors</dfn> 2.729 - means to parse the value using the <code title="">selectors_group</code> 2.730 + means to parse the value using the <code>selectors_group</code> 2.731 production defined in the Selectors specification and return either a 2.732 group of selectors if parsing did not fail or null if parsing did 2.733 fail.</p> <!-- XXX ref --> 2.734 2.735 + <!-- ........................................................................................................................ --> 2.736 + <!-- ........................................................................................................................ --> 2.737 2.738 <h3 id="serializing-selectors"><span class="secno">5.2 </span>Serializing Selectors</h3> 2.739 <!-- http://dump.testsuite.org/2009/cssom/serializing-selectors.htm --> 2.740 @@ -652,16 +602,16 @@ 2.741 group.</p> 2.742 2.743 <p>To <dfn id="serialize-a-selector">serialize a selector</dfn> let 2.744 - <var title="">s</var> be the empty string, run the steps below for each 2.745 + <var>s</var> be the empty string, run the steps below for each 2.746 part of the chain of the selector, and finally return 2.747 - <var title="">s</var>:</p> 2.748 + <var>s</var>:</p> 2.749 2.750 <ol> 2.751 <li><p>If there is only one <span>simple selector</span> in the 2.752 <span>sequence of simple selectors</span> which is a 2.753 <span>universal selector</span>, append the result of 2.754 <a href="#serialize-a-simple-selector" title="serialize a simple selector">serializing</a> the 2.755 - <span>universal selector</span> to <var title="">s</var>.</li> 2.756 + <span>universal selector</span> to <var>s</var>.</li> 2.757 2.758 <li><p>Otherwise, for each <span>simple selector</span> in the 2.759 <span>sequence of simple selectors</span> that is not a 2.760 @@ -671,7 +621,7 @@ 2.761 <span>default namespace</span> 2.762 <a href="#serialize-a-simple-selector" title="serialize a simple selector">serialize</a> the 2.763 <span>simple selector</span> and append the result to 2.764 - <var title="">s</var>.</li> 2.765 + <var>s</var>.</li> 2.766 2.767 <li><p>If this is not the last part of the chain of the selector append a 2.768 space (U+0020), followed by the combinator 2.769 @@ -679,18 +629,18 @@ 2.770 "<code>+</code>", or 2.771 "<code>~</code>" 2.772 as appropriate, followed by another space (U+0020) if the combinator was 2.773 - not whitespace, to <var title="">s</var>.</li> 2.774 + not whitespace, to <var>s</var>.</li> 2.775 2.776 <li><p>If this is the last part of the chain of the selector and there is 2.777 a pseudo-element, append "<code>::</code>" followed by the name of the 2.778 - pseudo-class, to <var title="">s</var>.</li> 2.779 + pseudo-class, to <var>s</var>.</li> 2.780 </ol> 2.781 2.782 2.783 <p>To 2.784 <dfn id="serialize-a-simple-selector">serialize a simple selector</dfn> 2.785 - let <var title="">s</var> be the empty string, run the steps below, and 2.786 - finally return <var title="">s</var>:</p> 2.787 + let <var>s</var> be the empty string, run the steps below, and 2.788 + finally return <var>s</var>:</p> 2.789 2.790 <dl class="switch"> 2.791 <dt>type selector</dt> 2.792 @@ -702,19 +652,19 @@ 2.793 null namespace (not in a namespace) append the 2.794 <a href="#serialize-an-identifier" title="serialize an identifier">escaped</a> 2.795 <span>namespace prefix</span>, followed by a "<code>|</code>" (U+007C) 2.796 - to <var title="">s</var>.</li> 2.797 + to <var>s</var>.</li> 2.798 2.799 <li><p>If the <span>namespace prefix</span> maps to a namespace that is 2.800 the null namespace (not in a namespace) append 2.801 - "<code>|</code>" (U+007C) to <var title="">s</var>.</li> 2.802 + "<code>|</code>" (U+007C) to <var>s</var>.</li> 2.803 <!-- This includes |* --> 2.804 2.805 <li><p>If this is a type selector append the 2.806 <a href="#serialize-an-identifier" title="serialize an identifier">escaped</a> element name to 2.807 - <var title="">s</var>.</p> 2.808 + <var>s</var>.</li> 2.809 2.810 <li><p>If this is a universal selector append "<code>*</code>" (U+002A) 2.811 - to <var title="">s</var>.</li> 2.812 + to <var>s</var>.</li> 2.813 </ol> 2.814 </dd> 2.815 2.816 @@ -722,21 +672,21 @@ 2.817 <dd> 2.818 <ol> 2.819 <li><p>Append "<code>[</code>" (U+005B) to 2.820 - <var title="">s</var>.</li> 2.821 + <var>s</var>.</li> 2.822 2.823 <li><p>If the <span>namespace prefix</span> maps to a namespace that is 2.824 not the null namespace (not in a namespace) append the 2.825 <a href="#serialize-an-identifier" title="serialize an identifier">escaped</a> 2.826 <span>namespace prefix</span>, followed by a "<code>|</code>" (U+007C) 2.827 - to <var title="">s</var>.</li> 2.828 + to <var>s</var>.</li> 2.829 2.830 <li><p>If the <span>namespace prefix</span> maps to a namespace that is 2.831 the null namespace (not in a namespace) append 2.832 - "<code>|</code>" (U+007C) to <var title="">s</var>.</li> 2.833 + "<code>|</code>" (U+007C) to <var>s</var>.</li> 2.834 <!-- This includes |* --> 2.835 2.836 <li><p>Append the <a href="#serialize-an-identifier" title="serialize an identifier">escaped</a> 2.837 - attribute name to <var title="">s</var>.</li> 2.838 + attribute name to <var>s</var>.</li> 2.839 2.840 <li><p>If there is an attribute value specified, append 2.841 "<code>=</code>", 2.842 @@ -747,92 +697,94 @@ 2.843 "<code>*=</code>" 2.844 as appropriate (depending on the type of attribute selector), followed 2.845 by the <a href="#serialize-a-string" title="serialize a string">string escaped</a> 2.846 - attribute value, to <var title="">s</var>.</li> 2.847 + attribute value, to <var>s</var>.</li> 2.848 2.849 <li><p>Append "<code>]</code>" (U+005D) to 2.850 - <var title="">s</var>.</li> 2.851 + <var>s</var>.</li> 2.852 </ol> 2.853 </dd> 2.854 2.855 <dt>class selector</dt> 2.856 <dd><p>Append a "<code>.</code>" (U+002E), followed by the 2.857 <a href="#serialize-an-identifier" title="serialize an identifier">escaped</a> class name to 2.858 - <var title="">s</var>.</dd> 2.859 + <var>s</var>.</dd> 2.860 2.861 <dt>ID selector</dt> 2.862 <dd><p>Append a "<code>#</code>" (U+0023), followed by the 2.863 <a href="#serialize-an-identifier" title="serialize an identifier">escaped</a> ID to 2.864 - <var title="">s</var>.</dd> 2.865 + <var>s</var>.</dd> 2.866 2.867 <dt>pseudo-class</dt> 2.868 <dd> 2.869 <p>If the pseudo-class does not accept arguments append 2.870 "<code>:</code>" (U+003A), followed by the name of the pseudo-class, to 2.871 - <var title="">s</var>.</p> 2.872 + <var>s</var>.</p> 2.873 2.874 <p>Otherwise, append "<code>:</code>" (U+003A), followed by the name of 2.875 the pseudo-class, followed by "<code>(</code>" (U+0028), followed by the 2.876 value of the pseudo-class argument determined as per below, followed by 2.877 - "<code>)</code>" (U+0029), to <var title="">s</var>.</p> 2.878 + "<code>)</code>" (U+0029), to <var>s</var>.</p> 2.879 2.880 <dl class="switch"> 2.881 - <dt><code title="">:lang()</code></dt> 2.882 + <dt><code>:lang()</code></dt> 2.883 <dd><p>The <a href="#serialize-an-identifier" title="serialize an identifier">escaped</a> 2.884 value.</dd> 2.885 2.886 - <dt><code title="">:nth-child()</code></dt> 2.887 - <dt><code title="">:nth-last-child()</code></dt> 2.888 - <dt><code title="">:nth-of-type()</code></dt> 2.889 - <dt><code title="">:nth-last-of-type()</code></dt> 2.890 + <dt><code>:nth-child()</code></dt> 2.891 + <dt><code>:nth-last-child()</code></dt> 2.892 + <dt><code>:nth-of-type()</code></dt> 2.893 + <dt><code>:nth-last-of-type()</code></dt> 2.894 <dd> 2.895 <ol> 2.896 <li><p>If the value is odd let the value be 2.897 - "<code title="">2n+1</code>".</li> 2.898 + "<code>2n+1</code>".</li> 2.899 2.900 <li><p>If the value is even let the value be 2.901 - "<code title="">2n</code>".</li> 2.902 - 2.903 - <li><p>If <var title="">a</var> is zero let the value be 2.904 - <var title="">b</var> 2.905 + "<code>2n</code>".</li> 2.906 + 2.907 + <li><p>If <var>a</var> is zero let the value be 2.908 + <var>b</var> 2.909 <a href="#serialize-a-css-value-component" title="serialize a CSS component value">serialized</a> as <integer>.</li> 2.910 2.911 - <li><p>If <var title="">a</var> is one or minus one and 2.912 - <var title="">b</var> is zero let the value be 2.913 - "<code title="">n</code>" (U+006E).</li> 2.914 - 2.915 - <li><p>If <var title="">a</var> is one or minus one let the value be 2.916 - "<code title="">n</code>" (U+006E), followed by 2.917 - "<code>+</code>" (U+002B) if <var title="">b</var> is positive, 2.918 - followed by <var title="">b</var> 2.919 + <li><p>If <var>a</var> is one or minus one and 2.920 + <var>b</var> is zero let the value be 2.921 + "<code>n</code>" (U+006E).</li> 2.922 + 2.923 + <li><p>If <var>a</var> is one or minus one let the value be 2.924 + "<code>n</code>" (U+006E), followed by 2.925 + "<code>+</code>" (U+002B) if <var>b</var> is positive, 2.926 + followed by <var>b</var> 2.927 <a href="#serialize-a-css-value-component" title="serialize a CSS component value">serialized</a> as <integer>.</li> 2.928 2.929 - <li><p>If <var title="">b</var> is zero let the value be 2.930 - <var title="">a</var> 2.931 + <li><p>If <var>b</var> is zero let the value be 2.932 + <var>a</var> 2.933 <a href="#serialize-a-css-value-component" title="serialize a CSS component value">serialized</a> as <integer>, 2.934 - followed by "<code title="">n</code>" (U+006E).</li> 2.935 + followed by "<code>n</code>" (U+006E).</li> 2.936 2.937 <li><p>Otherwise let the value be 2.938 - <var title="">a</var> 2.939 + <var>a</var> 2.940 <a href="#serialize-a-css-value-component" title="serialize a CSS component value">serialized</a> as <integer>, 2.941 - followed by "<code title="">n</code>" (U+006E), followed by 2.942 - "<code>+</code>" (U+002B) if <var title="">b</var> is positive, 2.943 - followed by <var title="">b</var> 2.944 + followed by "<code>n</code>" (U+006E), followed by 2.945 + "<code>+</code>" (U+002B) if <var>b</var> is positive, 2.946 + followed by <var>b</var> 2.947 <a href="#serialize-a-css-value-component" title="serialize a CSS component value">serialized</a> as <integer>.</li> 2.948 </ol> 2.949 </dd> 2.950 2.951 - <dt><code title="">:not()</code></dt> 2.952 + <dt><code>:not()</code></dt> 2.953 <dd><p>The result of serializing the value using the rules for 2.954 <a href="#serialize-a-group-of-selectors" title="serialize a group of selectors">serializing a group of selectors</a>.</dd> 2.955 </dl> 2.956 </dd> 2.957 </dl> 2.958 2.959 - 2.960 - 2.961 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.962 2.963 <h2 id="css"><span class="secno">6 </span>CSS</h2> 2.964 2.965 + <!-- ........................................................................................................................ --> 2.966 + <!-- ........................................................................................................................ --> 2.967 + 2.968 <h3 id="style-sheet-0"><span class="secno">6.1 </span>Style Sheet</h3> 2.969 2.970 <!-- XXX 2.971 @@ -842,7 +794,7 @@ 2.972 2.973 <p>A <dfn id="style-sheet">style sheet</dfn> is an abstract concept that 2.974 represents a style sheet as defined by the CSS specification. In the DOM a 2.975 - <a href="#style-sheet">style sheet</a> is a <code><a href="#cssstylesheet">CSSStyleSheet</a></code> object. A 2.976 + <a href="#style-sheet">style sheet</a> is a <code>CSSStyleSheet</code> object. A 2.977 <a href="#style-sheet">style sheet</a> has a number of associated properties:</p> 2.978 2.979 <dl> 2.980 @@ -869,7 +821,7 @@ 2.981 2.982 <dt><dfn id="style-sheet-media">style sheet media</dfn></dt> 2.983 <dd> 2.984 - <p>The <code><a href="#medialist">MediaList</a></code> object associated with the 2.985 + <p>The <code>MediaList</code> object associated with the 2.986 <a href="#style-sheet">style sheet</a>.</p> 2.987 2.988 <p>If this property is set to a string run the 2.989 @@ -887,7 +839,7 @@ 2.990 <p>In these examples the <a href="#style-sheet-title">style sheet title</a> ends up being 2.991 empty:</p> 2.992 2.993 - <pre><style title> body { background:papayawhip } </style></pre> 2.994 + <pre><style> body { background:papayawhip } </style></pre> 2.995 2.996 <pre><style> body { background:orange } </style></pre> 2.997 </div> 2.998 @@ -928,109 +880,87 @@ 2.999 2.1000 <!-- same-origin restrictions --> 2.1001 2.1002 - 2.1003 - <h4 id="the-stylesheet-interface"><span class="secno">6.1.1 </span>The <code title="">StyleSheet</code> Interface</h4> 2.1004 - 2.1005 - <p>The <code><a href="#stylesheet">StyleSheet</a></code> interface represents a base interface that 2.1006 - has no meaning on its own.</p> 2.1007 - 2.1008 - <pre class="idl">interface <dfn id="stylesheet">StyleSheet</dfn> { 2.1009 - readonly attribute DOMString <a href="#dom-stylesheet-type" title="dom-StyleSheet-type">type</a>; 2.1010 - readonly attribute DOMString <a href="#dom-stylesheet-href" title="dom-StyleSheet-href">href</a>; 2.1011 - readonly attribute Node <a href="#dom-stylesheet-ownernode" title="dom-StyleSheet-ownerNode">ownerNode</a>; 2.1012 - readonly attribute <a href="#stylesheet">StyleSheet</a> <a href="#dom-stylesheet-parentstylesheet" title="dom-StyleSheet-parentStyleSheet">parentStyleSheet</a>; 2.1013 - readonly attribute DOMString <a href="#dom-stylesheet-title" title="dom-StyleSheet-title">title</a>; 2.1014 - [PutForwards=<a href="#dom-medialist-mediatext" title="dom-MediaList-mediaText">mediaText</a>] readonly attribute <a href="#medialist">MediaList</a> <a href="#dom-stylesheet-media" title="dom-StyleSheet-media">media</a>; 2.1015 - attribute boolean <a href="#dom-stylesheet-disabled" title="dom-StyleSheet-disabled">disabled</a>; 2.1016 -};</pre> 2.1017 - 2.1018 - <p>The 2.1019 - <dfn id="dom-stylesheet-type" title="dom-StyleSheet-type"><code>type</code></dfn> 2.1020 - attribute must return the 2.1021 - <a href="#style-sheet-type">style sheet type</a>.</p> 2.1022 - 2.1023 - <p>The 2.1024 - <dfn id="dom-stylesheet-href" title="dom-StyleSheet-href"><code>href</code></dfn> 2.1025 - attribute must return the 2.1026 - <a href="#style-sheet-location">style sheet location</a>.</p> 2.1027 - 2.1028 - <p>The 2.1029 - <dfn id="dom-stylesheet-ownernode" title="dom-StyleSheet-ownerNode"><code>ownerNode</code></dfn> 2.1030 - attribute must return the 2.1031 - <a href="#style-sheet-owner-node">style sheet owner node</a>.</p> 2.1032 - 2.1033 - <p>The 2.1034 - <dfn id="dom-stylesheet-parentstylesheet" title="dom-StyleSheet-parentStyleSheet"><code>parentStyleSheet</code></dfn> 2.1035 - attribute must return the 2.1036 - <a href="#style-sheet-parent">style sheet parent</a>.</p> 2.1037 - 2.1038 - <p>The 2.1039 - <dfn id="dom-stylesheet-title" title="dom-StyleSheet-title"><code>title</code></dfn> 2.1040 - attribute must return the 2.1041 - <a href="#style-sheet-title">style sheet title</a>.</p> 2.1042 - 2.1043 - <p>The 2.1044 - <dfn id="dom-stylesheet-media" title="dom-StyleSheet-media"><code>media</code></dfn> 2.1045 - attribute must return the 2.1046 - <a href="#style-sheet-media">style sheet media</a>.</p> 2.1047 - 2.1048 - <p>The 2.1049 - <dfn id="dom-stylesheet-disabled" title="dom-StyleSheet-disabled"><code>disabled</code></dfn> 2.1050 - attribute must return true if the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> 2.1051 - is set, or false otherwise. 2.1052 - 2.1053 - <p>Setting the <code title="dom-StyleSheet-disabled"><a href="#dom-stylesheet-disabled">disabled</a></code> 2.1054 - attribute must set the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> if the new 2.1055 - value is true, or unset the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> 2.1056 - otherwise. 2.1057 - 2.1058 - 2.1059 - <h4 id="the-cssstylesheet-interface"><span class="secno">6.1.2 </span>The <code title="">CSSStyleSheet</code> Interface</h4> 2.1060 - 2.1061 - <p>The <code><a href="#cssstylesheet">CSSStyleSheet</a></code> interface represents a 2.1062 - <a href="#style-sheet">style sheet</a>.</p> 2.1063 - 2.1064 - <!-- 2.1065 - IE exposes: 2.1066 - owningElement, pages, id, type, href, disabled, cssText, readOnly, title, 2.1067 - parentStyleSheet, imports, rules, media 2.1068 - --> 2.1069 - 2.1070 - <pre class="idl">interface <dfn id="cssstylesheet">CSSStyleSheet</dfn> : <a href="#stylesheet">StyleSheet</a> { 2.1071 - readonly attribute <a href="#cssrule">CSSRule</a> <a href="#dom-cssstylesheet-ownerrule" title="dom-CSSStyleSheet-ownerRule">ownerRule</a>; 2.1072 - readonly attribute <a href="#cssrulelist">CSSRuleList</a> <a href="#dom-cssstylesheet-cssrules" title="dom-CSSStyleSheet-cssRules">cssRules</a>; 2.1073 - unsigned long <a href="#dom-cssstylesheet-insertrule" title="dom-CSSStyleSheet-insertRule">insertRule</a>(DOMString <var title="">rule</var>, unsigned long <var title="">index</var>); 2.1074 - void <a href="#dom-cssstylesheet-deleterule" title="dom-CSSStyleSheet-deleteRule">deleteRule</a>(unsigned long <var title="">index</var>); 2.1075 -};</pre> 2.1076 - 2.1077 - <p>The 2.1078 - <dfn id="dom-cssstylesheet-ownerrule" title="dom-CSSStyleSheet-ownerRule"><code>ownerRule</code></dfn> 2.1079 - attribute must return the 2.1080 - <a href="#style-sheet-owner-css-rule">style sheet owner CSS rule</a>.</p> 2.1081 - 2.1082 - <p>The 2.1083 - <dfn id="dom-cssstylesheet-cssrules" title="dom-CSSStyleSheet-cssRules"><code>cssRules</code></dfn> 2.1084 - attribute must return a <code><a href="#cssrulelist">CSSRuleList</a></code> 2.1085 - object representing the <a href="#style-sheet-css-rules">style sheet CSS rules</a>.</p> 2.1086 - 2.1087 - <p class="note">CSS rules that were dropped during parsing can not be 2.1088 - found using APIs described by this specification.</p> 2.1089 - 2.1090 - <p>The 2.1091 - <dfn id="dom-cssstylesheet-insertrule" title="dom-CSSStyleSheet-insertRule"><code>insertRule(<var title="">rule</var>, <var title="">index</var>)</code></dfn> 2.1092 - method must <a href="#insert-a-css-rule">insert a CSS rule</a> 2.1093 - <var title="">rule</var> the in CSS rule list returned by 2.1094 - <code title="dom-CSSStyleSheet-cssRules"><a href="#dom-cssstylesheet-cssrules">cssRules</a></code> at 2.1095 - <var title="">index</var>.</p> 2.1096 - 2.1097 - <p>The 2.1098 - <dfn id="dom-cssstylesheet-deleterule" title="dom-CSSStyleSheet-deleteRule"><code>deleteRule(<var title="">index</var>)</code></dfn> 2.1099 - method must <a href="#remove-a-css-rule">remove a CSS rule</a> from the 2.1100 - CSS rule list returned by 2.1101 - <code title="dom-CSSStyleSheet-cssRules"><a href="#dom-cssstylesheet-cssrules">cssRules</a></code> at 2.1102 - <var title="">index</var>.</p> 2.1103 - 2.1104 - 2.1105 + <!-- ........................................................................................................................ --> 2.1106 + 2.1107 + <h4 id="the-stylesheet-interface"><span class="secno">6.1.1 </span>The <code>StyleSheet</code> Interface</h4> 2.1108 + 2.1109 + <p>The <code>StyleSheet</code> interface represents an abstract, base style sheet.</p> 2.1110 +<pre class="idl"><span class="idlInterface" id="widl-def-StyleSheet">interface <span class="idlInterfaceID">StyleSheet</span> { 2.1111 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-type">type</a></span>;</span> 2.1112 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-href">href</a></span>;</span> 2.1113 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>Node</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-ownerNode">ownerNode</a></span>;</span> 2.1114 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>StyleSheet</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-parentStyleSheet">parentStyleSheet</a></span>;</span> 2.1115 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-title">title</a></span>;</span> 2.1116 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>MediaList</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-media">media</a></span>;</span> 2.1117 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>boolean</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-disabled">disabled</a></span>;</span> 2.1118 +};</span></pre> 2.1119 +<dl class="attributes"> 2.1120 +<dt class="attribute"> 2.1121 +<code>type</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 2.1122 +<dd> 2.1123 +<p>The <code>type</code> attribute must return the <a href="#style-sheet-type">style sheet type</a>.</dd> 2.1124 +<dt class="attribute"> 2.1125 +<code>href</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 2.1126 +<dd> 2.1127 +<p>The <code>href</code> attribute must return the <a href="#style-sheet-location">style sheet location</a>.</dd> 2.1128 +<dt class="attribute"> 2.1129 +<code>ownerNode</code> of type <span class="idlAttrType"><a>Node</a></span>, readonly</dt> 2.1130 +<dd> 2.1131 +<p>The <code>ownerNode</code> attribute must return the <a href="#style-sheet-owner-node">style sheet owner node</a>.</dd> 2.1132 +<dt class="attribute"> 2.1133 +<code>parentStyleSheet</code> of type <span class="idlAttrType"><a>StyleSheet</a></span>, readonly</dt> 2.1134 +<dd> 2.1135 +<p>The <code>parentStyleSheet</code> attribute must return the <a href="#style-sheet-parent">style sheet parent</a>.</dd> 2.1136 +<dt class="attribute"> 2.1137 +<code>title</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 2.1138 +<dd> 2.1139 +<p>The <code>title</code> attribute must return the <a href="#style-sheet-title">style sheet title</a>.</dd> 2.1140 +<dt class="attribute"> 2.1141 +<code>media</code> of type <span class="idlAttrType"><a>MediaList</a></span>, readonly</dt> 2.1142 +<dd> 2.1143 +<p>The <code>media</code> attribute must return the <a href="#style-sheet-media">style sheet media</a>.</dd> 2.1144 +<dt class="attribute"> 2.1145 +<code>disabled</code> of type <span class="idlAttrType"><a>boolean</a></span></dt> 2.1146 +<dd> 2.1147 +<p>The <code>disabled</code> attribute must return true if the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> is set, or false otherwise.</p> <p>Setting the <code>disabled</code> attribute must set the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> if the new value is true, or unset the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> otherwise.</dd> 2.1148 +</dl> 2.1149 + 2.1150 + 2.1151 + <!-- ........................................................................................................................ --> 2.1152 + 2.1153 + <h4 id="the-cssstylesheet-interface"><span class="secno">6.1.2 </span>The <code>CSSStyleSheet</code> Interface</h4> 2.1154 + 2.1155 + <p>The <code>CSSStyleSheet</code> interface represents a CSS <a href="#style-sheet">style sheet</a> rule.</p> 2.1156 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSStyleSheet">interface <span class="idlInterfaceID">CSSStyleSheet</span> { 2.1157 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRule</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleSheet-ownerRule">ownerRule</a></span>;</span> 2.1158 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRuleList</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleSheet-cssRules">cssRules</a></span>;</span> 2.1159 +<span class="idlMethod"> <span class="idlMethType"><a>unsigned long</a></span> <span class="idlMethName"><a href="#widl-CSSStyleSheet-insertRule-unsigned-long-DOMString-rule-unsigned-long-index">insertRule</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">rule</span></span>, <span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 2.1160 +<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-CSSStyleSheet-deleteRule-void-unsigned-long-index">deleteRule</a></span> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 2.1161 +};</span></pre> 2.1162 +<dl class="attributes"> 2.1163 +<dt class="attribute"> 2.1164 +<code>ownerRule</code> of type <span class="idlAttrType"><a>CSSRule</a></span>, readonly</dt> 2.1165 +<dd> 2.1166 +<p>The <code>ownerRule</code> attribute must return the <a href="#style-sheet-owner-css-rule">style sheet owner CSS rule</a>.</dd> 2.1167 +<dt class="attribute"> 2.1168 +<code>cssRules</code> of type <span class="idlAttrType"><a>CSSRuleList</a></span>, readonly</dt> 2.1169 +<dd> 2.1170 +<p>The <code>cssRules</code> attribute must return a <code>CSSRuleList</code> object representing the <a href="#style-sheet-css-rules">style sheet CSS rules</a>.</p> <p class="note">CSS rules that were dropped during parsing can not be found using APIs described by this specification.</dd> 2.1171 +</dl> 2.1172 +<dl class="methods"> 2.1173 +<dt class="method"> 2.1174 +<code>insertRule</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>, <span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>unsigned long</a></span></dt> 2.1175 +<dd> 2.1176 +<p>The <code>insertRule</code> operation must <a href="#insert-a-css-rule">insert a CSS rule</a> <var>rule</var> the in CSS rule list returned by <code title="dom-CSSStyleSheet-cssRules">cssRules</code> at <var>index</var>.</dd> 2.1177 +<dt class="method"> 2.1178 +<code>deleteRule</code> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 2.1179 +<dd> 2.1180 +<p>The <code>deleteRule</code> operation must <a href="#remove-a-css-rule">remove a CSS rule</a> from the CSS rule list returned by <code title="dom-CSSStyleSheet-cssRules">cssRules</code> at <var>index</var>.</dd> 2.1181 +</dl> 2.1182 + 2.1183 + 2.1184 + <!-- ........................................................................................................................ --> 2.1185 + <!-- ........................................................................................................................ --> 2.1186 2.1187 <h3 id="style-sheet-collections"><span class="secno">6.2 </span>Style Sheet Collections</h3> 2.1188 2.1189 @@ -1093,7 +1023,7 @@ 2.1190 </ul> 2.1191 </li> 2.1192 2.1193 - <li><p>Set the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a>. 2.1194 + <li><p>Set the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a>.</li> 2.1195 </ol> 2.1196 2.1197 <p>A <dfn id="persistent-style-sheet">persistent style sheet</dfn> is a 2.1198 @@ -1115,31 +1045,31 @@ 2.1199 its <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> unset.</p> 2.1200 2.1201 <p>To <dfn id="enable-a-style-sheet-set">enable a style sheet set</dfn> 2.1202 - with name <var title="">name</var>, run these steps:</p> 2.1203 + with name <var>name</var>, run these steps:</p> 2.1204 2.1205 <ol> 2.1206 - <li><p>If <var title="">name</var> is the empty string, set the 2.1207 + <li><p>If <var>name</var> is the empty string, set the 2.1208 <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> for each <a href="#style-sheet">style sheet</a> 2.1209 - that is in a <a href="#style-sheet-set">style sheet set</a> and terminate these steps. 2.1210 + that is in a <a href="#style-sheet-set">style sheet set</a> and terminate these steps.</li> 2.1211 2.1212 <li><p>Unset the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> for each 2.1213 <a href="#style-sheet">style sheet</a> in a <a href="#style-sheet-set">style sheet set</a> whose 2.1214 <a href="#style-sheet-set-name">style sheet set name</a> is a 2.1215 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#case-sensitive">case-sensitive</a> match for 2.1216 - <var title="">name</var> and set it for all other 2.1217 + <var>name</var> and set it for all other 2.1218 <a href="#style-sheet" title="style sheet">style sheets</a> in a 2.1219 <a href="#style-sheet-set">style sheet set</a>.</li> 2.1220 </ol> 2.1221 2.1222 <p>To <dfn id="select-a-style-sheet-set">select a style sheet set</dfn> 2.1223 - with name <var title="">name</var>, run these steps:</p> 2.1224 + with name <var>name</var>, run these steps:</p> 2.1225 2.1226 <ol> 2.1227 <li><p><a href="#enable-a-style-sheet-set">Enable a style sheet set</a> with name 2.1228 - <var title="">name</var>.</li> 2.1229 + <var>name</var>.</li> 2.1230 2.1231 <li><p>Set <a href="#last-style-sheet-set-name">last style sheet set name</a> to 2.1232 - <var title="">name</var>.</li> 2.1233 + <var>name</var>.</li> 2.1234 </ol> 2.1235 2.1236 <p>A <dfn id="last-style-sheet-set-name">last style sheet set name</dfn> 2.1237 @@ -1150,27 +1080,27 @@ 2.1238 <p>A 2.1239 <dfn id="preferred-style-sheet-set-name">preferred style sheet set name</dfn> 2.1240 is a concept to determine which 2.1241 - <span style="style sheet">style sheets</span> need to have their 2.1242 + <a href="#style-sheet" title="style sheet">style sheets</a> need to have their 2.1243 <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> unset. Initially its value 2.1244 is the empty string. 2.1245 2.1246 <p>To 2.1247 <dfn id="change-the-preferred-style-sheet-set-name">change the preferred style sheet set name</dfn> 2.1248 - with name <var title="">name</var>, run these steps:</p> 2.1249 + with name <var>name</var>, run these steps:</p> 2.1250 2.1251 <ol> 2.1252 <li><p>Let the <a href="#preferred-style-sheet-set-name">preferred style sheet set name</a> be 2.1253 - <var title="">current</var>.</li> 2.1254 + <var>current</var>.</li> 2.1255 2.1256 <li><p>Set <a href="#preferred-style-sheet-set-name">preferred style sheet set name</a> to 2.1257 - <var title="">name</var>.</li> 2.1258 - 2.1259 - <li><p>If <var title="">name</var> is not a 2.1260 + <var>name</var>.</li> 2.1261 + 2.1262 + <li><p>If <var>name</var> is not a 2.1263 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#case-sensitive">case-sensitive</a> match for 2.1264 - <var title="">current</var> and 2.1265 + <var>current</var> and 2.1266 <a href="#last-style-sheet-set-name">last style sheet set name</a> is null 2.1267 <a href="#enable-a-style-sheet-set">enable a style sheet set</a> with name 2.1268 - <var title="">new</var>.</li> 2.1269 + <var>new</var>.</li> 2.1270 </ol> 2.1271 2.1272 <!-- XXX ought to define "applied" 2.1273 @@ -1179,8 +1109,9 @@ 2.1274 depends on disabled flag, alternate flag, media queries, sheesh 2.1275 --> 2.1276 2.1277 - 2.1278 - <h4 id="the-http-default-style-header"><span class="secno">6.2.1 </span>The HTTP <code title="">Default-Style</code> Header</h4> 2.1279 + <!-- ........................................................................................................................ --> 2.1280 + 2.1281 + <h4 id="the-http-default-style-header"><span class="secno">6.2.1 </span>The HTTP <code>Default-Style</code> Header</h4> 2.1282 2.1283 <p>The HTTP <code title="http-default-style"><a href="#default-style">Default-Style</a></code> header 2.1284 can be used to set the <a href="#preferred-style-sheet-set-name">preferred style sheet set name</a> 2.1285 @@ -1192,175 +1123,86 @@ 2.1286 <a href="#change-the-preferred-style-sheet-set-name">change the preferred style sheet set name</a> with name being the 2.1287 value of the header.</p> 2.1288 2.1289 - 2.1290 - 2.1291 - 2.1292 - <h4 id="the-stylesheetlist-sequence"><span class="secno">6.2.2 </span>The <code title="">StyleSheetList</code> Sequence</h4> 2.1293 - 2.1294 - <p>The sequence parameterized type represents an ordered collection of 2.1295 - <a href="#style-sheet" title="style sheet">style sheets</a>.</p> 2.1296 - 2.1297 - <pre class="idl">typedef sequence<<a href="#stylesheet">StyleSheet</a>> <dfn id="stylesheetlist">StyleSheetList</dfn>;</pre> 2.1298 - 2.1299 -<!-- 2.1300 - <pre class="idl">interface <dfn>StyleSheetList</dfn> { 2.1301 - readonly attribute unsigned long <span title="stylesheetlist-length">length</span>; 2.1302 - getter <span>StyleSheet</span> <span title="stylesheetlist-item">item</span>(unsigned long <var title>index</var>); 2.1303 -};</pre> 2.1304 - 2.1305 - <p>The 2.1306 - <dfn id="stylesheetlist-length" title="stylesheetlist-length"><code>length</code></dfn> 2.1307 - attribute, on getting, must return the number of 2.1308 - objects currently in the list.</p> 2.1309 - 2.1310 - <p>The 2.1311 - <dfn title="stylesheetlist-item"><code>item(<var title>index</var>)</code></dfn> 2.1312 - method, when invoked, must return the 2.1313 - <code>StyleSheet</code> object in the list given by <var title>index</var>, or 2.1314 - null, if <var title>index</var> is greater than or equal to the 2.1315 - number of items in the list.</p> 2.1316 ---> 2.1317 - 2.1318 - 2.1319 - <h4 id="extensions-to-the-document-interface"><span class="secno">6.2.3 </span>Extensions to the <code title="">Document</code> Interface</h4> 2.1320 - 2.1321 - <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=200930 (FIXED) --> 2.1322 - <pre class="idl">partial interface <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#document">Document</a> { 2.1323 - readonly attribute <a href="#stylesheetlist">StyleSheetList</a> <a href="#dom-document-stylesheets" title="dom-Document-styleSheets">styleSheets</a>; 2.1324 - attribute DOMString? <a href="#dom-document-selectedStyleSheetSet" title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</a>; 2.1325 - readonly attribute DOMString? <a href="#dom-document-lastStyleSheetSet" title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</a>; 2.1326 - readonly attribute DOMString? <a href="#dom-document-preferredStyleSheetSet" title="dom-Document-preferredStyleSheetSet">preferredStyleSheetSet</a>; 2.1327 - readonly attribute DOMStringList <a href="#dom-document-styleSheetSets" title="dom-Document-styleSheetSets">styleSheetSets</a>; 2.1328 - void <a href="#dom-document-enablestylesheetsforset" title="dom-Document-enableStyleSheetsForSet">enableStyleSheetsForSet</a>(DOMString? <var title="">name</var>); 2.1329 -};</pre> 2.1330 - 2.1331 - <p>The 2.1332 - <dfn id="dom-document-stylesheets" title="dom-Document-styleSheets"><code>styleSheets</code></dfn> 2.1333 - attribute must return a <code><a href="#stylesheetlist">StyleSheetList</a></code> 2.1334 - sequence representing the <a href="#document-style-sheets">document style sheets</a>.</p> 2.1335 - 2.1336 - <p class="note">Because of historical IDL limitations the 2.1337 - <code title="dom-Document-styleSheets"><a href="#dom-document-stylesheets">styleSheets</a></code> attribute used 2.1338 - to be on a separate interface, <code title="">DocumentStyle</code>.</p> 2.1339 - 2.1340 - <p>The 2.1341 - <dfn id="dom-document-selectedStyleSheetSet" title="dom-Document-selectedStyleSheetSet"><code>selectedStyleSheetSet</code></dfn> 2.1342 - attribute, on getting, must run these steps:</p> 2.1343 - 2.1344 - <ol> 2.1345 - <li><p>If there is a single <a href="#enabled-style-sheet-set">enabled style sheet set</a> and no 2.1346 - other <a href="#document-style-sheets">document style sheets</a> with a non-empty 2.1347 - <a href="#style-sheet-title">style sheet title</a> have the 2.1348 - <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> unset, return the 2.1349 - <a href="#style-sheet-set-name">style sheet set name</a> of the 2.1350 - <a href="#enabled-style-sheet-set">enabled style sheet set</a> and terminate these steps. 2.1351 - 2.1352 - <li><p>Otherwise, if <a href="#style-sheet" title="style sheet">style sheets</a> from 2.1353 - different <a href="#style-sheet-set" title="style sheet set">style sheet sets</a> have 2.1354 - their <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> unset, return 2.1355 - null and terminate these steps. 2.1356 - 2.1357 - <li> 2.1358 - <p>Otherwise, return the empty string.</p> 2.1359 - 2.1360 - <p class="note">At this point either all 2.1361 - <a href="#style-sheet" title="style sheet">style sheets</a> with a non-empty 2.1362 - <a href="#style-sheet-title">style sheet title</a> have the 2.1363 - <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> set, or there are no such 2.1364 - <a href="#style-sheet" title="style sheet">style sheets</a>.</p> 2.1365 - </li> 2.1366 - </ol> 2.1367 - 2.1368 - <p>On setting the 2.1369 - <code title="dom-Document-selectedStyleSheetSet"><a href="#dom-document-selectedStyleSheetSet">selectedStyleSheetSet</a></code> 2.1370 - attribute these steps must be run:</p> 2.1371 - 2.1372 - <ol> 2.1373 - <li><p>If the value is null terminate this set of steps.</li> 2.1374 - 2.1375 - <li><p>Otherwise, <a href="#select-a-style-sheet-set">select a style sheet set</a> with as name the 2.1376 - value passed.</li> 2.1377 - </ol> 2.1378 - 2.1379 - <p>From the DOM's perspective, all views have the same 2.1380 - <code title="dom-Document-selectedStyleSheetSet"><a href="#dom-document-selectedStyleSheetSet">selectedStyleSheetSet</a></code>. 2.1381 - If a user agent supports multiple views with different selected 2.1382 - alternative style sheets, then this attribute (and the 2.1383 - <code><a href="#stylesheet">StyleSheet</a></code> interface's 2.1384 - <code title="dom-StyleSheet-disabled"><a href="#dom-stylesheet-disabled">disabled</a></code> attribute) 2.1385 - must return and set the value for the default 2.1386 - view.</p> 2.1387 - <!-- XXX clean up once we get rid of views --> 2.1388 - 2.1389 - <p>The 2.1390 - <dfn id="dom-document-lastStyleSheetSet" title="dom-Document-lastStyleSheetSet"><code>lastStyleSheetSet</code></dfn> 2.1391 - attribute must return the 2.1392 - <a href="#last-style-sheet-set-name">last style sheet set name</a>.</p> 2.1393 - 2.1394 - <p class="note">This attribute is initially null.</p> 2.1395 - 2.1396 - <p>The 2.1397 - <dfn id="dom-document-preferredStyleSheetSet" title="dom-Document-preferredStyleSheetSet"><code>preferredStyleSheetSet</code></dfn> 2.1398 - attribute must return the 2.1399 - <a href="#preferred-style-sheet-set-name">preferred style sheet set name</a>.</p> 2.1400 - 2.1401 - <p class="note">Unlike 2.1402 - <code title="dom-Document-lastStyleSheetSet"><a href="#dom-document-lastStyleSheetSet">lastStyleSheetSet</a></code>, 2.1403 - this attribute is initially the empty string.</p> <!-- XXX change? --> 2.1404 - 2.1405 - <p>The 2.1406 - <dfn id="dom-document-styleSheetSets" title="dom-Document-styleSheetSets"><code>styleSheetSets</code></dfn> 2.1407 - attribute must return a list of the 2.1408 - <a href="#style-sheet-set-name" title="style sheet set name">style sheet set names</a> of the 2.1409 - <a href="#style-sheet-set" title="style sheet set">style sheet sets</a>, in order of the 2.1410 - <a href="#document-style-sheets">document style sheets</a>.</p> 2.1411 - 2.1412 - <p>The 2.1413 - <dfn id="dom-document-enablestylesheetsforset" title="dom-Document-enableStyleSheetsForSet"><code>enableStyleSheetsForSet(<var title="">name</var>)</code></dfn> 2.1414 - method must, when invoked, run these steps:</p> 2.1415 - 2.1416 - <ol> 2.1417 - <li><p>If <var title="">name</var> is null terminate these 2.1418 - steps.</li> 2.1419 - 2.1420 - <li><p><a href="#enable-a-style-sheet-set">Enable a style sheet set</a> with name 2.1421 - <var title="">name</var>.</li> 2.1422 - </ol> 2.1423 - 2.1424 - <p class="note"><a href="#style-sheet" title="Style sheet">Style sheets</a> with an 2.1425 - empty <a href="#style-sheet-title">style sheet title</a> are never affected by this method. 2.1426 - This method does not change the values of the 2.1427 - <code title="dom-Document-lastStyleSheetSet"><a href="#dom-document-lastStyleSheetSet">lastStyleSheetSet</a></code> or 2.1428 - <code title="dom-Document-preferredStyleSheetSet"><a href="#dom-document-preferredStyleSheetSet">preferredStyleSheetSet</a></code> 2.1429 - attributes.</p> 2.1430 - 2.1431 + <!-- ........................................................................................................................ --> 2.1432 + 2.1433 + <h4 id="the-stylesheetlist-sequence"><span class="secno">6.2.2 </span>The <code>StyleSheetList</code> Sequence</h4> 2.1434 + 2.1435 + <p>The <code>StyleSheetList</code> sequence represents an ordered collection of <span title="style sheets">style sheets</span>.</p> 2.1436 +<pre class="idl">[[TBD - TYPEDEF]] 2.1437 +</pre> 2.1438 + 2.1439 + 2.1440 + <!-- ........................................................................................................................ --> 2.1441 + 2.1442 + <h4 id="extensions-to-the-document-interface"><span class="secno">6.2.3 </span>Extensions to the <code>Document</code> Interface</h4> 2.1443 + 2.1444 + 2.1445 +<pre class="idl"><span class="idlInterface" id="widl-def-Document">partial interface <span class="idlInterfaceID">Document</span> { 2.1446 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>StyleSheetList</a></span> <span class="idlAttrName"><a href="#widl-Document-styleSheets">styleSheets</a></span>;</span> 2.1447 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-Document-selectedStyleSheetSet">selectedStyleSheetSet</a></span>;</span> 2.1448 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-Document-lastStyleSheetSet">lastStyleSheetSet</a></span>;</span> 2.1449 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-Document-preferredStyleSheetSet">preferredStyleSheetSet</a></span>;</span> 2.1450 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMStringList</a></span> <span class="idlAttrName"><a href="#widl-Document-styleSheetSets">styleSheetSets</a></span>;</span> 2.1451 +<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-Document-enableStyleSheetsForSet-void-DOMString-name">enableStyleSheetsForSet</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">name</span></span>);</span> 2.1452 +};</span></pre> 2.1453 +<dl class="attributes"> 2.1454 +<dt class="attribute"> 2.1455 +<code>styleSheets</code> of type <span class="idlAttrType"><a>StyleSheetList</a></span>, readonly</dt> 2.1456 +<dd> 2.1457 +<p>The <code>styleSheets</code> attribute must return a <code>StyleSheetList</code> sequence representing the <a href="#document-style-sheets">document style sheets</a>.</p> <p class="note">Because of historical IDL limitations the <code>styleSheets</code> attribute used to be on a separate interface, <code>DocumentStyle</code>.</dd> 2.1458 +<dt class="attribute"> 2.1459 +<code>selectedStyleSheetSet</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 2.1460 +<dd> 2.1461 +<p>The <code>selectedStyleSheetSet</code> attribute must, on getting, must run these steps:</p> <ol> <li><p>If there is a single <a href="#enabled-style-sheet-set">enabled style sheet set</a> and no other <a href="#document-style-sheets">document style sheets</a> with a non-empty <a href="#style-sheet-title">style sheet title</a> have the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> unset, return the <a href="#style-sheet-set-name">style sheet set name</a> of the <a href="#enabled-style-sheet-set">enabled style sheet set</a> and terminate these steps.</li> <li><p>Otherwise, if <a href="#style-sheet" title="style sheet">style sheets</a> from different <a href="#style-sheet-set" title="style sheet set">style sheet sets</a> have their <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> unset, return null and terminate these steps.</li> <li> <p>Otherwise, return the empty string.</p> <p class="note">At this point either all <a href="#style-sheet" title="style sheet">style sheets</a> with a non-empty <a href="#style-sheet-title">style sheet title</a> have the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> set, or there are no such <a href="#style-sheet" title="style sheet">style sheets</a>.</p> </li> </ol> <p>On setting the <code title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code> attribute these steps must be run:</p> <ol> <li><p>If the value is null terminate this set of steps.</li> <li><p>Otherwise, <a href="#select-a-style-sheet-set">select a style sheet set</a> with as name the value passed.</li> </ol> <p>From the DOM's perspective, all views have the same <code title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code>. If a user agent supports multiple views with different selected alternative style sheets, then this attribute (and the <code>StyleSheet</code> interface's <code title="dom-StyleSheet-disabled">disabled</code> attribute) must return and set the value for the default view.</dd> 2.1462 +<dt class="attribute"> 2.1463 +<code>lastStyleSheetSet</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 2.1464 +<dd> 2.1465 +<p>The <code>lastStyleSheetSet</code> attribute must return the <a href="#last-style-sheet-set-name">last style sheet set name</a>.</p> <p class="note">This attribute is initially null.</dd> 2.1466 +<dt class="attribute"> 2.1467 +<code>preferredStyleSheetSet</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 2.1468 +<dd> 2.1469 +<p>The <code>preferredStyleSheetSet</code> attribute must return the <a href="#preferred-style-sheet-set-name">preferred style sheet set name</a>.</p> <p class="note">Unlike <code title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code>, this attribute is initially the empty string.</dd> 2.1470 +<dt class="attribute"> 2.1471 +<code>styleSheetSets</code> of type <span class="idlAttrType"><a>DOMStringList</a></span>, readonly</dt> 2.1472 +<dd> 2.1473 +<p>The <code>styleSheetSets</code> attribute must return a list of the <a href="#style-sheet-set-name" title="style sheet set name">style sheet set names</a> of the <a href="#style-sheet-set" title="style sheet set">style sheet sets</a>, in order of the <a href="#document-style-sheets">document style sheets</a>.</dd> 2.1474 +</dl> 2.1475 +<dl class="methods"> 2.1476 +<dt class="method"> 2.1477 +<code>enableStyleSheetsForSet</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 2.1478 +<dd> 2.1479 +<p>The <code>enableStyleSheetsForSet</code> operation must, when invoked, run these steps:</p> <ol> <li><p>If <var>name</var> is null terminate these steps.</li> <li><p><a href="#enable-a-style-sheet-set">Enable a style sheet set</a> with name <var>name</var>.</li> </ol> <p class="note"><a href="#style-sheet" title="Style sheet">Style sheets</a> with an empty <a href="#style-sheet-title">style sheet title</a> are never affected by this method. This method does not change the values of the <code title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code> or <code title="dom-Document-preferredStyleSheetSet">preferredStyleSheetSet</code> attributes.</dd> 2.1480 +</dl> 2.1481 + 2.1482 + 2.1483 + <!-- ........................................................................................................................ --> 2.1484 2.1485 <h4 id="interaction-with-the-user-interface"><span class="secno">6.2.4 </span>Interaction with the User Interface</h4> 2.1486 2.1487 <p>The user interface of Web browsers that support style sheets 2.1488 should list the style sheet titles given in the 2.1489 - <code title="dom-Document-styleSheetSets"><a href="#dom-document-styleSheetSets">styleSheetSets</a></code> list, 2.1490 + <code title="dom-Document-styleSheetSets">styleSheetSets</code> list, 2.1491 showing the 2.1492 - <code title="dom-Document-selectedStyleSheetSet"><a href="#dom-document-selectedStyleSheetSet">selectedStyleSheetSet</a></code> 2.1493 + <code title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code> 2.1494 as the selected style sheet set, leaving none selected if it is 2.1495 null or the empty string, and selecting an extra option 2.1496 "Basic Page Style" (or similar) if it is the empty string and the 2.1497 - <code title="dom-Document-preferredStyleSheetSet"><a href="#dom-document-preferredStyleSheetSet">preferredStyleSheetSet</a></code> 2.1498 + <code title="dom-Document-preferredStyleSheetSet">preferredStyleSheetSet</code> 2.1499 is the empty string as well.</p> 2.1500 2.1501 <p>Selecting a style sheet from this list should 2.1502 use the <a href="#select-a-style-sheet-set">select a style sheet set</a> set of steps. This 2.1503 (by definition) affects the 2.1504 - <code title="dom-Document-lastStyleSheetSet"><a href="#dom-document-lastStyleSheetSet">lastStyleSheetSet</a></code> 2.1505 + <code title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code> 2.1506 attribute.</p> 2.1507 2.1508 <h5 id="persisting-the-selected-style-sheet-set"><span class="secno">6.2.4.1 </span>Persisting the selected style sheet set</h5> 2.1509 2.1510 <p>If a user agent persist the selected style sheet set, they should use 2.1511 the value of the 2.1512 - <code title="dom-Document-selectedStyleSheetSet"><a href="#dom-document-selectedStyleSheetSet">selectedStyleSheetSet</a></code> 2.1513 + <code title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code> 2.1514 attribute, or if that is null, the 2.1515 - <code title="dom-Document-lastStyleSheetSet"><a href="#dom-document-lastStyleSheetSet">lastStyleSheetSet</a></code> 2.1516 + <code title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code> 2.1517 attribute, when leaving the page (or at some other time) to determine the 2.1518 set name to store. If that is null then the style sheet set should not be 2.1519 persisted.</p> 2.1520 @@ -1381,6 +1223,8 @@ 2.1521 <!-- XXX this UI section suggests we may want to introduce a few more 2.1522 idioms --> 2.1523 2.1524 + <!-- ........................................................................................................................ --> 2.1525 + 2.1526 <h4 id="examples"><span class="secno">6.2.5 </span>Examples</h4> 2.1527 2.1528 <div class="example"> 2.1529 @@ -1398,11 +1242,11 @@ 2.1530 2.1531 <p>...the style sheets that end up enabled are style sheets "a", "b", 2.1532 and "c", the 2.1533 - <code title="dom-Document-selectedStyleSheetSet"><a href="#dom-document-selectedStyleSheetSet">selectedStyleSheetSet</a></code> 2.1534 + <code title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code> 2.1535 attribute would return null, 2.1536 - <code title="dom-Document-lastStyleSheetSet"><a href="#dom-document-lastStyleSheetSet">lastStyleSheetSet</a></code> 2.1537 + <code title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code> 2.1538 would return "foo", and 2.1539 - <code title="dom-Document-preferredStyleSheetSet"><a href="#dom-document-preferredStyleSheetSet">preferredStyleSheetSet</a></code> 2.1540 + <code title="dom-Document-preferredStyleSheetSet">preferredStyleSheetSet</code> 2.1541 would return the empty string.</p> 2.1542 2.1543 <p>Similarly, in the following HTML snippet:</p> 2.1544 @@ -1425,20 +1269,20 @@ 2.1545 will be enabled. This is the case even though the first script block 2.1546 sets style sheet "b" to be enabled, because upon parsing the 2.1547 following <code><link></code> element, the 2.1548 - <code title="dom-Document-preferredStyleSheetSet"><a href="#dom-document-preferredStyleSheetSet">preferredStyleSheetSet</a></code> 2.1549 + <code title="dom-Document-preferredStyleSheetSet">preferredStyleSheetSet</code> 2.1550 is set and the 2.1551 - <code title="dom-Document-enableStyleSheetsForSet"><a href="#dom-document-enablestylesheetsforset">enableStyleSheetsForSet()</a></code> 2.1552 + <code title="dom-Document-enableStyleSheetsForSet">enableStyleSheetsForSet()</code> 2.1553 method is called (since 2.1554 - <code title="dom-Document-selectedStyleSheetSet"><a href="#dom-document-selectedStyleSheetSet">selectedStyleSheetSet</a></code> 2.1555 + <code title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code> 2.1556 was never set 2.1557 explicitly, leaving 2.1558 - <code title="dom-Document-lastStyleSheetSet"><a href="#dom-document-lastStyleSheetSet">lastStyleSheetSet</a></code> at 2.1559 + <code title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code> at 2.1560 null throughout), which changes which style sheets are enabled and which 2.1561 are not.</p> 2.1562 </div> 2.1563 2.1564 - 2.1565 - 2.1566 + <!-- ........................................................................................................................ --> 2.1567 + <!-- ........................................................................................................................ --> 2.1568 2.1569 <h3 id="style-sheet-association"><span class="secno">6.3 </span>Style Sheet Association</h3> 2.1570 2.1571 @@ -1449,7 +1293,7 @@ 2.1572 and HTTP <code title="http-link">Link</code> headers when the link 2.1573 relation type is an 2.1574 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for 2.1575 - "<code title="">stylesheet</code>" since nobody else was interested in 2.1576 + "<code>stylesheet</code>" since nobody else was interested in 2.1577 defining this.</p> 2.1578 2.1579 <p class="note">The editor is in good hope that HTML and SVG will define the 2.1580 @@ -1457,26 +1301,26 @@ 2.1581 this specification, in due course.</p> 2.1582 2.1583 2.1584 - <h4 id="the-linkstyle-interface"><span class="secno">6.3.1 </span>The <code title="">LinkStyle</code> Interface</h4> 2.1585 - 2.1586 - <p>The <dfn id="associated-style-sheet">associated style sheet</dfn> of a 2.1587 - node is the <a href="#style-sheet">style sheet</a> in the list of 2.1588 - <a href="#document-style-sheets">document style sheets</a> of which the 2.1589 - <a href="#style-sheet-owner-node">style sheet owner node</a> 2.1590 - implements the <code><a href="#linkstyle">LinkStyle</a></code> interface.</p> 2.1591 - 2.1592 - <pre class="idl">[NoInterfaceObject] interface <dfn id="linkstyle">LinkStyle</dfn> { 2.1593 - readonly attribute <a href="#stylesheet">StyleSheet</a> <a href="#dom-linkstyle-sheet" title="dom-linkstyle-sheet">sheet</a>; 2.1594 -};</pre> 2.1595 - 2.1596 - <p>The <dfn id="dom-linkstyle-sheet" title="dom-LinkStyle-sheet"><code>sheet</code></dfn> attribute 2.1597 - must return the <a href="#associated-style-sheet">associated style sheet</a> for the node, or null, 2.1598 - if there is no <a href="#associated-style-sheet">associated style sheet</a>.</p> 2.1599 + <!-- ........................................................................................................................ --> 2.1600 + 2.1601 + <h4 id="the-linkstyle-interface"><span class="secno">6.3.1 </span>The <code>LinkStyle</code> Interface</h4> 2.1602 + 2.1603 + <p>The <dfn id="associated-style-sheet">associated style sheet</dfn> of a node is the <a href="#style-sheet">style sheet</a> in the list of <a href="#document-style-sheets">document style sheets</a> of which the <a href="#style-sheet-owner-node">style sheet owner node</a> implements the <code>LinkStyle</code> interface.</p> 2.1604 +<pre class="idl"><span class="idlInterface" id="widl-def-LinkStyle">interface <span class="idlInterfaceID">LinkStyle</span> { 2.1605 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>StyleSheet</a></span> <span class="idlAttrName"><a href="#widl-LinkStyle-sheet">sheet</a></span>;</span> 2.1606 +};</span></pre> 2.1607 +<dl class="attributes"> 2.1608 +<dt class="attribute"> 2.1609 +<code>sheet</code> of type <span class="idlAttrType"><a>StyleSheet</a></span>, readonly</dt> 2.1610 +<dd> 2.1611 +<p>The <code>sheet</code> attribute must return the <a href="#associated-style-sheet">associated style sheet</a> for the node, or null, if there is no <a href="#associated-style-sheet">associated style sheet</a>.</dd> 2.1612 +</dl> 2.1613 + 2.1614 2.1615 <div class="example"> 2.1616 <p>In the following HTML snippet the first HTML <code>style</code> 2.1617 element has a <code>sheet</code> attribute that returns a 2.1618 - <code><a href="#stylesheet">StyleSheet</a></code> object representing the style sheet, but for 2.1619 + <code>StyleSheet</code> object representing the style sheet, but for 2.1620 the second <code>style</code> attribute it returns null. 2.1621 (Assuming the user agent supports CSS (<code>text/css</code>) and does 2.1622 not support ExampleSheets (<code>text/example-sheets</code>).</p> 2.1623 @@ -1488,51 +1332,60 @@ 2.1624 <p class="note">Whether or not the node refers to a style sheet is defined 2.1625 by the specification that defines the semantics of said node.</p> 2.1626 2.1627 - 2.1628 + <!-- ........................................................................................................................ --> 2.1629 2.1630 <h4 id="requirements-on-specifications"><span class="secno">6.3.2 </span>Requirements on specifications</h4> 2.1631 2.1632 <p>Specifications introducing new ways of associating style sheets through 2.1633 the DOM should define which nodes implement the 2.1634 - <code><a href="#linkstyle">LinkStyle</a></code> interface. When doing so, they 2.1635 + <code>LinkStyle</code> interface. When doing so, they 2.1636 must also define when a <a href="#style-sheet">style sheet</a> is 2.1637 <a href="#create-a-style-sheet" title="create a style sheet">created</a>.</p> 2.1638 2.1639 2.1640 2.1641 2.1642 + <!-- ........................................................................................................................ --> 2.1643 + 2.1644 <h4 id="requirements-on-user-agents-implementing-the-xml-stylesheet-processing-instruction"><span class="secno">6.3.3 </span>Requirements on User Agents Implementing the 2.1645 - <span title=""><code>xml-stylesheet</code> processing instruction</span></h4> 2.1646 + <span><code>xml-stylesheet</code> processing instruction</span></h4> 2.1647 2.1648 <!-- XXX load/error events, reparse --> 2.1649 2.1650 - <pre class="idl"><a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#processinginstruction">ProcessingInstruction</a> implements <a href="#linkstyle">LinkStyle</a>;</pre> 2.1651 + 2.1652 +<pre class="idl">[[TBD - IMPLEMENTS]] 2.1653 +</pre> 2.1654 + 2.1655 + 2.1656 + <!-- 2.1657 + <pre class="idl"><span data-anolis-spec=dom>ProcessingInstruction</span> implements <span>LinkStyle</span>;</pre> 2.1658 + --> 2.1659 2.1660 <p>For each 2.1661 <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-xml-stylesheet"><code>xml-stylesheet</code> processing instruction</a> 2.1662 that is not part of the 2.1663 <a class="external" href="http://www.w3.org/TR/xml/#dt-doctype">document type declaration</a> and has an 2.1664 - <code title="">href</code> 2.1665 + <code>href</code> 2.1666 <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> these steps must 2.1667 (unless otherwise stated) be run:</p> 2.1668 2.1669 <ol> 2.1670 - <li><p>Let <var title="">title</var> be the value of the 2.1671 - <code title="">title</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> or the empty string if the 2.1672 - <code title="">title</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> is not specified.</li> 2.1673 - 2.1674 - <li><p>If there is an <code title="">alternate</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> 2.1675 + <li><p>Let <var>title</var> be the value of the 2.1676 + <code>title</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> or the empty string if the 2.1677 + <code>title</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> is not specified.</li> 2.1678 + 2.1679 + <li><p>If there is an <code>alternate</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> 2.1680 whose value is a <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#case-sensitive">case-sensitive</a> match 2.1681 - for "<code title="">yes</code>" and <var title="">title</var> is the 2.1682 + for "<code>yes</code>" and <var>title</var> is the 2.1683 empty string terminate these steps.</li> 2.1684 2.1685 - <li><p>If there is a <code title="">type</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> whose 2.1686 + <li><p>If there is a <code>type</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> whose 2.1687 value is not a <a href="#supported-styling-language">supported styling language</a> the user agent 2.1688 may terminate these steps.</li> 2.1689 2.1690 <li><p><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#resolve-a-url" title="Resolve a URL">Resolve</a> 2.1691 the <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#url">URL</a> specified by the 2.1692 - <code title="">href</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> and then 2.1693 + <code>href</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> and then 2.1694 <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch">fetch</a> it.</li> 2.1695 2.1696 <li> 2.1697 @@ -1542,7 +1395,7 @@ 2.1698 <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#content-type">Content-Type metadata</a> of 2.1699 the resource is not a <a href="#supported-styling-language">supported styling language</a> change the 2.1700 <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#content-type">Content-Type metadata</a> of the resource 2.1701 - to <code title="">text/css</code>.</p> 2.1702 + to <code>text/css</code>.</p> 2.1703 2.1704 <p class="note">This step might never actually happen, but is included 2.1705 here in case other specifications change, to keep things consistent.</p> 2.1706 @@ -1569,14 +1422,14 @@ 2.1707 <dd><p>null</dd> 2.1708 2.1709 <dt><a href="#style-sheet-media">style sheet media</a></dt> 2.1710 - <dd><p>The value of the <code title="">media</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> 2.1711 + <dd><p>The value of the <code>media</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> 2.1712 if any, or the empty string otherwise.</dd> 2.1713 2.1714 <dt><a href="#style-sheet-title">style sheet title</a></dt> 2.1715 - <dd><p><var title="">title</var></dd> 2.1716 + <dd><p><var>title</var></dd> 2.1717 2.1718 <dt><a href="#style-sheet-alternate-flag">style sheet alternate flag</a></dt> 2.1719 - <dd><p>Set if the <code title="">alternate</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> 2.1720 + <dd><p>Set if the <code>alternate</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> 2.1721 value is a <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#case-sensitive">case-sensitive</a> match for 2.1722 "<code>yes</code>", or unset otherwise. 2.1723 </dl> 2.1724 @@ -1585,8 +1438,10 @@ 2.1725 2.1726 2.1727 2.1728 + <!-- ........................................................................................................................ --> 2.1729 + 2.1730 <h4 id="requirements-on-user-agents-implementing-the-http-link-header"><span class="secno">6.3.4 </span>Requirements on User Agents Implementing the HTTP 2.1731 - <code title="">Link</code> Header</h4> 2.1732 + <code>Link</code> Header</h4> 2.1733 2.1734 <!-- XXX ref, one day --> 2.1735 2.1736 @@ -1595,17 +1450,17 @@ 2.1737 <p>For each HTTP <code title="http-link">Link</code> header of which one 2.1738 of the link relation types is an 2.1739 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match 2.1740 - for "<code title="">stylesheet</code>" these steps 2.1741 + for "<code>stylesheet</code>" these steps 2.1742 must be run:</p> 2.1743 2.1744 <ol> 2.1745 - <li><p>Let <var title="">title</var> be the value of the first of all the 2.1746 - <code title="">title</code> and <code title="">title*</code> parameters. 2.1747 + <li><p>Let <var>title</var> be the value of the first of all the 2.1748 + <code>title</code> and <code>title*</code> parameters. 2.1749 If there are no such parameters it is the empty string.</li> 2.1750 2.1751 <li><p>If one of the (other) link relation types is an 2.1752 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for 2.1753 - "<code title="">alternate</code>" and <var title="">title</var> is the 2.1754 + "<code>alternate</code>" and <var>title</var> is the 2.1755 empty string terminate these steps.</li> 2.1756 2.1757 <li><p><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#resolve-a-url" title="Resolve a URL">Resolve</a> 2.1758 @@ -1617,7 +1472,7 @@ 2.1759 and the <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#content-type">Content-Type metadata</a> of 2.1760 the resource is not a <a href="#supported-styling-language">supported styling language</a> change the 2.1761 <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#content-type">Content-Type metadata</a> of the resource 2.1762 - to <code title="">text/css</code>.</li> 2.1763 + to <code>text/css</code>.</li> 2.1764 2.1765 <li><p>If the resource is not in a 2.1766 <a href="#supported-styling-language">supported styling language</a> terminate these steps.</li> 2.1767 @@ -1643,21 +1498,23 @@ 2.1768 <dd><p>null</dd> 2.1769 2.1770 <dt><a href="#style-sheet-media">style sheet media</a></dt> 2.1771 - <dd><p>The value of the first <code title="">media</code> parameter.</dd> 2.1772 + <dd><p>The value of the first <code>media</code> parameter.</dd> 2.1773 <!-- XXX register media parameter? bah --> 2.1774 2.1775 <dt><a href="#style-sheet-title">style sheet title</a></dt> 2.1776 - <dd><p><var title="">title</var></dd> 2.1777 + <dd><p><var>title</var></dd> 2.1778 2.1779 <dt><a href="#style-sheet-alternate-flag">style sheet alternate flag</a></dt> 2.1780 <dd><p>Set if one of the specified link relation type for this HTTP 2.1781 <code title="http-link">Link</code> header is an 2.1782 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for 2.1783 - "<code title="">alternate</code>", or false otherwise. 2.1784 + "<code>alternate</code>", or false otherwise. 2.1785 </dl> 2.1786 </li> 2.1787 </ol> 2.1788 2.1789 + <!-- ........................................................................................................................ --> 2.1790 + <!-- ........................................................................................................................ --> 2.1791 2.1792 <h3 id="css-rules"><span class="secno">6.4 </span>CSS Rules</h3> 2.1793 2.1794 @@ -1667,383 +1524,274 @@ 2.1795 follows:</p> 2.1796 2.1797 <dl class="switch"> 2.1798 - <dt><code><a href="#cssstylerule">CSSStyleRule</a></code></dt> 2.1799 + <dt><code>CSSStyleRule</code></dt> 2.1800 <dd class="XXX">...</dd> 2.1801 2.1802 - <dt><code><a href="#cssimportrule">CSSImportRule</a></code></dt> 2.1803 + <dt><code>CSSImportRule</code></dt> 2.1804 <dd> 2.1805 <p>The result of concatenating these strings:</p> 2.1806 <ol> 2.1807 <li>The literal string "<code>@import</code>", followed by a space 2.1808 (U+0020), followed by the <a href="#serialize-a-url" title="serialize a URL">URL escaped</a> 2.1809 - value of the <code title="dom-CSSImportRule-href"><a href="#dom-cssimportrule-href">href</a></code> 2.1810 + value of the <code title="dom-CSSImportRule-href">href</code> 2.1811 attribute.</li> 2.1812 - <li>If the associated <code><a href="#medialist">MediaList</a></code> object is not empty, a 2.1813 + <li>If the associated <code>MediaList</code> object is not empty, a 2.1814 space (U+0020), followed by the value of the 2.1815 - <code title="dom-MediaList-mediaText"><a href="#dom-medialist-mediatext">mediaText</a></code> attribute of the 2.1816 - associated <code><a href="#medialist">MediaList</a></code> object.</li> 2.1817 + <code title="dom-MediaList-mediaText">mediaText</code> attribute of the 2.1818 + associated <code>MediaList</code> object.</li> 2.1819 <li>A "<code>;</code>" (U+003B).</li> 2.1820 </ol> 2.1821 </dd> 2.1822 2.1823 - <dt><code><a href="#cssmediarule">CSSMediaRule</a></code></dt> 2.1824 + <dt><code>CSSMediaRule</code></dt> 2.1825 <dd class="XXX">...</dd> 2.1826 2.1827 - <dt><code><a href="#cssfontfacerule">CSSFontFaceRule</a></code></dt> 2.1828 + <dt><code>CSSFontFaceRule</code></dt> 2.1829 <dd class="XXX">...</dd> 2.1830 2.1831 - <dt><code><a href="#csspagerule">CSSPageRule</a></code></dt> 2.1832 + <dt><code>CSSPageRule</code></dt> 2.1833 <dd class="XXX">...</dd> 2.1834 2.1835 - <dt><code><a href="#cssnamespacerule">CSSNamespaceRule</a></code></dt> 2.1836 + <dt><code>CSSNamespaceRule</code></dt> 2.1837 <dd><p>The literal string "<code>@namespace</code>", followed by a space 2.1838 (U+0020), followed by the 2.1839 <a href="#serialize-an-identifier" title="serialize an identifier">identifier escaped</a> value of the 2.1840 - <code title="dom-CSSNamespaceRule-prefix"><a href="#dom-cssnamespacerule-prefix">prefix</a></code> attribute (if 2.1841 + <code title="dom-CSSNamespaceRule-prefix">prefix</code> attribute (if 2.1842 any), followed by a space (U+0020) if there is a prefix, followed by the 2.1843 <a href="#serialize-a-url" title="serialize a URL">URL escaped</a> value of the 2.1844 - <code title="dom-CSSNamespaceRule-namespaceURI"><a href="#dom-cssnamespacerule-namespaceuri">namespaceURI</a></code> 2.1845 + <code title="dom-CSSNamespaceRule-namespaceURI">namespaceURI</code> 2.1846 attribute, followed the character "<code>;</code>" (U+003B).</dd> 2.1847 </dl> 2.1848 2.1849 - <p>To <dfn id="insert-a-css-rule">insert a CSS rule</dfn> <var title="">rule</var> into a 2.1850 - CSS rule list <var title="">list</var> at location 2.1851 - <var title="">index</var> follow these steps:</p> 2.1852 + <p>To <dfn id="insert-a-css-rule">insert a CSS rule</dfn> <var>rule</var> into a 2.1853 + CSS rule list <var>list</var> at location 2.1854 + <var>index</var> follow these steps:</p> 2.1855 2.1856 <ol> 2.1857 - <li><p>If <var title="">index</var> is negative or greater than the 2.1858 - length of the <var title="">list</var>, 2.1859 + <li><p>If <var>index</var> is negative or greater than the 2.1860 + length of the <var>list</var>, 2.1861 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an 2.1862 "<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#indexsizeerror">IndexSizeError</a></code>" exception and 2.1863 - terminate these steps. 2.1864 + terminate these steps.</li> 2.1865 2.1866 <li><p><a href="#parse-a-css-rule" title="Parse a CSS rule">Parse</a> 2.1867 - <var title="">rule</var>.</li> 2.1868 + <var>rule</var>.</li> 2.1869 2.1870 <li><p>If parsing failed terminate these steps.</li> 2.1871 2.1872 <li><p>If the new object can not be inserted within the 2.1873 - <var title="">list</var> at the given <var title="">index</var> due to 2.1874 + <var>list</var> at the given <var>index</var> due to 2.1875 limitations of the CSS specification, 2.1876 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an 2.1877 "<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#hierarchyrequesterror">HierarchyRequestError</a></code>" exception and 2.1878 - terminate these steps. 2.1879 - 2.1880 - <li><p>Insert the new object at the given <var title="">index</var> 2.1881 - within the <var title="">list</var>.</li> 2.1882 + terminate these steps.</li> 2.1883 + 2.1884 + <li><p>Insert the new object at the given <var>index</var> 2.1885 + within the <var>list</var>.</li> 2.1886 </ol> 2.1887 2.1888 <p>To <dfn id="remove-a-css-rule">remove a CSS rule</dfn> from CSS rule list 2.1889 - <var title="">list</var> at location <var title="">index</var> follow 2.1890 + <var>list</var> at location <var>index</var> follow 2.1891 these steps:</p> 2.1892 2.1893 <ol> 2.1894 - <li><p>If <var title="">index</var> is negative or greater than the 2.1895 - length of the <var title="">list</var> 2.1896 + <li><p>If <var>index</var> is negative or greater than the 2.1897 + length of the <var>list</var> 2.1898 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an 2.1899 "<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#indexsizeerror">IndexSizeError</a></code>" exception and terminate these steps.</li> 2.1900 2.1901 - <li><p>Remove the object at <var title="">index</var> from 2.1902 - <var title="">list</var>.</li> 2.1903 + <li><p>Remove the object at <var>index</var> from 2.1904 + <var>list</var>.</li> 2.1905 </ol> 2.1906 2.1907 2.1908 - <h4 id="the-cssrulelist-sequence"><span class="secno">6.4.1 </span>The <code title="">CSSRuleList</code> Sequence</h4> 2.1909 - 2.1910 - <p>The <code><a href="#cssrulelist">CSSRuleList</a></code> object represents an ordered collection of 2.1911 - CSS rules.</p> 2.1912 - 2.1913 - <pre class="idl">typedef sequence<<a href="#cssrule">CSSRule</a>> <dfn id="cssrulelist">CSSRuleList</dfn>;</pre> 2.1914 - 2.1915 - 2.1916 - <h4 id="the-cssrule-interface"><span class="secno">6.4.2 </span>The <code title="">CSSRule</code> Interface</h4> 2.1917 - 2.1918 - <p>The <code><a href="#cssrule">CSSRule</a></code> interface is a base interface. Each unique 2.1919 - CSS rule has its own interface which inherits from this one.</p> 2.1920 - 2.1921 - <pre class="idl">interface <dfn id="cssrule">CSSRule</dfn> { 2.1922 - // Types 2.1923 - const unsigned short <a href="#dom-cssrule-style_rule" title="dom-CSSRule-STYLE_RULE">STYLE_RULE</a> = 1; 2.1924 - const unsigned short <a href="#dom-cssrule-import_rule" title="dom-CSSRule-IMPORT_RULE">IMPORT_RULE</a> = 3; 2.1925 - const unsigned short <a href="#dom-cssrule-media_rule" title="dom-CSSRule-MEDIA_RULE">MEDIA_RULE</a> = 4; 2.1926 - const unsigned short <a href="#dom-cssrule-font_face_rule" title="dom-CSSRule-FONT_FACE_RULE">FONT_FACE_RULE</a> = 5; 2.1927 - const unsigned short <a href="#dom-cssrule-page_rule" title="dom-CSSRule-PAGE_RULE">PAGE_RULE</a> = 6; 2.1928 - const unsigned short <a href="#dom-cssrule-namespace_rule" title="dom-CSSRule-NAMESPACE_RULE">NAMESPACE_RULE</a> = 10; 2.1929 - readonly attribute unsigned short <a href="#dom-cssrule-type" title="dom-CSSRule-type">type</a>; 2.1930 - 2.1931 - // Parsing and serialization 2.1932 - attribute DOMString <a href="#dom-cssrule-csstext" title="dom-CSSRule-cssText">cssText</a>; 2.1933 - 2.1934 - // Context 2.1935 - readonly attribute <a href="#cssrule">CSSRule</a> <a href="#dom-cssrule-parentrule" title="dom-CSSRule-parentRule">parentRule</a>; 2.1936 - readonly attribute <a href="#cssstylesheet">CSSStyleSheet</a> <a href="#dom-cssrule-parentstylesheet" title="dom-CSSRule-parentStyleSheet">parentStyleSheet</a>; 2.1937 -};</pre> 2.1938 - 2.1939 - 2.1940 - <p>The 2.1941 - <dfn id="dom-cssrule-type" title="dom-CSSRule-type"><code>type</code></dfn> 2.1942 - attribute must return the <span>CSS rule</span> type, 2.1943 - as follows:</p> 2.1944 - 2.1945 - <dl class="switch"> 2.1946 - <dt><dfn id="dom-cssrule-style_rule" title="dom-CSSRule-STYLE_RULE"><code>STYLE_RULE</code></dfn> (numeric value 1)</dt> 2.1947 - <dd>The object is a <code><a href="#cssstylerule">CSSStyleRule</a></code>.</dd> 2.1948 - <dt><dfn id="dom-cssrule-import_rule" title="dom-CSSRule-IMPORT_RULE"><code>IMPORT_RULE</code></dfn> (numeric value 3)</dt> 2.1949 - <dd>The object is a <code><a href="#cssimportrule">CSSImportRule</a></code>.</dd> 2.1950 - <dt><dfn id="dom-cssrule-media_rule" title="dom-CSSRule-MEDIA_RULE"><code>MEDIA_RULE</code></dfn> (numeric value 4)</dt> 2.1951 - <dd>The object is a <code><a href="#cssmediarule">CSSMediaRule</a></code>.</dd> 2.1952 - <dt><dfn id="dom-cssrule-font_face_rule" title="dom-CSSRule-FONT_FACE_RULE"><code>FONT_FACE_RULE</code></dfn> (numeric value 5)</dt> 2.1953 - <dd>The object is a <code><a href="#cssfontfacerule">CSSFontFaceRule</a></code>.</dd> 2.1954 - <dt><dfn id="dom-cssrule-page_rule" title="dom-CSSRule-PAGE_RULE"><code>PAGE_RULE</code></dfn> (numeric value 6)</dt> 2.1955 - <dd>The object is a <code><a href="#csspagerule">CSSPageRule</a></code>.</dd> 2.1956 - <dt><dfn id="dom-cssrule-namespace_rule" title="dom-CSSRule-NAMESPACE_RULE"><code>NAMESPACE_RULE</code></dfn> (numeric value 10)</dt> 2.1957 - <dd>The object is a <code><a href="#cssnamespacerule">CSSNamespaceRule</a></code>.</dd> 2.1958 - </dl> 2.1959 - 2.1960 - <p class="note">Constants with values 0 and 2 have been obsoleted by this 2.1961 - specification. They might be re-allocated in the future. 2.1962 - 2.1963 - <p class="note">Constants for new and proprietary features are coordinated 2.1964 - on the 2.1965 - <a href="http://wiki.csswg.org/spec/cssom-constants">CSSOM Constants</a> 2.1966 - wiki page. 2.1967 - 2.1968 - <p>The 2.1969 - <dfn id="dom-cssrule-csstext" title="dom-CSSRule-cssText"><code>cssText</code></dfn> 2.1970 - attribute, on getting, must return a 2.1971 - <a href="#serialize-a-css-rule" title="serialize a CSS rule">serialization</a> of the 2.1972 - <span>CSS rule</span>.</p> 2.1973 - 2.1974 - <p>On setting the <code title="dom-CSSRule-cssText"><a href="#dom-cssrule-csstext">cssText</a></code> 2.1975 - attribute these steps must be run:</p> 2.1976 - 2.1977 - <ol> 2.1978 - <li><p><a href="#parse-a-css-rule" title="Parse a CSS rule">Parse</a> the value.</li> 2.1979 - 2.1980 - <li><p>If parsing failed terminate this algorithm.</li> 2.1981 - 2.1982 - <li><p>If the <code title="dom-CSSRule-type"><a href="#dom-cssrule-type">type</a></code> of the new 2.1983 - object does not match the <code title="dom-CSSRule-type"><a href="#dom-cssrule-type">type</a></code> of 2.1984 - the current object 2.1985 - <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an 2.1986 - "<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#invalidmodificationerror">InvalidModificationError</a></code>" exception. 2.1987 - 2.1988 - <li><p>Replace the current object with the new object.</li> 2.1989 - </ol> 2.1990 - 2.1991 - 2.1992 - <p>The 2.1993 - <dfn id="dom-cssrule-parentrule" title="dom-CSSRule-parentRule"><code>parentRule</code></dfn> 2.1994 - attribute must return the nearest enclosing rule of the 2.1995 - current rule or null, if there is no enclosing rule.</p> 2.1996 - 2.1997 - <p class="note">E.g. <code title="">@media</code> can enclose a rule.</p> 2.1998 - 2.1999 - <p>The 2.2000 - <dfn id="dom-cssrule-parentstylesheet" title="dom-CSSRule-parentStyleSheet"><code>parentStyleSheet</code></dfn> 2.2001 - attribute must return the <code><a href="#cssstylesheet">CSSStyleSheet</a></code> 2.2002 - object that contains the the current rule.</p> 2.2003 - 2.2004 - 2.2005 - 2.2006 - <h4 id="css-style-rule-rule-set"><span class="secno">6.4.3 </span>CSS Style Rule (Rule Set)</h4> 2.2007 - 2.2008 - <p>The <code><a href="#cssstylerule">CSSStyleRule</a></code> object represents a rule set.</p> 2.2009 - <!-- XXX ref --> 2.2010 - 2.2011 - <pre class="idl">interface <dfn id="cssstylerule">CSSStyleRule</dfn> : <a href="#cssrule">CSSRule</a> { 2.2012 - attribute DOMString <a href="#dom-cssstylerule-selectortext" title="dom-CSSStyleRule-selectorText">selectorText</a>; 2.2013 - readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-cssstylerule-style" title="dom-CSSStyleRule-style">style</a>; 2.2014 -};</pre> 2.2015 - 2.2016 - <p>The 2.2017 - <dfn id="dom-cssstylerule-selectortext" title="dom-CSSStyleRule-selectorText"><code>selectorText</code></dfn> 2.2018 - attribute, on getting, must return the result of 2.2019 - <a href="#serialize-a-group-of-selectors" title="serialize a group of selectors">serializing</a> the 2.2020 - associated <span>group of selectors</span>.</p> 2.2021 - 2.2022 - <p>On setting the 2.2023 - <code title="dom-CSSStyleRule-selectorText"><a href="#dom-cssstylerule-selectortext">selectorText</a></code> attribute 2.2024 - these steps must be run:</p> 2.2025 - 2.2026 - <ol> 2.2027 - <li><p>Run the <a href="#parse-a-group-of-selectors">parse a group of selectors</a> algorithm on the 2.2028 - given value.</li> 2.2029 - 2.2030 - <li><p>If the algorithm returns a non-null value replace the associated 2.2031 - <span>group of selectors</span> with the returned value.</li> 2.2032 - 2.2033 - <li><p>Otherwise, if the algorithm returns a null value, do 2.2034 - nothing.</li> 2.2035 - </ol> 2.2036 - 2.2037 - <p>The 2.2038 - <dfn id="dom-cssstylerule-style" title="dom-CSSStyleRule-style"><code>style</code></dfn> 2.2039 - attribute must return a 2.2040 - <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> object for the rule set.</p> 2.2041 - 2.2042 - 2.2043 - <h4 id="css-import-rule"><span class="secno">6.4.4 </span>CSS <code title="">@import</code> Rule</h4> 2.2044 - 2.2045 - <p>The <code><a href="#cssimportrule">CSSImportRule</a></code> object represents an 2.2046 - <code>@import</code> rule.</p> 2.2047 - 2.2048 - <pre class="idl">interface <dfn id="cssimportrule">CSSImportRule</dfn> : <a href="#cssrule">CSSRule</a> { 2.2049 - readonly attribute DOMString <a href="#dom-cssimportrule-href" title="dom-CSSImportRule-href">href</a>; 2.2050 - [PutForwards=<a href="#dom-medialist-mediatext" title="dom-MediaList-mediaText">mediaText</a>] readonly attribute <a href="#medialist">MediaList</a> <a href="#dom-cssimportrule-media" title="dom-CSSImportRule-media">media</a>; 2.2051 - readonly attribute <a href="#cssstylesheet">CSSStyleSheet</a> <a href="#dom-cssimportrule-stylesheet" title="dom-CSSImportRule-styleSheet">styleSheet</a>; 2.2052 -};</pre> 2.2053 - 2.2054 - <p>The 2.2055 - <dfn id="dom-cssimportrule-href" title="dom-CSSImportRule-href"><code>href</code></dfn> 2.2056 - attribute must return the <span>URL</span> specified 2.2057 - by the <code>@import</code> rule.</p> 2.2058 - 2.2059 - <p class="note">To get the resolved <span>URL</span> use the 2.2060 - <code title="dom-StyleSheet-href"><a href="#dom-stylesheet-href">href</a></code> attribute of the associated 2.2061 - <a href="#style-sheet">style sheet</a>.</p> 2.2062 - 2.2063 - <p>The 2.2064 - <dfn id="dom-cssimportrule-media" title="dom-CSSImportRule-media"><code>media</code></dfn> 2.2065 - attribute must return the value of the 2.2066 - <code title="dom-StyleSheet-media"><a href="#dom-stylesheet-media">media</a></code> attribute of the 2.2067 - associated <a href="#style-sheet">style sheet</a>.</p> 2.2068 - 2.2069 - <p>The 2.2070 - <dfn id="dom-cssimportrule-stylesheet" title="dom-CSSImportRule-stylesheet"><code>styleSheet</code></dfn> 2.2071 - attribute must return the associated 2.2072 - <a href="#style-sheet">style sheet</a>.</p> 2.2073 - 2.2074 - <p class="note">If loading of the style sheet fails its 2.2075 - <code title="dom-CSSStyleSheet-cssRules"><a href="#dom-cssstylesheet-cssrules">cssRules</a></code> list is simply 2.2076 - empty. I.e. an <code>@import</code> rule always has an associated 2.2077 - <a href="#style-sheet">style sheet</a>.</p> 2.2078 - 2.2079 - 2.2080 - <h4 id="css-media-rule"><span class="secno">6.4.5 </span>CSS <code title="">@media</code> Rule</h4> 2.2081 - 2.2082 - <p>The <code><a href="#cssmediarule">CSSMediaRule</a></code> object represents an 2.2083 - <code title="">@media</code> rule.</p> 2.2084 - 2.2085 - <pre class="idl">interface <dfn id="cssmediarule">CSSMediaRule</dfn> : <a href="#cssrule">CSSRule</a> { 2.2086 - [PutForwards=<a href="#dom-medialist-mediatext" title="dom-MediaList-mediaText">mediaText</a>] readonly attribute <a href="#medialist">MediaList</a> <a href="#dom-cssmediarule-media" title="dom-CSSMediaRule-media">media</a>; 2.2087 - readonly attribute <a href="#cssrulelist">CSSRuleList</a> <a href="#dom-cssmediarule-cssrules" title="dom-CSSMediaRule-cssRules">cssRules</a>; 2.2088 - unsigned long <a href="#dom-cssmediarule-insertrule" title="dom-CSSMediaRule-insertRule">insertRule</a>(DOMString <var title="">rule</var>, in unsigned long <var title="">index</var>); 2.2089 - void <a href="#dom-cssmediarule-deleterule" title="dom-CSSMediaRule-deleteRule">deleteRule</a>(unsigned long <var title="">index</var>); 2.2090 -};</pre> 2.2091 - 2.2092 - <p>The 2.2093 - <dfn id="dom-cssmediarule-media" title="dom-CSSMediaRule-media"><code>media</code></dfn> 2.2094 - attribute must return a 2.2095 - <code><a href="#medialist">MediaList</a></code> object for the list of media queries specified 2.2096 - with the <code title="">@media</code> rule.</p> 2.2097 - 2.2098 - <p>The 2.2099 - <dfn id="dom-cssmediarule-cssrules" title="dom-CSSMediaRule-cssRules"><code>cssRules</code></dfn> 2.2100 - attribute must return a 2.2101 - <code><a href="#cssrulelist">CSSRuleList</a></code> object for the list of CSS rules specified with the 2.2102 - <code title="">@media</code> rule.</p> 2.2103 - 2.2104 - <p>The 2.2105 - <dfn id="dom-cssmediarule-insertrule" title="dom-CSSMediaRule-insertRule"><code>insertRule(<var title="">rule</var>, 2.2106 - <var title="">index</var>)</code></dfn> method must 2.2107 - <a href="#insert-a-css-rule">insert a CSS rule</a> <var title="">rule</var> into the 2.2108 - CSS rule list returned by 2.2109 - <code title="dom-CSSMediaRule-cssRules"><a href="#dom-cssmediarule-cssrules">cssRules</a></code> at 2.2110 - <var title="">index</var>.</p> 2.2111 - 2.2112 - <p>The 2.2113 - <dfn id="dom-cssmediarule-deleterule" title="dom-CSSMediaRule-deleteRule"><code>deleteRule(<var title="">index</var>)</code></dfn> 2.2114 - method must <a href="#remove-a-css-rule">remove a CSS rule</a> from the 2.2115 - CSS rule list returned by 2.2116 - <code title="dom-CSSMediaRule-cssRules"><a href="#dom-cssmediarule-cssrules">cssRules</a></code> at 2.2117 - <var title="">index</var>.</p> 2.2118 - 2.2119 - 2.2120 - <h4 id="css-font-face-rule"><span class="secno">6.4.6 </span>CSS <code title="">@font-face</code> Rule</h4> 2.2121 - 2.2122 - <p>The <code><a href="#cssfontfacerule">CSSFontFaceRule</a></code> object represents an 2.2123 - <code>@font-face</code> rule.</p> 2.2124 - 2.2125 - <pre class="idl">interface <dfn id="cssfontfacerule">CSSFontFaceRule</dfn> : <a href="#cssrule">CSSRule</a> { 2.2126 - readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-cssfontfacerule-style" title="dom-CSSFontFaceRule-style">style</a>; 2.2127 -};</pre> 2.2128 - 2.2129 - <p>The 2.2130 - <dfn id="dom-cssfontfacerule-style" title="dom-CSSFontFaceRule-style"><code>style</code></dfn> 2.2131 - attribute must return a <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> 2.2132 - block that contains the property declarations specified within the 2.2133 - <code>@font-face</code> rule.</p> 2.2134 - 2.2135 - 2.2136 - <h4 id="css-page-rule"><span class="secno">6.4.7 </span>CSS <code title="">@page</code> Rule</h4> 2.2137 - 2.2138 - <p class="XXX">Need to define the rules for 2.2139 - <dfn id="parse-a-css-page-selector">parse a CSS page selector</dfn> and 2.2140 - <dfn id="serialize-a-css-page-selector">serialize a CSS page selector</dfn>.</p> 2.2141 - 2.2142 - <p>The <code><a href="#csspagerule">CSSPageRule</a></code> object represents an <code>@page</code> 2.2143 - rule.</p> 2.2144 - 2.2145 - <pre class="idl">interface <dfn id="csspagerule">CSSPageRule</dfn> : <a href="#cssrule">CSSRule</a> { 2.2146 - attribute DOMString <a href="#dom-csspagerule-selectortext" title="dom-CSSPageRule-selectorText">selectorText</a>; 2.2147 - readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-csspagerule-style" title="dom-CSSPageRule-style">style</a>; 2.2148 -};</pre> 2.2149 - 2.2150 - <p>The 2.2151 - <dfn id="dom-csspagerule-selectortext" title="dom-CSSPageRule-selectorText"><code>selectorText</code></dfn> 2.2152 - attribute, on getting, must return the result of 2.2153 - <a href="#serialize-a-css-page-selector" title="serialize a CSS page selector">serializing</a> the 2.2154 - associated <span>CSS page selector</span>.</p> 2.2155 - 2.2156 - <p>On setting the 2.2157 - <code title="dom-CSSPageRule-selectorText"><a href="#dom-csspagerule-selectortext">selectorText</a></code> attribute 2.2158 - these steps must be run:</p> 2.2159 - 2.2160 - <ol> 2.2161 - <li><p>Run the <a href="#parse-a-css-page-selector">parse a CSS page selector</a> algorithm on the 2.2162 - given value.</li> 2.2163 - 2.2164 - <li><p>If the algorithm returns a non-null value replace the associated 2.2165 - <span>CSS page selector</span> with the returned value.</li> 2.2166 - 2.2167 - <li><p>Otherwise, if the algorithm returns a null value, do 2.2168 - nothing.</li> 2.2169 - </ol> 2.2170 - 2.2171 - <p>The 2.2172 - <dfn id="dom-csspagerule-style" title="dom-CSSPageRule-style"><code>style</code></dfn> 2.2173 - attribute must return a 2.2174 - <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> for the <code>@page</code> rule.</p> 2.2175 - 2.2176 - 2.2177 - <h4 id="css-namespace-rule"><span class="secno">6.4.8 </span>CSS <code title="">@namespace</code> Rule</h4> 2.2178 - 2.2179 - <p>The <code><a href="#cssnamespacerule">CSSNamespaceRule</a></code> object represents an 2.2180 - <code>@namespace</code> rule.</p> 2.2181 - 2.2182 - <pre class="idl">interface <dfn id="cssnamespacerule">CSSNamespaceRule</dfn> : <a href="#cssrule">CSSRule</a> { 2.2183 - readonly attribute DOMString <a href="#dom-cssnamespacerule-namespaceuri" title="dom-CSSNamespaceRule-namespaceURI">namespaceURI</a>; 2.2184 - readonly attribute DOMString? <a href="#dom-cssnamespacerule-prefix" title="dom-CSSNamespaceRule-prefix">prefix</a>; 2.2185 -};</pre> 2.2186 - 2.2187 - <p>The 2.2188 - <dfn id="dom-cssnamespacerule-namespaceuri" title="dom-CSSNamespaceRule-namespaceURI"><code>namespaceURI</code></dfn> 2.2189 - attribute must return the namespace of 2.2190 - the <code>@namespace</code> rule.</p> 2.2191 - 2.2192 - <p>The 2.2193 - <dfn id="dom-cssnamespacerule-prefix" title="dom-CSSNamespaceRule-prefix"><code>prefix</code></dfn> 2.2194 - attribute must return the prefix of the 2.2195 - <code>@namespace</code> rule or the empty string if there is no prefix.</p> 2.2196 - 2.2197 + <!-- ........................................................................................................................ --> 2.2198 + 2.2199 + <h4 id="the-cssrulelist-sequence"><span class="secno">6.4.1 </span>The <code>CSSRuleList</code> Sequence</h4> 2.2200 + 2.2201 + <p>The <code>CSSRuleList</code> sequence represents an ordered collection of CSS style rules.</p> 2.2202 +<pre class="idl">[[TBD - TYPEDEF]] 2.2203 +</pre> 2.2204 + 2.2205 + 2.2206 + <!-- ........................................................................................................................ --> 2.2207 + 2.2208 + <h4 id="the-cssrule-interface"><span class="secno">6.4.2 </span>The <code>CSSRule</code> Interface</h4> 2.2209 + 2.2210 + <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> 2.2211 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSRule">interface <span class="idlInterfaceID">CSSRule</span> { 2.2212 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>unsigned short</a></span> <span class="idlAttrName"><a href="#widl-CSSRule-type">type</a></span>;</span> 2.2213 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSRule-cssText">cssText</a></span>;</span> 2.2214 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRule</a></span> <span class="idlAttrName"><a href="#widl-CSSRule-parentRule">parentRule</a></span>;</span> 2.2215 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleSheet</a></span> <span class="idlAttrName"><a href="#widl-CSSRule-parentStyleSheet">parentStyleSheet</a></span>;</span> 2.2216 +};</span></pre> 2.2217 +<dl class="attributes"> 2.2218 +<dt class="attribute"> 2.2219 +<code>type</code> of type <span class="idlAttrType"><a>unsigned short</a></span>, readonly</dt> 2.2220 +<dd> 2.2221 +<p>The <code>type</code> attribute must return the <span>CSS rule</span> type, as follows:</p> <dl class="switch"> <dt><code>STYLE_RULE</code></dt> <dd>The object is a <code>CSSStyleRule</code>.</dd> <dt><code>IMPORT_RULE</code></dt> <dd>The object is a <code>CSSImportRule</code>.</dd> <dt><code>MEDIA_RULE</code></dt> <dd>The object is a <code>CSSMediaRule</code>.</dd> <dt><code>FONT_FACE_RULE</code></dt> <dd>The object is a <code>CSSFontFaceRule</code>.</dd> <dt><code>PAGE_RULE</code></dt> <dd>The object is a <code>CSSPageRule</code>.</dd> <dt><code>NAMESPACE_RULE</code></dt> <dd>The object is a <code>CSSNamespaceRule</code>.</dd> </dl> <p class="note">Constants with values 0 and 2 have been obsoleted by this specification. They might be re-allocated in the future. <p class="note">Constants for new and proprietary features are coordinated on the <a href="http://wiki.csswg.org/spec/cssom-constants">CSSOM Constants</a> wiki page.</dd> 2.2222 +<dt class="attribute"> 2.2223 +<code>cssText</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 2.2224 +<dd> 2.2225 +<p>The <code>cssText</code> attribute must return a <a href="#serialize-a-css-rule" title="serialize a CSS rule">serialization</a> of the <span>CSS rule</span>.</p> <p>On setting the <code>cssText</code> attribute these steps must be run:</p> <ol> <li><p><a href="#parse-a-css-rule" title="Parse a CSS rule">Parse</a> the value.</li> <li><p>If parsing failed terminate this algorithm.</li> <li><p>If the <code title="dom-CSSRule-type">type</code> of the new object does not match the <code title="dom-CSSRule-type">type</code> of the current object <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an '<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#invalidmodificationerror">InvalidModificationError</a></code>' exception.</li> <li><p>Replace the current object with the new object.</li> </ol></dd> 2.2226 +<dt class="attribute"> 2.2227 +<code>parentRule</code> of type <span class="idlAttrType"><a>CSSRule</a></span>, readonly</dt> 2.2228 +<dd> 2.2229 +<p>The <code>parentRule</code> attribute must return the nearest enclosing rule of the current rule or null, if there is no enclosing rule.</p> <p class="note">For example, <code>@media</code> can enclose a rule.</dd> 2.2230 +<dt class="attribute"> 2.2231 +<code>parentStyleSheet</code> of type <span class="idlAttrType"><a>CSSStyleSheet</a></span>, readonly</dt> 2.2232 +<dd> 2.2233 +<p>The <code>parentStyleSheet</code> attribute must return the <code>CSSStyleSheet</code> object that contains the the current rule.</dd> 2.2234 +</dl> 2.2235 + 2.2236 + 2.2237 + <!-- ........................................................................................................................ --> 2.2238 + 2.2239 + <h4 id="the-cssstylerule-interface"><span class="secno">6.4.3 </span>The <code>CSSStyleRule</code> Interface</h4> 2.2240 + 2.2241 + <p>The <code>CSSStyleRule</code> interface represents a rule set.</p> 2.2242 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSStyleRule">interface <span class="idlInterfaceID">CSSStyleRule</span> { 2.2243 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleRule-selectorText">selectorText</a></span>;</span> 2.2244 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleDeclaration</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleRule-style">style</a></span>;</span> 2.2245 +};</span></pre> 2.2246 +<dl class="attributes"> 2.2247 +<dt class="attribute"> 2.2248 +<code>selectorText</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 2.2249 +<dd> 2.2250 +<p>The <code>selectorText</code> attribute, on getting, must return the result of <a href="#serialize-a-group-of-selectors" title="serialize a group of selectors">serializing</a> the associated <span>group of selectors</span>.</p> <p>On setting the <code>selectorText</code> attribute these steps must be run:</p> <ol> <li><p>Run the <a href="#parse-a-group-of-selectors">parse a group of selectors</a> algorithm on the given value.</li> <li><p>If the algorithm returns a non-null value replace the associated <span>group of selectors</span> with the returned value.</li> <li><p>Otherwise, if the algorithm returns a null value, do nothing.</li> </ol></dd> 2.2251 +<dt class="attribute"> 2.2252 +<code>style</code> of type <span class="idlAttrType"><a>CSSStyleDeclaration</a></span>, readonly</dt> 2.2253 +<dd> 2.2254 +<p>The <code>style</code> attribute must return a <code>CSSStyleDeclaration</code> object for the rule set.</dd> 2.2255 +</dl> 2.2256 + 2.2257 + 2.2258 + <!-- ........................................................................................................................ --> 2.2259 + 2.2260 + <h4 id="the-cssimportrule-interface"><span class="secno">6.4.4 </span>The <code>CSSImportRule</code> Interface</h4> 2.2261 + 2.2262 + <p>The <code>CSSImportRule</code> interface represents an <code>@import</code> rule.</p> 2.2263 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSImportRule">interface <span class="idlInterfaceID">CSSImportRule</span> { 2.2264 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSImportRule-href">href</a></span>;</span> 2.2265 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>MediaList</a></span> <span class="idlAttrName"><a href="#widl-CSSImportRule-media">media</a></span>;</span> 2.2266 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleSheet</a></span> <span class="idlAttrName"><a href="#widl-CSSImportRule-styleSheet">styleSheet</a></span>;</span> 2.2267 +};</span></pre> 2.2268 +<dl class="attributes"> 2.2269 +<dt class="attribute"> 2.2270 +<code>href</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 2.2271 +<dd> 2.2272 +<p>The <code>href</code> attribute must return the <span>URL</span> specified by the <code>@import</code> rule.</p> <p class="note">To get the resolved <span>URL</span> use the <code title="dom-StyleSheet-href">href</code> attribute of the associated <a href="#style-sheet">style sheet</a>.</dd> 2.2273 +<dt class="attribute"> 2.2274 +<code>media</code> of type <span class="idlAttrType"><a>MediaList</a></span>, readonly</dt> 2.2275 +<dd> 2.2276 +<p>The <code>media</code> attribute must return the value of the <code title="dom-StyleSheet-media">media</code> attribute of the associated <a href="#style-sheet">style sheet</a>.</dd> 2.2277 +<dt class="attribute"> 2.2278 +<code>styleSheet</code> of type <span class="idlAttrType"><a>CSSStyleSheet</a></span>, readonly</dt> 2.2279 +<dd> 2.2280 +<p>The <code>styleSheet</code> attribute must return the associated <a href="#style-sheet">style sheet</a>.</p> <p class="note">If loading of the style sheet fails its <code title="dom-CSSStyleSheet-cssRules">cssRules</code> list is simply empty, i.e., an <code>@import</code> rule always has an associated <a href="#style-sheet">style sheet</a>.</dd> 2.2281 +</dl> 2.2282 + 2.2283 + 2.2284 + <!-- ........................................................................................................................ --> 2.2285 + 2.2286 + <h4 id="the-cssmediarule-interface"><span class="secno">6.4.5 </span>The <code>CSSMediaRule</code> Interface</h4> 2.2287 + 2.2288 + <p>The <code>CSSMediaRule</code> interface represents a <code>@media</code> rule.</p> 2.2289 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSMediaRule">interface <span class="idlInterfaceID">CSSMediaRule</span> { 2.2290 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>MediaList</a></span> <span class="idlAttrName"><a href="#widl-CSSMediaRule-media">media</a></span>;</span> 2.2291 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRuleList</a></span> <span class="idlAttrName"><a href="#widl-CSSMediaRule-cssRules">cssRules</a></span>;</span> 2.2292 +<span class="idlMethod"> <span class="idlMethType"><a>unsigned long</a></span> <span class="idlMethName"><a href="#widl-CSSMediaRule-insertRule-unsigned-long-DOMString-rule-unsigned-long-index">insertRule</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">rule</span></span>, <span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 2.2293 +<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-CSSMediaRule-deleteRule-void-unsigned-long-index">deleteRule</a></span> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 2.2294 +};</span></pre> 2.2295 +<dl class="attributes"> 2.2296 +<dt class="attribute"> 2.2297 +<code>media</code> of type <span class="idlAttrType"><a>MediaList</a></span>, readonly</dt> 2.2298 +<dd> 2.2299 +<p>The <code>media</code> attribute must return a <code>MediaList</code> object for the list of media queries specified with the <code>@media</code> rule.</dd> 2.2300 +<dt class="attribute"> 2.2301 +<code>cssRules</code> of type <span class="idlAttrType"><a>CSSRuleList</a></span>, readonly</dt> 2.2302 +<dd> 2.2303 +<p>The <code>cssRules</code> attribute must return a <code>CSSRuleList</code> object for the list of CSS rules specified with the <code>@media</code> rule.</dd> 2.2304 +</dl> 2.2305 +<dl class="methods"> 2.2306 +<dt class="method"> 2.2307 +<code>insertRule</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>, <span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>unsigned long</a></span></dt> 2.2308 +<dd> 2.2309 +<p>The <code>insertRule</code> operation must <a href="#insert-a-css-rule">insert a CSS rule</a> <var>rule</var> into the CSS rule list returned by <code title="dom-CSSMediaRule-cssRules">cssRules</code> at <var>index</var>.</dd> 2.2310 +<dt class="method"> 2.2311 +<code>deleteRule</code> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 2.2312 +<dd> 2.2313 +<p>The <code>deleteRule</code> operation must <a href="#remove-a-css-rule">remove a CSS rule</a> from the CSS rule list returned by <code title="dom-CSSMediaRule-cssRules">cssRules</code> at <var>index</var>.</dd> 2.2314 +</dl> 2.2315 + 2.2316 + 2.2317 + <!-- ........................................................................................................................ --> 2.2318 + 2.2319 + <h4 id="the-cssfontfacerule-interface"><span class="secno">6.4.6 </span>The <code>CSSFontFaceRule</code> Interface</h4> 2.2320 + 2.2321 + <p>The <code>CSSFontFaceRule</code> interface represents a <code>@font-face</code> rule.</p> 2.2322 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSFontFaceRule">interface <span class="idlInterfaceID">CSSFontFaceRule</span> { 2.2323 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleDeclaration</a></span> <span class="idlAttrName"><a href="#widl-CSSFontFaceRule-style">style</a></span>;</span> 2.2324 +};</span></pre> 2.2325 +<dl class="attributes"> 2.2326 +<dt class="attribute"> 2.2327 +<code>style</code> of type <span class="idlAttrType"><a>CSSStyleDeclaration</a></span>, readonly</dt> 2.2328 +<dd> 2.2329 +<p>The <code>style</code> attribute must return a <code>CSSStyleDeclaration</code> block that contains the property declarations specified within the <code>@font-face</code> rule.</dd> 2.2330 +</dl> 2.2331 + 2.2332 + 2.2333 + <!-- ........................................................................................................................ --> 2.2334 + 2.2335 + <h4 id="the-csspagerule-interface"><span class="secno">6.4.7 </span>The <code>CSSPageRule</code> Interface</h4> 2.2336 + 2.2337 + <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> 2.2338 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSPageRule">interface <span class="idlInterfaceID">CSSPageRule</span> { 2.2339 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSPageRule-selectorText">selectorText</a></span>;</span> 2.2340 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleDeclaration</a></span> <span class="idlAttrName"><a href="#widl-CSSPageRule-style">style</a></span>;</span> 2.2341 +};</span></pre> 2.2342 +<dl class="attributes"> 2.2343 +<dt class="attribute"> 2.2344 +<code>selectorText</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 2.2345 +<dd> 2.2346 +<p>The <code>selectorText</code> attribute, on getting, must return the result of <a href="#serialize-a-css-page-selector" title="serialize a CSS page selector">serializing</a> the associated <span>CSS page selector</span>.</p> <p>On setting the <code>selectorText</code> attribute these steps must be run:</p> <ol> <li><p>Run the <a href="#parse-a-css-page-selector">parse a CSS page selector</a> algorithm on the given value.</li> <li><p>If the algorithm returns a non-null value replace the associated <span>CSS page selector</span> with the returned value.</li> <li><p>Otherwise, if the algorithm returns a null value, do nothing.</li> </ol></dd> 2.2347 +<dt class="attribute"> 2.2348 +<code>style</code> of type <span class="idlAttrType"><a>CSSStyleDeclaration</a></span>, readonly</dt> 2.2349 +<dd> 2.2350 +<p>The <code>style</code> attribute must return a <code>CSSStyleDeclaration</code> for the <code>@page</code> rule.</dd> 2.2351 +</dl> 2.2352 + 2.2353 + 2.2354 + <!-- ........................................................................................................................ --> 2.2355 + 2.2356 + <h4 id="the-cssnamespacerule-interface"><span class="secno">6.4.8 </span>The <code>CSSNamespaceRule</code> Interface</h4> 2.2357 + 2.2358 + <p>The <code>CSSNamespaceRule</code> interface represents a <code>@namespace</code> rule.</p> 2.2359 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSNamespaceRule">interface <span class="idlInterfaceID">CSSNamespaceRule</span> { 2.2360 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSNamespaceRule-namespaceURI">namespaceURI</a></span>;</span> 2.2361 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-CSSNamespaceRule-prefix">prefix</a></span>;</span> 2.2362 +};</span></pre> 2.2363 +<dl class="attributes"> 2.2364 +<dt class="attribute"> 2.2365 +<code>namespaceURI</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 2.2366 +<dd> 2.2367 +<p>The <code>namespaceURI</code> attribute must return the namespace of the <code>@namespace</code> rule.</dd> 2.2368 +<dt class="attribute"> 2.2369 +<code>prefix</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 2.2370 +<dd> 2.2371 +<p>The <code>prefix</code> attribute must return the prefix of the <code>@namespace</code> rule or the empty string if there is no prefix.</dd> 2.2372 +</dl> 2.2373 + 2.2374 + 2.2375 + <!-- ........................................................................................................................ --> 2.2376 + <!-- ........................................................................................................................ --> 2.2377 2.2378 <h3 id="css-declaration-blocks"><span class="secno">6.5 </span>CSS Declaration Blocks</h3> 2.2379 2.2380 <p>A <dfn id="css-declaration-block">CSS declaration block</dfn> is an ordered collection of CSS 2.2381 properties with their associated values, also named CSS declarations. In 2.2382 the DOM a <a href="#css-declaration-block">CSS declaration block</a> is a 2.2383 - <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> object. A 2.2384 + <code>CSSStyleDeclaration</code> object. A 2.2385 <a href="#css-declaration-block">CSS declaration block</a> has two associated properties:</p> 2.2386 2.2387 <dl> 2.2388 @@ -2070,145 +1818,60 @@ 2.2389 2.2390 2.2391 2.2392 - <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The <code title="">CSSStyleDeclaration</code> Interface</h4> 2.2393 - 2.2394 - <pre class="idl">interface <dfn id="cssstyledeclaration">CSSStyleDeclaration</dfn> { 2.2395 - attribute DOMString <a href="#dom-cssstyledeclaration-csstext" title="dom-CSSStyleDeclaration-cssText">cssText</a>; 2.2396 - 2.2397 - readonly attribute unsigned long <a href="#dom-cssstyledeclaration-length" title="dom-CSSStyleDeclaration-length">length</a>; 2.2398 - DOMString <a href="#dom-cssstyledeclaration-item" title="dom-CSSStyleDeclaration-item">item</a>(unsigned long <var title="">index</var>); 2.2399 - 2.2400 - DOMString <a href="#dom-cssstyledeclaration-getpropertyvalue" title="dom-CSSStyleDeclaration-getPropertyValue">getPropertyValue</a>(DOMString <var title="">property</var>); 2.2401 - DOMString <a href="#dom-cssstyledeclaration-getpropertypriority" title="dom-CSSStyleDeclaration-getPropertyPriority">getPropertyPriority</a>(DOMString <var title="">property</var>); 2.2402 - void <a href="#dom-cssstyledeclaration-setproperty" title="dom-CSSStyleDeclaration-setProperty">setProperty</a>(DOMString <var title="">property</var>, DOMString <var title="">value</var>, optional DOMString <var title="">priority</var>); 2.2403 - DOMString <a href="#dom-cssstyledeclaration-removeproperty" title="dom-CSSStyleDeclaration-removeProperty">removeProperty</a>(DOMString <var title="">property</var>); 2.2404 - 2.2405 - readonly attribute <a href="#cssrule">CSSRule</a> <a href="#dom-cssstyledeclaration-parentrule" title="dom-CSSStyleDeclaration-parentRule">parentRule</a>; 2.2406 + <!-- ........................................................................................................................ --> 2.2407 + 2.2408 + <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The <code>CSSStyleDeclaration</code> Interface</h4> 2.2409 + 2.2410 + 2.2411 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSStyleDeclaration">interface <span class="idlInterfaceID">CSSStyleDeclaration</span> { 2.2412 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleDeclaration-cssText">cssText</a></span>;</span> 2.2413 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>unsigned long</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleDeclaration-length">length</a></span>;</span> 2.2414 +<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-item-DOMString-unsigned-long-index">item</a></span> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 2.2415 +<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-getPropertyValue-DOMString-DOMString-property">getPropertyValue</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>);</span> 2.2416 +<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-getPropertyPriority-DOMString-DOMString-property">getPropertyPriority</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>);</span> 2.2417 +<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-setProperty-void-DOMString-property-DOMString-value-DOMString-priority">setProperty</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">value</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">priority</span></span>);</span> 2.2418 +<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-removeProperty-DOMString-DOMString-property">removeProperty</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>);</span> 2.2419 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRule</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleDeclaration-parentRule">parentRule</a></span>;</span> 2.2420 +};</span></pre> 2.2421 +<dl class="attributes"> 2.2422 +<dt class="attribute"> 2.2423 +<code>cssText</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 2.2424 +<dt class="attribute"> 2.2425 +<code>length</code> of type <span class="idlAttrType"><a>unsigned long</a></span>, readonly</dt> 2.2426 +<dt class="attribute"> 2.2427 +<code>parentRule</code> of type <span class="idlAttrType"><a>CSSRule</a></span>, readonly</dt> 2.2428 +</dl> 2.2429 +<dl class="methods"> 2.2430 +<dt class="method"> 2.2431 +<code>item</code> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>DOMString</a></span></dt> 2.2432 +<dt class="method"> 2.2433 +<code>getPropertyValue</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>DOMString</a></span></dt> 2.2434 +<dt class="method"> 2.2435 +<code>getPropertyPriority</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>DOMString</a></span></dt> 2.2436 +<dt class="method"> 2.2437 +<code>setProperty</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>, <span class="idlParam">optional <span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 2.2438 +<dt class="method"> 2.2439 +<code>removeProperty</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>DOMString</a></span></dt> 2.2440 +</dl> 2.2441 + 2.2442 + 2.2443 + <!-- 2.2444 + <pre class="idl">interface <dfn>CSSStyleDeclaration</dfn> { 2.2445 + attribute DOMString <span title="dom-CSSStyleDeclaration-cssText">cssText</span>; 2.2446 + 2.2447 + readonly attribute unsigned long <span title="dom-CSSStyleDeclaration-length">length</span>; 2.2448 + DOMString <span title="dom-CSSStyleDeclaration-item">item</span>(unsigned long <var>index</var>); 2.2449 + 2.2450 + DOMString <span title="dom-CSSStyleDeclaration-getPropertyValue">getPropertyValue</span>(DOMString <var>property</var>); 2.2451 + DOMString <span title="dom-CSSStyleDeclaration-getPropertyPriority">getPropertyPriority</span>(DOMString <var>property</var>); 2.2452 + void <span title="dom-CSSStyleDeclaration-setProperty">setProperty</span>(DOMString <var>property</var>, DOMString <var>value</var>, optional DOMString <var>priority</var>); 2.2453 + DOMString <span title="dom-CSSStyleDeclaration-removeProperty">removeProperty</span>(DOMString <var>property</var>); 2.2454 + 2.2455 + readonly attribute <span>CSSRule</span> <span title="dom-CSSStyleDeclaration-parentRule">parentRule</span>; 2.2456 2.2457 // CSS Properties 2.2458 - attribute DOMString <a href="#dom-cssstyledeclaration-azimuth" title="dom-CSSStyleDeclaration-azimuth">azimuth</a>; 2.2459 - attribute DOMString <a href="#dom-cssstyledeclaration-background" title="dom-CSSStyleDeclaration-background">background</a>; 2.2460 - attribute DOMString <a href="#dom-cssstyledeclaration-backgroundattachment" title="dom-CSSStyleDeclaration-backgroundAttachment">backgroundAttachment</a>; 2.2461 - attribute DOMString <a href="#dom-cssstyledeclaration-backgroundcolor" title="dom-CSSStyleDeclaration-backgroundColor">backgroundColor</a>; 2.2462 - attribute DOMString <a href="#dom-cssstyledeclaration-backgroundimage" title="dom-CSSStyleDeclaration-backgroundImage">backgroundImage</a>; 2.2463 - attribute DOMString <a href="#dom-cssstyledeclaration-backgroundposition" title="dom-CSSStyleDeclaration-backgroundPosition">backgroundPosition</a>; 2.2464 - attribute DOMString <a href="#dom-cssstyledeclaration-backgroundrepeat" title="dom-CSSStyleDeclaration-backgroundRepeat">backgroundRepeat</a>; 2.2465 - attribute DOMString <a href="#dom-cssstyledeclaration-border" title="dom-CSSStyleDeclaration-border">border</a>; 2.2466 - attribute DOMString <a href="#dom-cssstyledeclaration-bordercollapse" title="dom-CSSStyleDeclaration-borderCollapse">borderCollapse</a>; 2.2467 - attribute DOMString <a href="#dom-cssstyledeclaration-bordercolor" title="dom-CSSStyleDeclaration-borderColor">borderColor</a>; 2.2468 - attribute DOMString <a href="#dom-cssstyledeclaration-borderspacing" title="dom-CSSStyleDeclaration-borderSpacing">borderSpacing</a>; 2.2469 - attribute DOMString <a href="#dom-cssstyledeclaration-borderstyle" title="dom-CSSStyleDeclaration-borderStyle">borderStyle</a>; 2.2470 - attribute DOMString <a href="#dom-cssstyledeclaration-bordertop" title="dom-CSSStyleDeclaration-borderTop">borderTop</a>; 2.2471 - attribute DOMString <a href="#dom-cssstyledeclaration-borderright" title="dom-CSSStyleDeclaration-borderRight">borderRight</a>; 2.2472 - attribute DOMString <a href="#dom-cssstyledeclaration-borderbottom" title="dom-CSSStyleDeclaration-borderBottom">borderBottom</a>; 2.2473 - attribute DOMString <a href="#dom-cssstyledeclaration-borderleft" title="dom-CSSStyleDeclaration-borderLeft">borderLeft</a>; 2.2474 - attribute DOMString <a href="#dom-cssstyledeclaration-bordertopcolor" title="dom-CSSStyleDeclaration-borderTopColor">borderTopColor</a>; 2.2475 - attribute DOMString <a href="#dom-cssstyledeclaration-borderrightcolor" title="dom-CSSStyleDeclaration-borderRightColor">borderRightColor</a>; 2.2476 - attribute DOMString <a href="#dom-cssstyledeclaration-borderbottomcolor" title="dom-CSSStyleDeclaration-borderBottomColor">borderBottomColor</a>; 2.2477 - attribute DOMString <a href="#dom-cssstyledeclaration-borderleftcolor" title="dom-CSSStyleDeclaration-borderLeftColor">borderLeftColor</a>; 2.2478 - attribute DOMString <a href="#dom-cssstyledeclaration-bordertopstyle" title="dom-CSSStyleDeclaration-borderTopStyle">borderTopStyle</a>; 2.2479 - attribute DOMString <a href="#dom-cssstyledeclaration-borderrightstyle" title="dom-CSSStyleDeclaration-borderRightStyle">borderRightStyle</a>; 2.2480 - attribute DOMString <a href="#dom-cssstyledeclaration-borderbottomstyle" title="dom-CSSStyleDeclaration-borderBottomStyle">borderBottomStyle</a>; 2.2481 - attribute DOMString <a href="#dom-cssstyledeclaration-borderleftstyle" title="dom-CSSStyleDeclaration-borderLeftStyle">borderLeftStyle</a>; 2.2482 - attribute DOMString <a href="#dom-cssstyledeclaration-bordertopwidth" title="dom-CSSStyleDeclaration-borderTopWidth">borderTopWidth</a>; 2.2483 - attribute DOMString <a href="#dom-cssstyledeclaration-borderrightwidth" title="dom-CSSStyleDeclaration-borderRightWidth">borderRightWidth</a>; 2.2484 - attribute DOMString <a href="#dom-cssstyledeclaration-borderbottomwidth" title="dom-CSSStyleDeclaration-borderBottomWidth">borderBottomWidth</a>; 2.2485 - attribute DOMString <a href="#dom-cssstyledeclaration-borderleftwidth" title="dom-CSSStyleDeclaration-borderLeftWidth">borderLeftWidth</a>; 2.2486 - attribute DOMString <a href="#dom-cssstyledeclaration-borderwidth" title="dom-CSSStyleDeclaration-borderWidth">borderWidth</a>; 2.2487 - attribute DOMString <a href="#dom-cssstyledeclaration-bottom" title="dom-CSSStyleDeclaration-bottom">bottom</a>; 2.2488 - attribute DOMString <a href="#dom-cssstyledeclaration-captionside" title="dom-CSSStyleDeclaration-captionSide">captionSide</a>; 2.2489 - attribute DOMString <a href="#dom-cssstyledeclaration-clear" title="dom-CSSStyleDeclaration-clear">clear</a>; 2.2490 - attribute DOMString <a href="#dom-cssstyledeclaration-clip" title="dom-CSSStyleDeclaration-clip">clip</a>; 2.2491 - attribute DOMString <a href="#dom-cssstyledeclaration-color" title="dom-CSSStyleDeclaration-color">color</a>; 2.2492 - attribute DOMString <a href="#dom-cssstyledeclaration-content" title="dom-CSSStyleDeclaration-content">content</a>; 2.2493 - attribute DOMString <a href="#dom-cssstyledeclaration-counterincrement" title="dom-CSSStyleDeclaration-counterIncrement">counterIncrement</a>; 2.2494 - attribute DOMString <a href="#dom-cssstyledeclaration-counterreset" title="dom-CSSStyleDeclaration-counterReset">counterReset</a>; 2.2495 - attribute DOMString <a href="#dom-cssstyledeclaration-cue" title="dom-CSSStyleDeclaration-cue">cue</a>; 2.2496 - attribute DOMString <a href="#dom-cssstyledeclaration-cueafter" title="dom-CSSStyleDeclaration-cueAfter">cueAfter</a>; 2.2497 - attribute DOMString <a href="#dom-cssstyledeclaration-cuebefore" title="dom-CSSStyleDeclaration-cueBefore">cueBefore</a>; 2.2498 - attribute DOMString <a href="#dom-cssstyledeclaration-cursor" title="dom-CSSStyleDeclaration-cursor">cursor</a>; 2.2499 - attribute DOMString <a href="#dom-cssstyledeclaration-direction" title="dom-CSSStyleDeclaration-direction">direction</a>; 2.2500 - attribute DOMString <a href="#dom-cssstyledeclaration-display" title="dom-CSSStyleDeclaration-display">display</a>; 2.2501 - attribute DOMString <a href="#dom-cssstyledeclaration-elevation" title="dom-CSSStyleDeclaration-elevation">elevation</a>; 2.2502 - attribute DOMString <a href="#dom-cssstyledeclaration-emptycells" title="dom-CSSStyleDeclaration-emptyCells">emptyCells</a>; 2.2503 - attribute DOMString <a href="#dom-cssstyledeclaration-cssfloat" title="dom-CSSStyleDeclaration-cssFloat">cssFloat</a>; 2.2504 - attribute DOMString <a href="#dom-cssstyledeclaration-font" title="dom-CSSStyleDeclaration-font">font</a>; 2.2505 - attribute DOMString <a href="#dom-cssstyledeclaration-fontfamily" title="dom-CSSStyleDeclaration-fontFamily">fontFamily</a>; 2.2506 - attribute DOMString <a href="#dom-cssstyledeclaration-fontsize" title="dom-CSSStyleDeclaration-fontSize">fontSize</a>; 2.2507 - attribute DOMString <a href="#dom-cssstyledeclaration-fontsizeadjust" title="dom-CSSStyleDeclaration-fontSizeAdjust">fontSizeAdjust</a>; 2.2508 - attribute DOMString <a href="#dom-cssstyledeclaration-fontstretch" title="dom-CSSStyleDeclaration-fontStretch">fontStretch</a>; 2.2509 - attribute DOMString <a href="#dom-cssstyledeclaration-fontstyle" title="dom-CSSStyleDeclaration-fontStyle">fontStyle</a>; 2.2510 - attribute DOMString <a href="#dom-cssstyledeclaration-fontvariant" title="dom-CSSStyleDeclaration-fontVariant">fontVariant</a>; 2.2511 - attribute DOMString <a href="#dom-cssstyledeclaration-fontweight" title="dom-CSSStyleDeclaration-fontWeight">fontWeight</a>; 2.2512 - attribute DOMString <a href="#dom-cssstyledeclaration-height" title="dom-CSSStyleDeclaration-height">height</a>; 2.2513 - attribute DOMString <a href="#dom-cssstyledeclaration-left" title="dom-CSSStyleDeclaration-left">left</a>; 2.2514 - attribute DOMString <a href="#dom-cssstyledeclaration-letterspacing" title="dom-CSSStyleDeclaration-letterSpacing">letterSpacing</a>; 2.2515 - attribute DOMString <a href="#dom-cssstyledeclaration-lineheight" title="dom-CSSStyleDeclaration-lineHeight">lineHeight</a>; 2.2516 - attribute DOMString <a href="#dom-cssstyledeclaration-liststyle" title="dom-CSSStyleDeclaration-listStyle">listStyle</a>; 2.2517 - attribute DOMString <a href="#dom-cssstyledeclaration-liststyleimage" title="dom-CSSStyleDeclaration-listStyleImage">listStyleImage</a>; 2.2518 - attribute DOMString <a href="#dom-cssstyledeclaration-liststyleposition" title="dom-CSSStyleDeclaration-listStylePosition">listStylePosition</a>; 2.2519 - attribute DOMString <a href="#dom-cssstyledeclaration-liststyletype" title="dom-CSSStyleDeclaration-listStyleType">listStyleType</a>; 2.2520 - attribute DOMString <a href="#dom-cssstyledeclaration-margin" title="dom-CSSStyleDeclaration-margin">margin</a>; 2.2521 - attribute DOMString <a href="#dom-cssstyledeclaration-margintop" title="dom-CSSStyleDeclaration-marginTop">marginTop</a>; 2.2522 - attribute DOMString <a href="#dom-cssstyledeclaration-marginright" title="dom-CSSStyleDeclaration-marginRight">marginRight</a>; 2.2523 - attribute DOMString <a href="#dom-cssstyledeclaration-marginbottom" title="dom-CSSStyleDeclaration-marginBottom">marginBottom</a>; 2.2524 - attribute DOMString <a href="#dom-cssstyledeclaration-marginleft" title="dom-CSSStyleDeclaration-marginLeft">marginLeft</a>; 2.2525 - attribute DOMString <a href="#dom-cssstyledeclaration-markeroffset" title="dom-CSSStyleDeclaration-markerOffset">markerOffset</a>; 2.2526 - attribute DOMString <a href="#dom-cssstyledeclaration-marks" title="dom-CSSStyleDeclaration-marks">marks</a>; 2.2527 - attribute DOMString <a href="#dom-cssstyledeclaration-maxheight" title="dom-CSSStyleDeclaration-maxHeight">maxHeight</a>; 2.2528 - attribute DOMString <a href="#dom-cssstyledeclaration-maxwidth" title="dom-CSSStyleDeclaration-maxWidth">maxWidth</a>; 2.2529 - attribute DOMString <a href="#dom-cssstyledeclaration-minheight" title="dom-CSSStyleDeclaration-minHeight">minHeight</a>; 2.2530 - attribute DOMString <a href="#dom-cssstyledeclaration-minwidth" title="dom-CSSStyleDeclaration-minWidth">minWidth</a>; 2.2531 - attribute DOMString <a href="#dom-cssstyledeclaration-orphans" title="dom-CSSStyleDeclaration-orphans">orphans</a>; 2.2532 - attribute DOMString <a href="#dom-cssstyledeclaration-outline" title="dom-CSSStyleDeclaration-outline">outline</a>; 2.2533 - attribute DOMString <a href="#dom-cssstyledeclaration-outlinecolor" title="dom-CSSStyleDeclaration-outlineColor">outlineColor</a>; 2.2534 - attribute DOMString <a href="#dom-cssstyledeclaration-outlinestyle" title="dom-CSSStyleDeclaration-outlineStyle">outlineStyle</a>; 2.2535 - attribute DOMString <a href="#dom-cssstyledeclaration-outlinewidth" title="dom-CSSStyleDeclaration-outlineWidth">outlineWidth</a>; 2.2536 - attribute DOMString <a href="#dom-cssstyledeclaration-overflow" title="dom-CSSStyleDeclaration-overflow">overflow</a>; 2.2537 - attribute DOMString <a href="#dom-cssstyledeclaration-padding" title="dom-CSSStyleDeclaration-padding">padding</a>; 2.2538 - attribute DOMString <a href="#dom-cssstyledeclaration-paddingtop" title="dom-CSSStyleDeclaration-paddingTop">paddingTop</a>; 2.2539 - attribute DOMString <a href="#dom-cssstyledeclaration-paddingright" title="dom-CSSStyleDeclaration-paddingRight">paddingRight</a>; 2.2540 - attribute DOMString <a href="#dom-cssstyledeclaration-paddingbottom" title="dom-CSSStyleDeclaration-paddingBottom">paddingBottom</a>; 2.2541 - attribute DOMString <a href="#dom-cssstyledeclaration-paddingleft" title="dom-CSSStyleDeclaration-paddingLeft">paddingLeft</a>; 2.2542 - attribute DOMString <a href="#dom-cssstyledeclaration-page" title="dom-CSSStyleDeclaration-page">page</a>; 2.2543 - attribute DOMString <a href="#dom-cssstyledeclaration-pagebreakafter" title="dom-CSSStyleDeclaration-pageBreakAfter">pageBreakAfter</a>; 2.2544 - attribute DOMString <a href="#dom-cssstyledeclaration-pagebreakbefore" title="dom-CSSStyleDeclaration-pageBreakBefore">pageBreakBefore</a>; 2.2545 - attribute DOMString <a href="#dom-cssstyledeclaration-pagebreakinside" title="dom-CSSStyleDeclaration-pageBreakInside">pageBreakInside</a>; 2.2546 - attribute DOMString <a href="#dom-cssstyledeclaration-pause" title="dom-CSSStyleDeclaration-pause">pause</a>; 2.2547 - attribute DOMString <a href="#dom-cssstyledeclaration-pauseafter" title="dom-CSSStyleDeclaration-pauseAfter">pauseAfter</a>; 2.2548 - attribute DOMString <a href="#dom-cssstyledeclaration-pausebefore" title="dom-CSSStyleDeclaration-pauseBefore">pauseBefore</a>; 2.2549 - attribute DOMString <a href="#dom-cssstyledeclaration-pitch" title="dom-CSSStyleDeclaration-pitch">pitch</a>; 2.2550 - attribute DOMString <a href="#dom-cssstyledeclaration-pitchrange" title="dom-CSSStyleDeclaration-pitchRange">pitchRange</a>; 2.2551 - attribute DOMString <a href="#dom-cssstyledeclaration-playduring" title="dom-CSSStyleDeclaration-playDuring">playDuring</a>; 2.2552 - attribute DOMString <a href="#dom-cssstyledeclaration-position" title="dom-CSSStyleDeclaration-position">position</a>; 2.2553 - attribute DOMString <a href="#dom-cssstyledeclaration-quotes" title="dom-CSSStyleDeclaration-quotes">quotes</a>; 2.2554 - attribute DOMString <a href="#dom-cssstyledeclaration-richness" title="dom-CSSStyleDeclaration-richness">richness</a>; 2.2555 - attribute DOMString <a href="#dom-cssstyledeclaration-right" title="dom-CSSStyleDeclaration-right">right</a>; 2.2556 - attribute DOMString <a href="#dom-cssstyledeclaration-size" title="dom-CSSStyleDeclaration-size">size</a>; 2.2557 - attribute DOMString <a href="#dom-cssstyledeclaration-speak" title="dom-CSSStyleDeclaration-speak">speak</a>; 2.2558 - attribute DOMString <a href="#dom-cssstyledeclaration-speakheader" title="dom-CSSStyleDeclaration-speakHeader">speakHeader</a>; 2.2559 - attribute DOMString <a href="#dom-cssstyledeclaration-speaknumeral" title="dom-CSSStyleDeclaration-speakNumeral">speakNumeral</a>; 2.2560 - attribute DOMString <a href="#dom-cssstyledeclaration-speakpunctuation" title="dom-CSSStyleDeclaration-speakPunctuation">speakPunctuation</a>; 2.2561 - attribute DOMString <a href="#dom-cssstyledeclaration-speechrate" title="dom-CSSStyleDeclaration-speechRate">speechRate</a>; 2.2562 - attribute DOMString <a href="#dom-cssstyledeclaration-stress" title="dom-CSSStyleDeclaration-stress">stress</a>; 2.2563 - attribute DOMString <a href="#dom-cssstyledeclaration-tablelayout" title="dom-CSSStyleDeclaration-tableLayout">tableLayout</a>; 2.2564 - attribute DOMString <a href="#dom-cssstyledeclaration-textalign" title="dom-CSSStyleDeclaration-textAlign">textAlign</a>; 2.2565 - attribute DOMString <a href="#dom-cssstyledeclaration-textdecoration" title="dom-CSSStyleDeclaration-textDecoration">textDecoration</a>; 2.2566 - attribute DOMString <a href="#dom-cssstyledeclaration-textindent" title="dom-CSSStyleDeclaration-textIndent">textIndent</a>; 2.2567 - attribute DOMString <a href="#dom-cssstyledeclaration-textshadow" title="dom-CSSStyleDeclaration-textShadow">textShadow</a>; 2.2568 - attribute DOMString <a href="#dom-cssstyledeclaration-texttransform" title="dom-CSSStyleDeclaration-textTransform">textTransform</a>; 2.2569 - attribute DOMString <a href="#dom-cssstyledeclaration-top" title="dom-CSSStyleDeclaration-top">top</a>; 2.2570 - attribute DOMString <a href="#dom-cssstyledeclaration-unicodebidi" title="dom-CSSStyleDeclaration-unicodeBidi">unicodeBidi</a>; 2.2571 - attribute DOMString <a href="#dom-cssstyledeclaration-verticalalign" title="dom-CSSStyleDeclaration-verticalAlign">verticalAlign</a>; 2.2572 - attribute DOMString <a href="#dom-cssstyledeclaration-visibility" title="dom-CSSStyleDeclaration-visibility">visibility</a>; 2.2573 - attribute DOMString <a href="#dom-cssstyledeclaration-voicefamily" title="dom-CSSStyleDeclaration-voiceFamily">voiceFamily</a>; 2.2574 - attribute DOMString <a href="#dom-cssstyledeclaration-volume" title="dom-CSSStyleDeclaration-volume">volume</a>; 2.2575 - attribute DOMString <a href="#dom-cssstyledeclaration-whitespace" title="dom-CSSStyleDeclaration-whiteSpace">whiteSpace</a>; 2.2576 - attribute DOMString <a href="#dom-cssstyledeclaration-widows" title="dom-CSSStyleDeclaration-widows">widows</a>; 2.2577 - attribute DOMString <a href="#dom-cssstyledeclaration-width" title="dom-CSSStyleDeclaration-width">width</a>; 2.2578 - attribute DOMString <a href="#dom-cssstyledeclaration-wordspacing" title="dom-CSSStyleDeclaration-wordSpacing">wordSpacing</a>; 2.2579 - attribute DOMString <a href="#dom-cssstyledeclaration-zindex" title="dom-CSSStyleDeclaration-zIndex">zIndex</a>; 2.2580 };</pre> 2.2581 + --> 2.2582 2.2583 <p>The 2.2584 <dfn id="dom-cssstyledeclaration-csstext" title="dom-CSSStyleDeclaration-cssText"><code>cssText</code></dfn> 2.2585 @@ -2216,15 +1879,15 @@ 2.2586 <a href="#serialize-a-css-declaration-block" title="serialize a CSS declaration block">serializing</a> the 2.2587 <a href="#css-declaration-block-declarations">CSS declaration block declarations</a>.</p> 2.2588 2.2589 - <p>Setting the <code title="">cssText</code> attribute must run these steps: 2.2590 + <p>Setting the <code>cssText</code> attribute must run these steps: 2.2591 2.2592 <ol> 2.2593 <li><p>If the <a href="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> is set, 2.2594 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> a 2.2595 "<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror">NoModificationAllowedError</a></code>" exception 2.2596 - and terminate these steps. 2.2597 - 2.2598 - <li><p>Empty the <a href="#css-declaration-block-declarations">CSS declaration block declarations</a>. 2.2599 + and terminate these steps.</li> 2.2600 + 2.2601 + <li><p>Empty the <a href="#css-declaration-block-declarations">CSS declaration block declarations</a>.</li> 2.2602 2.2603 <li><p><a href="#parse-a-css-declaration-block" title="Parse a CSS declaration block">Parse</a> the given 2.2604 value and, if the return value is not null, insert it into the 2.2605 @@ -2239,7 +1902,7 @@ 2.2606 the <span>collection of CSS declarations</span>.</p> 2.2607 2.2608 <p>The 2.2609 - <dfn id="dom-cssstyledeclaration-item" title="dom-CSSStyleDeclaration-item"><code>item(<var title="">index</var>)</code></dfn> 2.2610 + <dfn id="dom-cssstyledeclaration-item" title="dom-CSSStyleDeclaration-item"><code>item(<var>index</var>)</code></dfn> 2.2611 method must <span class="XXX">...</span>.</p> 2.2612 <!-- returns the name of property at position index. --> 2.2613 2.2614 @@ -2252,14 +1915,14 @@ 2.2615 2.2616 <p>The 2.2617 <dfn id="dom-cssstyledeclaration-getpropertypriority" title="dom-CSSStyleDeclaration-getPropertyPriority"><code>getPropertyPriority(<var>property</var>)</code></dfn> 2.2618 - method, when invoked, if <var title="">property</var> is an 2.2619 + method, when invoked, if <var>property</var> is an 2.2620 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for a 2.2621 property that has a priority user agents must return the canonical 2.2622 priority of that property as given in the syntax definition. Otherwise, 2.2623 the empty string must be returned.</p> 2.2624 2.2625 <p class="example">E.g. for <code>background-color:lime !IMPORTANT</code> 2.2626 - the return value would be "<code title="">important</code>".</p> 2.2627 + the return value would be "<code>important</code>".</p> 2.2628 2.2629 2.2630 <p>The 2.2631 @@ -2270,36 +1933,36 @@ 2.2632 <li><p>If the <a href="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> is set, 2.2633 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an 2.2634 "<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror">NoModificationAllowedError</a></code>" and 2.2635 - terminate these steps. 2.2636 - 2.2637 - <li><p>If <var title="">property</var> is not an 2.2638 + terminate these steps.</li> 2.2639 + 2.2640 + <li><p>If <var>property</var> is not an 2.2641 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for a 2.2642 supported property, terminate this algorithm.</li> 2.2643 2.2644 - <li><p>If <var title="">value</var> is the empty string, invoke 2.2645 + <li><p>If <var>value</var> is the empty string, invoke 2.2646 <code title="dom-CSSStyleDeclaration-removeProperty"><a href="#dom-cssstyledeclaration-removeproperty">removeProperty()</a></code> 2.2647 - with <var title="">property</var> as argument and terminate this 2.2648 + with <var>property</var> as argument and terminate this 2.2649 algorithm.</li> 2.2650 2.2651 - <li><p>If the <var title="">priority</var> argument has been omitted let 2.2652 - <var title="">priority</var> be the empty string.</li> 2.2653 - 2.2654 - <li><p>If <var title="">priority</var> is neither a valid priority nor 2.2655 + <li><p>If the <var>priority</var> argument has been omitted let 2.2656 + <var>priority</var> be the empty string.</li> 2.2657 + 2.2658 + <li><p>If <var>priority</var> is neither a valid priority nor 2.2659 the empty string terminate this algorithm.</li> 2.2660 <!-- define valid priority somehow --> 2.2661 2.2662 <li> 2.2663 <p>If <a href="#parse-a-css-value" title="parse a CSS value">parsing the 2.2664 - <var title="">value</var></a> returns null terminate this algorithm. 2.2665 - 2.2666 - <p class="note"><var title="">value</var> can not include 2.2667 - "<code title="">!important</code>".</p> 2.2668 + <var>value</var></a> returns null terminate this algorithm. 2.2669 + 2.2670 + <p class="note"><var>value</var> can not include 2.2671 + "<code>!important</code>".</p> 2.2672 </li> 2.2673 2.2674 - <li><p>Finally, set <var title="">property</var> to <var title="">value</var> 2.2675 - with priority <var title="">priority</var> when <var title="">priority</var> 2.2676 + <li><p>Finally, set <var>property</var> to <var>value</var> 2.2677 + with priority <var>priority</var> when <var>priority</var> 2.2678 is not the empty string. Otherwise set 2.2679 - <var title="">property</var> to <var title="">value</var>.</li> 2.2680 + <var>property</var> to <var>value</var>.</li> 2.2681 </ol> 2.2682 2.2683 <p>The 2.2684 @@ -2310,12 +1973,12 @@ 2.2685 <li><p>If the <a href="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> is set, 2.2686 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> a 2.2687 "<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror">NoModificationAllowedError</a></code>" and 2.2688 - terminate these steps. 2.2689 - 2.2690 - <li><p>If <var title="">property</var> is an 2.2691 + terminate these steps.</li> 2.2692 + 2.2693 + <li><p>If <var>property</var> is an 2.2694 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for a 2.2695 property of a declaration in the 2.2696 - <span>collection of CSS declarations</span> remove the declaration.</p> 2.2697 + <span>collection of CSS declarations</span> remove the declaration.</li> 2.2698 </ol> 2.2699 2.2700 2.2701 @@ -2326,9 +1989,9 @@ 2.2702 2.2703 <p>The 2.2704 <dfn id="dom-cssstyledeclaration-parentrule" title="dom-CSSStyleDeclaration-parentRule"><code>parentRule</code></dfn> 2.2705 - attribute must return the <code><a href="#cssrule">CSSrule</a></code> object the 2.2706 - <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> is object is associated with or null if 2.2707 - it is not associated with a <code><a href="#cssrule">CSSrule</a></code> object.</p> 2.2708 + attribute must return the <code>CSSrule</code> object the 2.2709 + <code>CSSStyleDeclaration</code> is object is associated with or null if 2.2710 + it is not associated with a <code>CSSrule</code> object.</p> 2.2711 <!-- XXX introduce a concept for this instead --> 2.2712 2.2713 <hr> 2.2714 @@ -2352,372 +2015,7 @@ 2.2715 <th>IDL attribute 2.2716 <th>CSS property 2.2717 <tbody> 2.2718 - <tr> 2.2719 - <td><dfn id="dom-cssstyledeclaration-azimuth" title="dom-CSSStyleDeclaration-azimuth"><code>azimuth</code></dfn></td> 2.2720 - <td>"<code>azimuth</code>"</td> 2.2721 - <tr> 2.2722 - <td><dfn id="dom-cssstyledeclaration-background" title="dom-CSSStyleDeclaration-background"><code>background</code></dfn></td> 2.2723 - <td>"<code>background</code>"</td> 2.2724 - <tr> 2.2725 - <td><dfn id="dom-cssstyledeclaration-backgroundattachment" title="dom-CSSStyleDeclaration-backgroundAttachment"><code>backgroundAttachment</code></dfn></td> 2.2726 - <td>"<code>background-attachment</code>"</td> 2.2727 - <tr> 2.2728 - <td><dfn id="dom-cssstyledeclaration-backgroundcolor" title="dom-CSSStyleDeclaration-backgroundColor"><code>backgroundColor</code></dfn></td> 2.2729 - <td>"<code>background-color</code>"</td> 2.2730 - <tr> 2.2731 - <td><dfn id="dom-cssstyledeclaration-backgroundimage" title="dom-CSSStyleDeclaration-backgroundImage"><code>backgroundImage</code></dfn></td> 2.2732 - <td>"<code>background-image</code>"</td> 2.2733 - <tr> 2.2734 - <td><dfn id="dom-cssstyledeclaration-backgroundposition" title="dom-CSSStyleDeclaration-backgroundPosition"><code>backgroundPosition</code></dfn></td> 2.2735 - <td>"<code>background-position</code>"</td> 2.2736 - <tr> 2.2737 - <td><dfn id="dom-cssstyledeclaration-backgroundrepeat" title="dom-CSSStyleDeclaration-backgroundRepeat"><code>backgroundRepeat</code></dfn></td> 2.2738 - <td>"<code>background-repeat</code>"</td> 2.2739 - <tr> 2.2740 - <td><dfn id="dom-cssstyledeclaration-border" title="dom-CSSStyleDeclaration-border"><code>border</code></dfn></td> 2.2741 - <td>"<code>border</code>"</td> 2.2742 - <tr> 2.2743 - <td><dfn id="dom-cssstyledeclaration-bordercollapse" title="dom-CSSStyleDeclaration-borderCollapse"><code>borderCollapse</code></dfn></td> 2.2744 - <td>"<code>border-collapse</code>"</td> 2.2745 - <tr> 2.2746 - <td><dfn id="dom-cssstyledeclaration-bordercolor" title="dom-CSSStyleDeclaration-borderColor"><code>borderColor</code></dfn></td> 2.2747 - <td>"<code>border-color</code>"</td> 2.2748 - <tr> 2.2749 - <td><dfn id="dom-cssstyledeclaration-borderspacing" title="dom-CSSStyleDeclaration-borderSpacing"><code>borderSpacing</code></dfn></td> 2.2750 - <td>"<code>border-spacing</code>"</td> 2.2751 - <tr> 2.2752 - <td><dfn id="dom-cssstyledeclaration-borderstyle" title="dom-CSSStyleDeclaration-borderStyle"><code>borderStyle</code></dfn></td> 2.2753 - <td>"<code>border-style</code>"</td> 2.2754 - <tr> 2.2755 - <td><dfn id="dom-cssstyledeclaration-bordertop" title="dom-CSSStyleDeclaration-borderTop"><code>borderTop</code></dfn></td> 2.2756 - <td>"<code>border-top</code>"</td> 2.2757 - <tr> 2.2758 - <td><dfn id="dom-cssstyledeclaration-borderright" title="dom-CSSStyleDeclaration-borderRight"><code>borderRight</code></dfn></td> 2.2759 - <td>"<code>border-right</code>"</td> 2.2760 - <tr> 2.2761 - <td><dfn id="dom-cssstyledeclaration-borderbottom" title="dom-CSSStyleDeclaration-borderBottom"><code>borderBottom</code></dfn></td> 2.2762 - <td>"<code>border-bottom</code>"</td> 2.2763 - <tr> 2.2764 - <td><dfn id="dom-cssstyledeclaration-borderleft" title="dom-CSSStyleDeclaration-borderLeft"><code>borderLeft</code></dfn></td> 2.2765 - <td>"<code>border-left</code>"</td> 2.2766 - <tr> 2.2767 - <td><dfn id="dom-cssstyledeclaration-bordertopcolor" title="dom-CSSStyleDeclaration-borderTopColor"><code>borderTopColor</code></dfn></td> 2.2768 - <td>"<code>border-top-color</code>"</td> 2.2769 - <tr> 2.2770 - <td><dfn id="dom-cssstyledeclaration-borderrightcolor" title="dom-CSSStyleDeclaration-borderRightColor"><code>borderRightColor</code></dfn></td> 2.2771 - <td>"<code>border-right-color</code>"</td> 2.2772 - <tr> 2.2773 - <td><dfn id="dom-cssstyledeclaration-borderbottomcolor" title="dom-CSSStyleDeclaration-borderBottomColor"><code>borderBottomColor</code></dfn></td> 2.2774 - <td>"<code>border-bottom-color</code>"</td> 2.2775 - <tr> 2.2776 - <td><dfn id="dom-cssstyledeclaration-borderleftcolor" title="dom-CSSStyleDeclaration-borderLeftColor"><code>borderLeftColor</code></dfn></td> 2.2777 - <td>"<code>border-left-color</code>"</td> 2.2778 - <tr> 2.2779 - <td><dfn id="dom-cssstyledeclaration-bordertopstyle" title="dom-CSSStyleDeclaration-borderTopStyle"><code>borderTopStyle</code></dfn></td> 2.2780 - <td>"<code>border-top-style</code>"</td> 2.2781 - <tr> 2.2782 - <td><dfn id="dom-cssstyledeclaration-borderrightstyle" title="dom-CSSStyleDeclaration-borderRightStyle"><code>borderRightStyle</code></dfn></td> 2.2783 - <td>"<code>border-right-style</code>"</td> 2.2784 - <tr> 2.2785 - <td><dfn id="dom-cssstyledeclaration-borderbottomstyle" title="dom-CSSStyleDeclaration-borderBottomStyle"><code>borderBottomStyle</code></dfn></td> 2.2786 - <td>"<code>border-bottom-style</code>"</td> 2.2787 - <tr> 2.2788 - <td><dfn id="dom-cssstyledeclaration-borderleftstyle" title="dom-CSSStyleDeclaration-borderLeftStyle"><code>borderLeftStyle</code></dfn></td> 2.2789 - <td>"<code>border-left-style</code>"</td> 2.2790 - <tr> 2.2791 - <td><dfn id="dom-cssstyledeclaration-bordertopwidth" title="dom-CSSStyleDeclaration-borderTopWidth"><code>borderTopWidth</code></dfn></td> 2.2792 - <td>"<code>border-top-width</code>"</td> 2.2793 - <tr> 2.2794 - <td><dfn id="dom-cssstyledeclaration-borderrightwidth" title="dom-CSSStyleDeclaration-borderRightWidth"><code>borderRightWidth</code></dfn></td> 2.2795 - <td>"<code>border-right-width</code>"</td> 2.2796 - <tr> 2.2797 - <td><dfn id="dom-cssstyledeclaration-borderbottomwidth" title="dom-CSSStyleDeclaration-borderBottomWidth"><code>borderBottomWidth</code></dfn></td> 2.2798 - <td>"<code>border-bottom-width</code>"</td> 2.2799 - <tr> 2.2800 - <td><dfn id="dom-cssstyledeclaration-borderleftwidth" title="dom-CSSStyleDeclaration-borderLeftWidth"><code>borderLeftWidth</code></dfn></td> 2.2801 - <td>"<code>border-left-width</code>"</td> 2.2802 - <tr> 2.2803 - <td><dfn id="dom-cssstyledeclaration-borderwidth" title="dom-CSSStyleDeclaration-borderWidth"><code>borderWidth</code></dfn></td> 2.2804 - <td>"<code>border-width</code>"</td> 2.2805 - <tr> 2.2806 - <td><dfn id="dom-cssstyledeclaration-bottom" title="dom-CSSStyleDeclaration-bottom"><code>bottom</code></dfn></td> 2.2807 - <td>"<code>bottom</code>"</td> 2.2808 - <tr> 2.2809 - <td><dfn id="dom-cssstyledeclaration-captionside" title="dom-CSSStyleDeclaration-captionSide"><code>captionSide</code></dfn></td> 2.2810 - <td>"<code>caption-side</code>"</td> 2.2811 - <tr> 2.2812 - <td><dfn id="dom-cssstyledeclaration-clear" title="dom-CSSStyleDeclaration-clear"><code>clear</code></dfn></td> 2.2813 - <td>"<code>clear</code>"</td> 2.2814 - <tr> 2.2815 - <td><dfn id="dom-cssstyledeclaration-clip" title="dom-CSSStyleDeclaration-clip"><code>clip</code></dfn></td> 2.2816 - <td>"<code>clip</code>"</td> 2.2817 - <tr> 2.2818 - <td><dfn id="dom-cssstyledeclaration-color" title="dom-CSSStyleDeclaration-color"><code>color</code></dfn></td> 2.2819 - <td>"<code>color</code>"</td> 2.2820 - <tr> 2.2821 - <td><dfn id="dom-cssstyledeclaration-content" title="dom-CSSStyleDeclaration-content"><code>content</code></dfn></td> 2.2822 - <td>"<code>content</code>"</td> 2.2823 - <tr> 2.2824 - <td><dfn id="dom-cssstyledeclaration-counterincrement" title="dom-CSSStyleDeclaration-counterIncrement"><code>counterIncrement</code></dfn></td> 2.2825 - <td>"<code>counter-increment</code>"</td> 2.2826 - <tr> 2.2827 - <td><dfn id="dom-cssstyledeclaration-counterreset" title="dom-CSSStyleDeclaration-counterReset"><code>counterReset</code></dfn></td> 2.2828 - <td>"<code>counter-reset</code>"</td> 2.2829 - <tr> 2.2830 - <td><dfn id="dom-cssstyledeclaration-cue" title="dom-CSSStyleDeclaration-cue"><code>cue</code></dfn></td> 2.2831 - <td>"<code>cue</code>"</td> 2.2832 - <tr> 2.2833 - <td><dfn id="dom-cssstyledeclaration-cueafter" title="dom-CSSStyleDeclaration-cueAfter"><code>cueAfter</code></dfn></td> 2.2834 - <td>"<code>cue-after</code>"</td> 2.2835 - <tr> 2.2836 - <td><dfn id="dom-cssstyledeclaration-cuebefore" title="dom-CSSStyleDeclaration-cueBefore"><code>cueBefore</code></dfn></td> 2.2837 - <td>"<code>cue-before</code>"</td> 2.2838 - <tr> 2.2839 - <td><dfn id="dom-cssstyledeclaration-cursor" title="dom-CSSStyleDeclaration-cursor"><code>cursor</code></dfn></td> 2.2840 - <td>"<code>cursor</code>"</td> 2.2841 - <tr> 2.2842 - <td><dfn id="dom-cssstyledeclaration-direction" title="dom-CSSStyleDeclaration-direction"><code>direction</code></dfn></td> 2.2843 - <td>"<code>direction</code>"</td> 2.2844 - <tr> 2.2845 - <td><dfn id="dom-cssstyledeclaration-display" title="dom-CSSStyleDeclaration-display"><code>display</code></dfn></td> 2.2846 - <td>"<code>display</code>"</td> 2.2847 - <tr> 2.2848 - <td><dfn id="dom-cssstyledeclaration-elevation" title="dom-CSSStyleDeclaration-elevation"><code>elevation</code></dfn></td> 2.2849 - <td>"<code>elevation</code>"</td> 2.2850 - <tr> 2.2851 - <td><dfn id="dom-cssstyledeclaration-emptycells" title="dom-CSSStyleDeclaration-emptyCells"><code>emptyCells</code></dfn></td> 2.2852 - <td>"<code>empty-cells</code>"</td> 2.2853 - <tr> 2.2854 - <td><dfn id="dom-cssstyledeclaration-cssfloat" title="dom-CSSStyleDeclaration-cssFloat"><code>cssFloat</code></dfn></td> 2.2855 - <td>"<code>float</code>"</td> 2.2856 - <tr> 2.2857 - <td><dfn id="dom-cssstyledeclaration-font" title="dom-CSSStyleDeclaration-font"><code>font</code></dfn></td> 2.2858 - <td>"<code>font</code>"</td> 2.2859 - <tr> 2.2860 - <td><dfn id="dom-cssstyledeclaration-fontfamily" title="dom-CSSStyleDeclaration-fontFamily"><code>fontFamily</code></dfn></td> 2.2861 - <td>"<code>font-family</code>"</td> 2.2862 - <tr> 2.2863 - <td><dfn id="dom-cssstyledeclaration-fontsize" title="dom-CSSStyleDeclaration-fontSize"><code>fontSize</code></dfn></td> 2.2864 - <td>"<code>font-size</code>"</td> 2.2865 - <tr> 2.2866 - <td><dfn id="dom-cssstyledeclaration-fontsizeadjust" title="dom-CSSStyleDeclaration-fontSizeAdjust"><code>fontSizeAdjust</code></dfn></td> 2.2867 - <td>"<code>font-size-adjust</code>"</td> 2.2868 - <tr> 2.2869 - <td><dfn id="dom-cssstyledeclaration-fontstretch" title="dom-CSSStyleDeclaration-fontStretch"><code>fontStretch</code></dfn></td> 2.2870 - <td>"<code>font-stretch</code>"</td> 2.2871 - <tr> 2.2872 - <td><dfn id="dom-cssstyledeclaration-fontstyle" title="dom-CSSStyleDeclaration-fontStyle"><code>fontStyle</code></dfn></td> 2.2873 - <td>"<code>font-style</code>"</td> 2.2874 - <tr> 2.2875 - <td><dfn id="dom-cssstyledeclaration-fontvariant" title="dom-CSSStyleDeclaration-fontVariant"><code>fontVariant</code></dfn></td> 2.2876 - <td>"<code>font-variant</code>"</td> 2.2877 - <tr> 2.2878 - <td><dfn id="dom-cssstyledeclaration-fontweight" title="dom-CSSStyleDeclaration-fontWeight"><code>fontWeight</code></dfn></td> 2.2879 - <td>"<code>font-weight</code>"</td> 2.2880 - <tr> 2.2881 - <td><dfn id="dom-cssstyledeclaration-height" title="dom-CSSStyleDeclaration-height"><code>height</code></dfn></td> 2.2882 - <td>"<code>height</code>"</td> 2.2883 - <tr> 2.2884 - <td><dfn id="dom-cssstyledeclaration-left" title="dom-CSSStyleDeclaration-left"><code>left</code></dfn></td> 2.2885 - <td>"<code>left</code>"</td> 2.2886 - <tr> 2.2887 - <td><dfn id="dom-cssstyledeclaration-letterspacing" title="dom-CSSStyleDeclaration-letterSpacing"><code>letterSpacing</code></dfn></td> 2.2888 - <td>"<code>letter-spacing</code>"</td> 2.2889 - <tr> 2.2890 - <td><dfn id="dom-cssstyledeclaration-lineheight" title="dom-CSSStyleDeclaration-lineHeight"><code>lineHeight</code></dfn></td> 2.2891 - <td>"<code>line-height</code>"</td> 2.2892 - <tr> 2.2893 - <td><dfn id="dom-cssstyledeclaration-liststyle" title="dom-CSSStyleDeclaration-listStyle"><code>listStyle</code></dfn></td> 2.2894 - <td>"<code>list-style</code>"</td> 2.2895 - <tr> 2.2896 - <td><dfn id="dom-cssstyledeclaration-liststyleimage" title="dom-CSSStyleDeclaration-listStyleImage"><code>listStyleImage</code></dfn></td> 2.2897 - <td>"<code>list-style-image</code>"</td> 2.2898 - <tr> 2.2899 - <td><dfn id="dom-cssstyledeclaration-liststyleposition" title="dom-CSSStyleDeclaration-listStylePosition"><code>listStylePosition</code></dfn></td> 2.2900 - <td>"<code>list-style-position</code>"</td> 2.2901 - <tr> 2.2902 - <td><dfn id="dom-cssstyledeclaration-liststyletype" title="dom-CSSStyleDeclaration-listStyleType"><code>listStyleType</code></dfn></td> 2.2903 - <td>"<code>list-style-type</code>"</td> 2.2904 - <tr> 2.2905 - <td><dfn id="dom-cssstyledeclaration-margin" title="dom-CSSStyleDeclaration-margin"><code>margin</code></dfn></td> 2.2906 - <td>"<code>margin</code>"</td> 2.2907 - <tr> 2.2908 - <td><dfn id="dom-cssstyledeclaration-margintop" title="dom-CSSStyleDeclaration-marginTop"><code>marginTop</code></dfn></td> 2.2909 - <td>"<code>margin-top</code>"</td> 2.2910 - <tr> 2.2911 - <td><dfn id="dom-cssstyledeclaration-marginright" title="dom-CSSStyleDeclaration-marginRight"><code>marginRight</code></dfn></td> 2.2912 - <td>"<code>margin-right</code>"</td> 2.2913 - <tr> 2.2914 - <td><dfn id="dom-cssstyledeclaration-marginbottom" title="dom-CSSStyleDeclaration-marginBottom"><code>marginBottom</code></dfn></td> 2.2915 - <td>"<code>margin-bottom</code>"</td> 2.2916 - <tr> 2.2917 - <td><dfn id="dom-cssstyledeclaration-marginleft" title="dom-CSSStyleDeclaration-marginLeft"><code>marginLeft</code></dfn></td> 2.2918 - <td>"<code>margin-left</code>"</td> 2.2919 - <tr> 2.2920 - <td><dfn id="dom-cssstyledeclaration-markeroffset" title="dom-CSSStyleDeclaration-markerOffset"><code>markerOffset</code></dfn></td> 2.2921 - <td>"<code>marker-offset</code>"</td> 2.2922 - <tr> 2.2923 - <td><dfn id="dom-cssstyledeclaration-marks" title="dom-CSSStyleDeclaration-marks"><code>marks</code></dfn></td> 2.2924 - <td>"<code>marks</code>"</td> 2.2925 - <tr> 2.2926 - <td><dfn id="dom-cssstyledeclaration-maxheight" title="dom-CSSStyleDeclaration-maxHeight"><code>maxHeight</code></dfn></td> 2.2927 - <td>"<code>max-height</code>"</td> 2.2928 - <tr> 2.2929 - <td><dfn id="dom-cssstyledeclaration-maxwidth" title="dom-CSSStyleDeclaration-maxWidth"><code>maxWidth</code></dfn></td> 2.2930 - <td>"<code>max-width</code>"</td> 2.2931 - <tr> 2.2932 - <td><dfn id="dom-cssstyledeclaration-minheight" title="dom-CSSStyleDeclaration-minHeight"><code>minHeight</code></dfn></td> 2.2933 - <td>"<code>min-height</code>"</td> 2.2934 - <tr> 2.2935 - <td><dfn id="dom-cssstyledeclaration-minwidth" title="dom-CSSStyleDeclaration-minWidth"><code>minWidth</code></dfn></td> 2.2936 - <td>"<code>min-width</code>"</td> 2.2937 - <tr> 2.2938 - <td><dfn id="dom-cssstyledeclaration-orphans" title="dom-CSSStyleDeclaration-orphans"><code>orphans</code></dfn></td> 2.2939 - <td>"<code>orphans</code>"</td> 2.2940 - <tr> 2.2941 - <td><dfn id="dom-cssstyledeclaration-outline" title="dom-CSSStyleDeclaration-outline"><code>outline</code></dfn></td> 2.2942 - <td>"<code>outline</code>"</td> 2.2943 - <tr> 2.2944 - <td><dfn id="dom-cssstyledeclaration-outlinecolor" title="dom-CSSStyleDeclaration-outlineColor"><code>outlineColor</code></dfn></td> 2.2945 - <td>"<code>outline-color</code>"</td> 2.2946 - <tr> 2.2947 - <td><dfn id="dom-cssstyledeclaration-outlinestyle" title="dom-CSSStyleDeclaration-outlineStyle"><code>outlineStyle</code></dfn></td> 2.2948 - <td>"<code>outline-style</code>"</td> 2.2949 - <tr> 2.2950 - <td><dfn id="dom-cssstyledeclaration-outlinewidth" title="dom-CSSStyleDeclaration-outlineWidth"><code>outlineWidth</code></dfn></td> 2.2951 - <td>"<code>outline-width</code>"</td> 2.2952 - <tr> 2.2953 - <td><dfn id="dom-cssstyledeclaration-overflow" title="dom-CSSStyleDeclaration-overflow"><code>overflow</code></dfn></td> 2.2954 - <td>"<code>overflow</code>"</td> 2.2955 - <tr> 2.2956 - <td><dfn id="dom-cssstyledeclaration-padding" title="dom-CSSStyleDeclaration-padding"><code>padding</code></dfn></td> 2.2957 - <td>"<code>padding</code>"</td> 2.2958 - <tr> 2.2959 - <td><dfn id="dom-cssstyledeclaration-paddingtop" title="dom-CSSStyleDeclaration-paddingTop"><code>paddingTop</code></dfn></td> 2.2960 - <td>"<code>padding-top</code>"</td> 2.2961 - <tr> 2.2962 - <td><dfn id="dom-cssstyledeclaration-paddingright" title="dom-CSSStyleDeclaration-paddingRight"><code>paddingRight</code></dfn></td> 2.2963 - <td>"<code>padding-right</code>"</td> 2.2964 - <tr> 2.2965 - <td><dfn id="dom-cssstyledeclaration-paddingbottom" title="dom-CSSStyleDeclaration-paddingBottom"><code>paddingBottom</code></dfn></td> 2.2966 - <td>"<code>padding-bottom</code>"</td> 2.2967 - <tr> 2.2968 - <td><dfn id="dom-cssstyledeclaration-paddingleft" title="dom-CSSStyleDeclaration-paddingLeft"><code>paddingLeft</code></dfn></td> 2.2969 - <td>"<code>padding-left</code>"</td> 2.2970 - <tr> 2.2971 - <td><dfn id="dom-cssstyledeclaration-page" title="dom-CSSStyleDeclaration-page"><code>page</code></dfn></td> 2.2972 - <td>"<code>page</code>"</td> 2.2973 - <tr> 2.2974 - <td><dfn id="dom-cssstyledeclaration-pagebreakafter" title="dom-CSSStyleDeclaration-pageBreakAfter"><code>pageBreakAfter</code></dfn></td> 2.2975 - <td>"<code>page-break-after</code>"</td> 2.2976 - <tr> 2.2977 - <td><dfn id="dom-cssstyledeclaration-pagebreakbefore" title="dom-CSSStyleDeclaration-pageBreakBefore"><code>pageBreakBefore</code></dfn></td> 2.2978 - <td>"<code>page-break-before</code>"</td> 2.2979 - <tr> 2.2980 - <td><dfn id="dom-cssstyledeclaration-pagebreakinside" title="dom-CSSStyleDeclaration-pageBreakInside"><code>pageBreakInside</code></dfn></td> 2.2981 - <td>"<code>page-break-inside</code>"</td> 2.2982 - <tr> 2.2983 - <td><dfn id="dom-cssstyledeclaration-pause" title="dom-CSSStyleDeclaration-pause"><code>pause</code></dfn></td> 2.2984 - <td>"<code>pause</code>"</td> 2.2985 - <tr> 2.2986 - <td><dfn id="dom-cssstyledeclaration-pauseafter" title="dom-CSSStyleDeclaration-pauseAfter"><code>pauseAfter</code></dfn></td> 2.2987 - <td>"<code>pause-after</code>"</td> 2.2988 - <tr> 2.2989 - <td><dfn id="dom-cssstyledeclaration-pausebefore" title="dom-CSSStyleDeclaration-pauseBefore"><code>pauseBefore</code></dfn></td> 2.2990 - <td>"<code>pause-before</code>"</td> 2.2991 - <tr> 2.2992 - <td><dfn id="dom-cssstyledeclaration-pitch" title="dom-CSSStyleDeclaration-pitch"><code>pitch</code></dfn></td> 2.2993 - <td>"<code>pitch</code>"</td> 2.2994 - <tr> 2.2995 - <td><dfn id="dom-cssstyledeclaration-pitchrange" title="dom-CSSStyleDeclaration-pitchRange"><code>pitchRange</code></dfn></td> 2.2996 - <td>"<code>pitch-range</code>"</td> 2.2997 - <tr> 2.2998 - <td><dfn id="dom-cssstyledeclaration-playduring" title="dom-CSSStyleDeclaration-playDuring"><code>playDuring</code></dfn></td> 2.2999 - <td>"<code>play-during</code>"</td> 2.3000 - <tr> 2.3001 - <td><dfn id="dom-cssstyledeclaration-position" title="dom-CSSStyleDeclaration-position"><code>position</code></dfn></td> 2.3002 - <td>"<code>position</code>"</td> 2.3003 - <tr> 2.3004 - <td><dfn id="dom-cssstyledeclaration-quotes" title="dom-CSSStyleDeclaration-quotes"><code>quotes</code></dfn></td> 2.3005 - <td>"<code>quotes</code>"</td> 2.3006 - <tr> 2.3007 - <td><dfn id="dom-cssstyledeclaration-richness" title="dom-CSSStyleDeclaration-richness"><code>richness</code></dfn></td> 2.3008 - <td>"<code>richness</code>"</td> 2.3009 - <tr> 2.3010 - <td><dfn id="dom-cssstyledeclaration-right" title="dom-CSSStyleDeclaration-right"><code>right</code></dfn></td> 2.3011 - <td>"<code>right</code>"</td> 2.3012 - <tr> 2.3013 - <td><dfn id="dom-cssstyledeclaration-size" title="dom-CSSStyleDeclaration-size"><code>size</code></dfn></td> 2.3014 - <td>"<code>size</code>"</td> 2.3015 - <tr> 2.3016 - <td><dfn id="dom-cssstyledeclaration-speak" title="dom-CSSStyleDeclaration-speak"><code>speak</code></dfn></td> 2.3017 - <td>"<code>speak</code>"</td> 2.3018 - <tr> 2.3019 - <td><dfn id="dom-cssstyledeclaration-speakheader" title="dom-CSSStyleDeclaration-speakHeader"><code>speakHeader</code></dfn></td> 2.3020 - <td>"<code>speak-header</code>"</td> 2.3021 - <tr> 2.3022 - <td><dfn id="dom-cssstyledeclaration-speaknumeral" title="dom-CSSStyleDeclaration-speakNumeral"><code>speakNumeral</code></dfn></td> 2.3023 - <td>"<code>speak-numeral</code>"</td> 2.3024 - <tr> 2.3025 - <td><dfn id="dom-cssstyledeclaration-speakpunctuation" title="dom-CSSStyleDeclaration-speakPunctuation"><code>speakPunctuation</code></dfn></td> 2.3026 - <td>"<code>speak-punctuation</code>"</td> 2.3027 - <tr> 2.3028 - <td><dfn id="dom-cssstyledeclaration-speechrate" title="dom-CSSStyleDeclaration-speechRate"><code>speechRate</code></dfn></td> 2.3029 - <td>"<code>speech-rate</code>"</td> 2.3030 - <tr> 2.3031 - <td><dfn id="dom-cssstyledeclaration-stress" title="dom-CSSStyleDeclaration-stress"><code>stress</code></dfn></td> 2.3032 - <td>"<code>stress</code>"</td> 2.3033 - <tr> 2.3034 - <td><dfn id="dom-cssstyledeclaration-tablelayout" title="dom-CSSStyleDeclaration-tableLayout"><code>tableLayout</code></dfn></td> 2.3035 - <td>"<code>table-layout</code>"</td> 2.3036 - <tr> 2.3037 - <td><dfn id="dom-cssstyledeclaration-textalign" title="dom-CSSStyleDeclaration-textAlign"><code>textAlign</code></dfn></td> 2.3038 - <td>"<code>text-align</code>"</td> 2.3039 - <tr> 2.3040 - <td><dfn id="dom-cssstyledeclaration-textdecoration" title="dom-CSSStyleDeclaration-textDecoration"><code>textDecoration</code></dfn></td> 2.3041 - <td>"<code>text-decoration</code>"</td> 2.3042 - <tr> 2.3043 - <td><dfn id="dom-cssstyledeclaration-textindent" title="dom-CSSStyleDeclaration-textIndent"><code>textIndent</code></dfn></td> 2.3044 - <td>"<code>text-indent</code>"</td> 2.3045 - <tr> 2.3046 - <td><dfn id="dom-cssstyledeclaration-textshadow" title="dom-CSSStyleDeclaration-textShadow"><code>textShadow</code></dfn></td> 2.3047 - <td>"<code>text-shadow</code>"</td> 2.3048 - <tr> 2.3049 - <td><dfn id="dom-cssstyledeclaration-texttransform" title="dom-CSSStyleDeclaration-textTransform"><code>textTransform</code></dfn></td> 2.3050 - <td>"<code>text-transform</code>"</td> 2.3051 - <tr> 2.3052 - <td><dfn id="dom-cssstyledeclaration-top" title="dom-CSSStyleDeclaration-top"><code>top</code></dfn></td> 2.3053 - <td>"<code>top</code>"</td> 2.3054 - <tr> 2.3055 - <td><dfn id="dom-cssstyledeclaration-unicodebidi" title="dom-CSSStyleDeclaration-unicodeBidi"><code>unicodeBidi</code></dfn></td> 2.3056 - <td>"<code>unicode-bidi</code>"</td> 2.3057 - <tr> 2.3058 - <td><dfn id="dom-cssstyledeclaration-verticalalign" title="dom-CSSStyleDeclaration-verticalAlign"><code>verticalAlign</code></dfn></td> 2.3059 - <td>"<code>vertical-align</code>"</td> 2.3060 - <tr> 2.3061 - <td><dfn id="dom-cssstyledeclaration-visibility" title="dom-CSSStyleDeclaration-visibility"><code>visibility</code></dfn></td> 2.3062 - <td>"<code>visibility</code>"</td> 2.3063 - <tr> 2.3064 - <td><dfn id="dom-cssstyledeclaration-voicefamily" title="dom-CSSStyleDeclaration-voiceFamily"><code>voiceFamily</code></dfn></td> 2.3065 - <td>"<code>voice-family</code>"</td> 2.3066 - <tr> 2.3067 - <td><dfn id="dom-cssstyledeclaration-volume" title="dom-CSSStyleDeclaration-volume"><code>volume</code></dfn></td> 2.3068 - <td>"<code>volume</code>"</td> 2.3069 - <tr> 2.3070 - <td><dfn id="dom-cssstyledeclaration-whitespace" title="dom-CSSStyleDeclaration-whiteSpace"><code>whiteSpace</code></dfn></td> 2.3071 - <td>"<code>white-space</code>"</td> 2.3072 - <tr> 2.3073 - <td><dfn id="dom-cssstyledeclaration-widows" title="dom-CSSStyleDeclaration-widows"><code>widows</code></dfn></td> 2.3074 - <td>"<code>widows</code>"</td> 2.3075 - <tr> 2.3076 - <td><dfn id="dom-cssstyledeclaration-width" title="dom-CSSStyleDeclaration-width"><code>width</code></dfn></td> 2.3077 - <td>"<code>width</code>"</td> 2.3078 - <tr> 2.3079 - <td><dfn id="dom-cssstyledeclaration-wordspacing" title="dom-CSSStyleDeclaration-wordSpacing"><code>wordSpacing</code></dfn></td> 2.3080 - <td>"<code>word-spacing</code>"</td> 2.3081 - <tr> 2.3082 - <td><dfn id="dom-cssstyledeclaration-zindex" title="dom-CSSStyleDeclaration-zIndex"><code>zIndex</code></dfn></td> 2.3083 - <td>"<code>z-index</code>"</td> 2.3084 +<!--CSSOM-DECLARATIONTABLE--> 2.3085 </table> 2.3086 2.3087 <!-- 2.3088 @@ -2727,42 +2025,48 @@ 2.3089 following algorithm:</p> 2.3090 2.3091 <ol> 2.3092 - <li>Let <var title>r</var> be the CSS property to be 2.3093 + <li>Let <var>r</var> be the CSS property to be 2.3094 converted.</li> 2.3095 2.3096 <li>Uppercase the first character after every U+002D (<code>-</code>) in 2.3097 - <var title>r</var>.</li> 2.3098 - 2.3099 - <li>Remove every U+002D (<code>-</code>) in <var title>r</var>.</li> 2.3100 - 2.3101 - <li>Return <var title>r</var>.</li> 2.3102 + <var>r</var>.</li> 2.3103 + 2.3104 + <li>Remove every U+002D (<code>-</code>) in <var>r</var>.</li> 2.3105 + 2.3106 + <li>Return <var>r</var>.</li> 2.3107 </ol> 2.3108 2.3109 <p class="note">This means that 2.3110 - <code>-<var title>vendor</var>-<var title>property</var></code> 2.3111 + <code>-<var>vendor</var>-<var>property</var></code> 2.3112 becomes 2.3113 - <code><var title><strong>V</strong>endor</var><var title><strong>P</strong>roperty</var></code> 2.3114 + <code><var><strong>V</strong>endor</var><var><strong>P</strong>roperty</var></code> 2.3115 for instance.</p> 2.3116 --> 2.3117 2.3118 + <!-- ........................................................................................................................ --> 2.3119 + <!-- ........................................................................................................................ --> 2.3120 2.3121 <h3 id="css-values"><span class="secno">6.6 </span>CSS Values</h3> 2.3122 2.3123 + <!-- ........................................................................................................................ --> 2.3124 + 2.3125 <h4 id="parsing-css-values"><span class="secno">6.6.1 </span>Parsing CSS Values</h4> 2.3126 2.3127 <p>To <dfn id="parse-a-css-value">parse a CSS value</dfn> for a given 2.3128 - <var title="">property</var> means to a parse the given value according to 2.3129 + <var>property</var> means to a parse the given value according to 2.3130 the definition of the property that is an 2.3131 <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for 2.3132 - <var title="">property</var> in the CSS specification. If the given value 2.3133 + <var>property</var> in the CSS specification. If the given value 2.3134 is <span>ignored</span> return null. Otherwise return the CSS value for 2.3135 - the given <var title="">property</var>.</p> 2.3136 - 2.3137 - <p class="note">"<code title="">!important</code>" declarations are not 2.3138 + the given <var>property</var>.</p> 2.3139 + 2.3140 + <p class="note">"<code>!important</code>" declarations are not 2.3141 part of the property value space and will therefore cause 2.3142 <a href="#parse-a-css-value">parse a CSS value</a> to return null.</p> 2.3143 2.3144 2.3145 + <!-- ........................................................................................................................ --> 2.3146 + 2.3147 <h4 id="serializing-css-values"><span class="secno">6.6.2 </span>Serializing CSS Values</h4> 2.3148 2.3149 <!-- based on http://damowmow.com/playground/canon.txt --> 2.3150 @@ -2864,9 +2168,9 @@ 2.3151 <p>The concatenation of:</p> 2.3152 <ol> 2.3153 <li><p>If <counter> has three CSS component values the string 2.3154 - "<code title="">counters(</code>".</li> 2.3155 + "<code>counters(</code>".</li> 2.3156 <li><p>If <counter> has two CSS component values the string 2.3157 - "<code title="">counter(</code>".</li> 2.3158 + "<code>counter(</code>".</li> 2.3159 <li><p>The result of 2.3160 <a href="#serialize-a-comma-separated-list" title="serialize a comma-separated list">serializing</a> the 2.3161 <a href="#serialize-a-css-value-component" title="serialize a CSS component value">serialized</a> 2.3162 @@ -2918,7 +2222,7 @@ 2.3163 <number> followed by the literal string "<code>dpcm</code>".</dd> 2.3164 2.3165 <dt><shape></dt> 2.3166 - <dd><p>The string "<code title="">rect(</code>", followed by the result 2.3167 + <dd><p>The string "<code>rect(</code>", followed by the result 2.3168 of <a href="#serialize-a-comma-separated-list" title="serialize a comma-separated list">serializing</a> the 2.3169 <a href="#serialize-a-css-value-component" title="serialize a CSS component value">serialized</a> 2.3170 CSS component values belonging to <shape> as list, followed by 2.3171 @@ -2987,86 +2291,56 @@ 2.3172 <p class="XXX">Some of these need to be updated per the new rules.</p> 2.3173 </div> 2.3174 2.3175 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.3176 + 2.3177 <h2 id="dom-access-to-css-declaration-blocks"><span class="secno">7 </span>DOM Access to CSS Declaration Blocks</h2> 2.3178 2.3179 - <h3 id="the-elementcssinlinestyle-interface"><span class="secno">7.1 </span>The <code><a href="#elementcssinlinestyle">ElementCSSInlineStyle</a></code> Interface</h3> 2.3180 - 2.3181 - <pre class="idl">[NoInterfaceObject] interface <dfn id="elementcssinlinestyle">ElementCSSInlineStyle</dfn> { 2.3182 - readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <span>style</span>; 2.3183 -};</pre> 2.3184 - 2.3185 - <p class="XXX">...</p> 2.3186 - 2.3187 - <!-- XXX 2.3188 - how does this interact with the markup attribute 2.3189 - --> 2.3190 - 2.3191 - 2.3192 - 2.3193 - <h3 id="extensions-to-the-window-interface"><span class="secno">7.2 </span>Extensions to the <code title="">Window</code> Interface</h3> 2.3194 - 2.3195 - <pre class="idl">partial interface <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#window">Window</a> { 2.3196 - <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-window-getcomputedstyle" title="dom-Window-getComputedStyle">getComputedStyle</a>(<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element">Element</a> <var title="">elt</var>); 2.3197 - <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-window-getcomputedstyle" title="dom-Window-getComputedStyle">getComputedStyle</a>(<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element">Element</a> <var title="">elt</var>, DOMString <var title="">pseudoElt</var>); 2.3198 -};</pre> 2.3199 - 2.3200 - <p>The 2.3201 - <dfn id="dom-window-getcomputedstyle" title="dom-Window-getComputedStyle"><code>getComputedStyle(<var title="">elt</var>, <var title="">pseudoElt</var>)</code></dfn> 2.3202 - method must run these steps:</p> 2.3203 - 2.3204 - <ol> 2.3205 - <li><p>Let <var title="">doc</var> be the 2.3206 - <code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#document">Document</a></code> 2.3207 - associated with the <code class="external"><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#window">Window</a></code> object on 2.3208 - which the method was invoked.</li> 2.3209 - 2.3210 - <li><p>Let <var title="">obj</var> be <var title="">elt</var>.</li> 2.3211 - 2.3212 - <li><p>If <var title="">pseudoElt</var> is as an 2.3213 - <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for 2.3214 - either "<code>:before</code>" or "<code>::before</code>" let 2.3215 - <var title="">obj</var> be the '::before' pseudo-element of 2.3216 - <var title="">elt</var>.</li> 2.3217 - 2.3218 - <li><p>If <var title="">pseudoElt</var> is as an 2.3219 - <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for 2.3220 - either "<code>:after</code>" or "<code>::after</code>" let 2.3221 - <var title="">obj</var> be the '::after' pseudo-element of 2.3222 - <var title="">elt</var>.</li> 2.3223 - 2.3224 - <li> 2.3225 - <p>Return a <a href="#css-declaration-block">CSS declaration block</a> with the 2.3226 - <a href="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> set and the 2.3227 - <a href="#css-declaration-block-declarations">CSS declaration block declarations</a> set to all properties 2.3228 - the user agent supports with as value the <a href="#resolved-value">resolved value</a> 2.3229 - computed for <var title="">obj</var> using the style rules associated 2.3230 - with <var title="">doc</var>.</p> 2.3231 - 2.3232 - <p class="note">This means that even if <var title="">obj</var> is in a 2.3233 - different document (e.g. one fetched via <code>XMLHttpRequest</code>) it 2.3234 - will still use the style rules associated with the document that is 2.3235 - associated with the global object on which 2.3236 - <code title="dom-Window-getComputedStyle"><a href="#dom-window-getcomputedstyle">getComputedStyle()</a></code> was 2.3237 - invoked to compute the <a href="#css-declaration-block">CSS declaration block</a>.</p> 2.3238 - </li> 2.3239 - 2.3240 - <!-- https://bugs.webkit.org/show_bug.cgi?id=14563 has reasons for why 2.3241 - this is slightly crazy --> 2.3242 - </ol> 2.3243 - 2.3244 - <p class="note">Because of historical IDL limitations the 2.3245 - <code title="dom-Window-getComputedStyle"><a href="#dom-window-getcomputedstyle">getComputedStyle()</a></code> method 2.3246 - used to be on a separate interface, <code title="">ViewCSS</code>.</p> 2.3247 - 2.3248 - 2.3249 + <!-- ........................................................................................................................ --> 2.3250 + <!-- ........................................................................................................................ --> 2.3251 + 2.3252 + <h3 id="the-elementcssinlinestyle-interface"><span class="secno">7.1 </span>The <code>ElementCSSInlineStyle</code> Interface</h3> 2.3253 + 2.3254 + The <code>ElementCSSInlineStyle</code> interface is implemented by <code>Element</code> objects in order to provide access to inline style properties. 2.3255 +<pre class="idl"><span class="idlInterface" id="widl-def-ElementCSSInlineStyle">interface <span class="idlInterfaceID">ElementCSSInlineStyle</span> { 2.3256 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleDeclaration</a></span> <span class="idlAttrName"><a href="#widl-ElementCSSInlineStyle-style">style</a></span>;</span> 2.3257 +};</span></pre> 2.3258 +<dl class="attributes"> 2.3259 +<dt class="attribute"> 2.3260 +<code>style</code> of type <span class="idlAttrType"><a>CSSStyleDeclaration</a></span>, readonly</dt> 2.3261 +<dd> 2.3262 +The <code>style</code> attribute must return a mutable <code>CSSStyleDeclaration</code> object that represents the inline style properties of the associated <code>Element</code> instance.</dd> 2.3263 +</dl> 2.3264 + 2.3265 + 2.3266 + <!-- ........................................................................................................................ --> 2.3267 + <!-- ........................................................................................................................ --> 2.3268 + 2.3269 + <h3 id="extensions-to-the-window-interface"><span class="secno">7.2 </span>Extensions to the <code>Window</code> Interface</h3> 2.3270 + 2.3271 + 2.3272 +<pre class="idl"><span class="idlInterface" id="widl-def-Window">partial interface <span class="idlInterfaceID">Window</span> { 2.3273 +<span class="idlMethod"> <span class="idlMethType"><a>CSSStyleDeclaration</a></span> <span class="idlMethName"><a href="#widl-Window-getComputedStyle-CSSStyleDeclaration-Element-elt">getComputedStyle</a></span> (<span class="idlParam"><span class="idlParamType"><a>Element</a></span> <span class="idlParamName">elt</span></span>);</span> 2.3274 +<span class="idlMethod"> <span class="idlMethType"><a>CSSStyleDeclaration</a></span> <span class="idlMethName"><a href="#widl-Window-getComputedStyle-CSSStyleDeclaration-Element-elt-DOMString-pseudoElt">getComputedStyle</a></span> (<span class="idlParam"><span class="idlParamType"><a>Element</a></span> <span class="idlParamName">elt</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">pseudoElt</span></span>);</span> 2.3275 +};</span></pre> 2.3276 +<dl class="methods"> 2.3277 +<dt class="method"> 2.3278 +<code>getComputedStyle</code> (<span class="idlParam"><span class="idlParamType"><a>Element</a></span></span>), returns <span class="idlMethType"><a>CSSStyleDeclaration</a></span></dt> 2.3279 +<dt class="method"> 2.3280 +<code>getComputedStyle</code> (<span class="idlParam"><span class="idlParamType"><a>Element</a></span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>CSSStyleDeclaration</a></span></dt> 2.3281 +<dd> 2.3282 +<p>The <code>getComputedStyle</code> operation must run these steps:</p> <ol> <li><p>Let <var>doc</var> be the <code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#document">Document</a></code> associated with the <code class="external"><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#window">Window</a></code> object on which the method was invoked.</li> <li><p>Let <var>obj</var> be <var>elt</var>.</li> <li><p>If <var>pseudoElt</var> is as an <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for either '<code>:before</code>' or '<code>::before</code>' let <var>obj</var> be the '::before' pseudo-element of <var>elt</var>.</li> <li><p>If <var>pseudoElt</var> is as an <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for either '<code>:after</code>' or '<code>::after</code>' let <var>obj</var> be the '::after' pseudo-element of <var>elt</var>.</li> <li> <p>Return a <a href="#css-declaration-block">CSS declaration block</a> with the <a href="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> set and the <a href="#css-declaration-block-declarations">CSS declaration block declarations</a> set to all properties the user agent supports with as value the <a href="#resolved-value">resolved value</a> computed for <var>obj</var> using the style rules associated with <var>doc</var>.</p> <p class="note">This means that even if <var>obj</var> is in a different document (e.g. one fetched via <code>XMLHttpRequest</code>) it will still use the style rules associated with the document that is associated with the global object on which <code title="dom-Window-getComputedStyle">getComputedStyle()</code> was invoked to compute the <a href="#css-declaration-block">CSS declaration block</a>.</p> </li> </ol> <p class="note">Because of historical IDL limitations the <code>getComputedStyle</code> operation used to be on a separate interface, <code>ViewCSS</code>.</dd> 2.3283 +</dl> 2.3284 + 2.3285 + 2.3286 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.3287 2.3288 <h2 id="resolved-values"><span class="secno">8 </span>Resolved Values</h2> 2.3289 2.3290 - <p><code title="dom-Window-getComputedStyle"><a href="#dom-window-getcomputedstyle">getComputedStyle()</a></code> was 2.3291 + <p><code title="dom-Window-getComputedStyle">getComputedStyle()</code> was 2.3292 historically defined to return the "computed value" of an element or 2.3293 pseudo-element. However, the concept of "computed value" changed between 2.3294 revisions of CSS while the implementation of 2.3295 - <code title="dom-Window-getComputedStyle"><a href="#dom-window-getcomputedstyle">getComputedStyle()</a></code> had to 2.3296 + <code title="dom-Window-getComputedStyle">getComputedStyle()</code> had to 2.3297 remain the same for compatibility with deployed scripts. To address this 2.3298 issue this specification introduces the concept of a 2.3299 <dfn id="resolved-value">resolved value</dfn>.</p> 2.3300 @@ -3126,11 +2400,13 @@ 2.3301 <dd><p>The <a href="#resolved-value">resolved value</a> is the computed value.</dd> 2.3302 </dl> 2.3303 2.3304 - 2.3305 - 2.3306 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.3307 2.3308 <h2 id="iana-considerations"><span class="secno">9 </span>IANA Considerations</h2> 2.3309 2.3310 + <!-- ........................................................................................................................ --> 2.3311 + <!-- ........................................................................................................................ --> 2.3312 + 2.3313 <h3 id="default-style"><span class="secno">9.1 </span><dfn title="http-default-style"><code>Default-Style</code></dfn></h3> 2.3314 2.3315 <p>This section describes a header field for registration in the Permanent 2.3316 @@ -3152,12 +2428,15 @@ 2.3317 <dd>None.</dd> 2.3318 </dl> 2.3319 2.3320 - 2.3321 - 2.3322 - 2.3323 -<h2 class="no-num" id="references">References</h2> 2.3324 -<h3 class="no-num" id="normative-references">Normative references</h3> 2.3325 -<div id="anolis-references-normative"><dl><dt id="refsDOM">[DOM] 2.3326 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.3327 + 2.3328 + <h2 class="no-num" id="references">References</h2> 2.3329 + 2.3330 + <!-- ........................................................................................................................ --> 2.3331 + <!-- ........................................................................................................................ --> 2.3332 + 2.3333 + <h3 class="no-num" id="normative-references">Normative references</h3> 2.3334 + <div id="anolis-references-normative"><dl><dt id="refsDOM">[DOM] 2.3335 <dd><cite><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html">DOM4</a></cite>, Anne van Kesteren, Aryeh Gregor and Ms2ger. W3C. 2.3336 2.3337 <dt id="refsHTML">[HTML] 2.3338 @@ -3174,9 +2453,13 @@ 2.3339 2.3340 </dl></div> 2.3341 2.3342 -<h3 class="no-num" id="informative-references">Informative references</h3> 2.3343 -<div id="anolis-references-informative"></div> 2.3344 - 2.3345 + <!-- ........................................................................................................................ --> 2.3346 + <!-- ........................................................................................................................ --> 2.3347 + 2.3348 + <h3 class="no-num" id="informative-references">Informative references</h3> 2.3349 + <div id="anolis-references-informative"></div> 2.3350 + 2.3351 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 2.3352 2.3353 <h2 class="no-num" id="acknowledgments">Acknowledgments</h2> 2.3354 2.3355 @@ -3221,7 +2504,7 @@ 2.3356 2.3357 <style media="x"> invokes .sheet.media.mediaText = "x" 2.3358 2.3359 - <style title> does not "have" a title 2.3360 + <style> does not "have" a title 2.3361 2.3362 .cascadedStyle that returns less keywords than currentStyle, no inherit, 2.3363 etc. 2.3364 @@ -3231,3 +2514,5 @@ 2.3365 2.3366 2.3367 2.3368 + 2.3369 +
3.1 --- a/cssom/Overview.src.html Fri Jul 13 15:10:13 2012 -0700 3.2 +++ b/cssom/Overview.src.html Mon Jul 16 00:55:13 2012 -0600 3.3 @@ -1,61 +1,50 @@ 3.4 -<!doctype html> 3.5 +<!DOCTYPE html> 3.6 <html lang="en-US"> 3.7 - <head> 3.8 - <meta charset=utf-8> 3.9 +<head> 3.10 + <meta charset="utf-8"/> 3.11 <title>CSS Object Model (CSSOM)</title> 3.12 - <style type="text/css"> 3.13 - pre.idl { border:solid thin; background:#eee; color:#000; padding:0.5em } 3.14 - pre.idl :link, pre.idl :visited { color:inherit; background:transparent } 3.15 - dfn { font-weight:bold; font-style:normal } 3.16 - .example { margin-left:1em; padding-left:1em; border-left:double; color:#222; background:#fcfcfc } 3.17 - .example table code { color:inherit } 3.18 - td, th { padding:.1em } 3.19 - .note { margin-left:2em; color:green; font-style:italic; font-weight:bold } 3.20 - p.note::before { content:"Note: " } 3.21 - .XXX { padding:.5em; border:solid red } 3.22 - p.XXX::before { content:"Issue: " } 3.23 - dl.switch { padding-left:2em } 3.24 - dl.switch > dt { text-indent:-1.5em } 3.25 - dl.switch > dt:before { content:'\21AA'; padding:0 0.5em 0 0; display:inline-block; width:1em; text-align:right; line-height:0.5em } 3.26 - code { color:orangered } 3.27 - code :link, code :visited { color:inherit } 3.28 - </style> 3.29 - <link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS]"> 3.30 + <link href="cssom.css" rel="stylesheet"/> 3.31 + <link href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS]" rel="stylesheet"/> 3.32 </head> 3.33 <body class="draft"> 3.34 <div class="head"> 3.35 <!--logo--> 3.36 3.37 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.38 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.39 + 3.40 <h1 id="cssom">CSS Object Model (CSSOM)</h1> 3.41 3.42 - <h2 class="no-num no-toc" id="w3c-doctype">[LONGSTATUS] [DATE: 3 August 2002]</h2> 3.43 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.44 + 3.45 + <h2 id="w3c-doctype" class="no-num no-toc">[LONGSTATUS] [DATE: 3 August 2002]</h2> 3.46 3.47 <dl> 3.48 3.49 <dt>This Version:</dt> 3.50 - <dd class=dontpublish><a href="http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html">http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html</a></dd> 3.51 - <dd class=publish><a href="[VERSION]">[VERSION]</a></dd> 3.52 - 3.53 - <dt class=dontpublish>Participate:</dt> 3.54 - <dd class=dontpublish><a href="mailto:www-style@w3.org?subject==%5Bcssom%5D%20">www-style@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-style/">archives</a>) 3.55 - <dd class=dontpublish><a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=CSS&component=CSSOM">File a bug</a> 3.56 - <dd class=dontpublish><a href="http://wiki.whatwg.org/wiki/IRC">IRC: #css on Freenode</a> 3.57 - 3.58 - <dt class=publish>Latest Version:</dt> 3.59 - <dd class=publish><a href="[LATEST]">[LATEST]</a></dd> 3.60 - 3.61 - <dt class=publish>Latest Editor's draft:</dt> 3.62 - <dd class=publish><a href="http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html">http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html</a></dd> 3.63 - 3.64 - <dt class=dontpublish>Previous Version:</dt> 3.65 - <dd class=dontpublish><a href="http://www.w3.org/TR/2011/WD-cssom-20110712/">http://www.w3.org/TR/2011/WD-cssom-20110712/</a></dd> 3.66 - <dd class=dontpublish><a href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/">http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/</a></dd> 3.67 + <dd class="dontpublish"><a href="http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html">http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html</a></dd> 3.68 + <dd class="publish"><a href="[VERSION]">[VERSION]</a></dd> 3.69 + 3.70 + <dt class="dontpublish">Participate:</dt> 3.71 + <dd class="dontpublish"><a href="mailto:www-style@w3.org?subject==%5Bcssom%5D%20">www-style@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-style/">archives</a>)</dd> 3.72 + <dd class="dontpublish"><a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=CSS&component=CSSOM">File a bug</a></dd> 3.73 + <dd class="dontpublish"><a href="http://wiki.whatwg.org/wiki/IRC">IRC: #css on Freenode</a></dd> 3.74 + 3.75 + <dt class="publish">Latest Version:</dt> 3.76 + <dd class="publish"><a href="[LATEST]">[LATEST]</a></dd> 3.77 + 3.78 + <dt class="publish">Latest Editor's draft:</dt> 3.79 + <dd class="publish"><a href="http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html">http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html</a></dd> 3.80 + 3.81 + <dt class="dontpublish">Previous Version:</dt> 3.82 + <dd class="dontpublish"><a href="http://www.w3.org/TR/2011/WD-cssom-20110712/">http://www.w3.org/TR/2011/WD-cssom-20110712/</a></dd> 3.83 + <dd class="dontpublish"><a href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/">http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/</a></dd> 3.84 3.85 <dt>Editors:</dt> 3.86 <dd><a href="http://www.w3.org/wiki/User:Gadams">Glenn Adams</a> 3.87 (<a href="http://www.cox.com/">Cox Communications, Inc.</a>) 3.88 <<a href="mailto:glenn.adams@cox.com">glenn.adams@cox.com</a>></dd> 3.89 - <dd><a href="">Shane Stephens</a> 3.90 + <dd><a>Shane Stephens</a> 3.91 (<a href="http://www.google.com/">Google, Inc.</a>) 3.92 <<a href="mailto:shans@google.com">shans@google.com</a>></dd> 3.93 3.94 @@ -65,24 +54,28 @@ 3.95 <<a href="mailto:annevk@opera.com">annevk@opera.com</a>></dd> 3.96 </dl> 3.97 3.98 - <p class="dontpublish copyright"><a rel=license href="http://creativecommons.org/publicdomain/zero/1.0/"><img src="http://i.creativecommons.org/p/zero/1.0/80x15.png" alt=CC0></a> 3.99 + <p class="dontpublish copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/80x15.png"/></a> 3.100 To the extent possible under law, the editors have waived all copyright and 3.101 related or neighboring rights to this work. In addition, as of 3.102 [DATE: 01 Jan 1901], the editors have made this specification available 3.103 - under the <a rel=license href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0">Open 3.104 + under the <a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open 3.105 Web Foundation Agreement, Version 1.0</a>.</p> 3.106 - <div class=publish><!--copyright--></div> 3.107 + <div class="publish"><!--copyright--></div> 3.108 3.109 </div> 3.110 3.111 - <hr class="top"> 3.112 - 3.113 - <h2 class="no-num no-toc" id="abstract">Abstract</h2> 3.114 + <hr class="top"/> 3.115 + 3.116 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.117 + 3.118 + <h2 id="abstract" class="no-num no-toc">Abstract</h2> 3.119 3.120 <p>CSSOM defines APIs (including generic parsing and serialization rules) 3.121 for Media Queries, Selectors, and of course CSS itself.</p> 3.122 3.123 - <h2 class="no-num no-toc" id="sotd">Status of this Document</h2> 3.124 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.125 + 3.126 + <h2 id="sotd" class="no-num no-toc">Status of this Document</h2> 3.127 3.128 <p><em>This section describes the status of this document at the time of 3.129 its publication. Other documents may supersede this document. A list of 3.130 @@ -90,21 +83,21 @@ 3.131 can be found in the 3.132 <a href="http://www.w3.org/TR/">W3C technical reports index at http://www.w3.org/TR/.</a></em> 3.133 3.134 - <p>This is the [DATE: 3 August 2002] [LONGSTATUS] of CSSOM. Please send 3.135 + </p><p>This is the [DATE: 3 August 2002] [LONGSTATUS] of CSSOM. Please send 3.136 comments to 3.137 <a href="mailto:www-style@w3.org?subject=%5Bcssom%5D%20">www-style@w3.org</a> 3.138 (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) 3.139 with <samp>[cssom]</samp> at the start of the subject line. 3.140 3.141 - <p>This is the [DATE] First Public Working Draft of CSSOM, produced by the 3.142 + </p><p>This is the [DATE] First Public Working Draft of CSSOM, produced by the 3.143 <a href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part 3.144 of the <a href="http://www.w3.org/Style/">Style Activity</a>). 3.145 <!--XXX remove "First Public" after initial publication --> 3.146 3.147 - <p>This document was produced by a group operating under the 3.148 + </p><p>This document was produced by a group operating under the 3.149 <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. 3.150 W3C maintains a 3.151 - <a href="http://www.w3.org/2004/01/pp-impl/32061/status" rel=disclosure>public list of any patent disclosures</a> 3.152 + <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/32061/status">public list of any patent disclosures</a> 3.153 made in connection with the deliverables of the group; that page also 3.154 includes instructions for disclosing a patent. An individual who has 3.155 actual knowledge of a patent which the individual believes contains 3.156 @@ -117,82 +110,93 @@ 3.157 obsoleted by other documents at any time. It is inappropriate to cite this 3.158 document as other than work in progress.</p> 3.159 3.160 - <h2 class="no-num no-toc" id="toc">Table of Contents</h2> 3.161 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.162 + 3.163 + <h2 id="toc" class="no-num no-toc">Table of Contents</h2> 3.164 3.165 <!--toc--> 3.166 3.167 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.168 + 3.169 <h2 id="introduction">Introduction</h2> 3.170 3.171 <p class="XXX">...</p> 3.172 3.173 + <!-- ........................................................................................................................ --> 3.174 + <!-- ........................................................................................................................ --> 3.175 + 3.176 <h3 id="history">History</h3> 3.177 3.178 <p>Several interfaces from DOM Level 2 Style 3.179 - <a href="http://lists.w3.org/Archives/Public/www-style/2003Oct/0347.html" title="[CSSOM] CSSValue and related interfaces (message from the CSS WG)">have 3.180 + <a title="[CSSOM] CSSValue and related interfaces (message from the CSS WG)" href="http://lists.w3.org/Archives/Public/www-style/2003Oct/0347.html">have 3.181 been obsoleted</a> because they were thought to be too awkward for 3.182 frequent use. This specification no longer contains those features. 3.183 <code>DOMImplementationCSS</code> and <code>CSSCharsetRule</code> have 3.184 been removed as well as they were not deemed necessary.</p> 3.185 3.186 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.187 3.188 <h2>Conformance</h2> 3.189 3.190 -<p>All diagrams, examples, and notes in this specification are 3.191 -non-normative, as are all sections explicitly marked non-normative. 3.192 -Everything else in this specification is normative. 3.193 - 3.194 -<p>The key words "MUST", "MUST NOT", "REQUIRED", <!--"SHALL", "SHALL 3.195 -NOT",--> "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 3.196 -"OPTIONAL" in the normative parts of this document are to be 3.197 -interpreted as described in RFC2119. For readability, these words do 3.198 -not appear in all uppercase letters in this specification. 3.199 -<span data-anolis-ref>RFC2119</span> 3.200 - 3.201 -<p>Requirements phrased in the imperative as part of algorithms 3.202 -(such as "strip any leading space characters" or "return false and 3.203 -terminate these steps") are to be interpreted with the meaning of the 3.204 -key word ("must", "should", "may", etc) used in introducing the 3.205 -algorithm. 3.206 - 3.207 -<p>Conformance requirements phrased as algorithms or specific steps 3.208 -may be implemented in any manner, so long as the end result is 3.209 -equivalent. (In particular, the algorithms defined in this 3.210 -specification are intended to be easy to follow, and not intended to 3.211 -be performant.) 3.212 - 3.213 -<p id="hardwareLimitations">User agents may impose 3.214 -implementation-specific limits on otherwise unconstrained inputs, 3.215 -e.g. to prevent denial of service attacks, to guard against running 3.216 -out of memory, or to work around platform-specific limitations. 3.217 - 3.218 -<p>When a method or an attribute is said to call another method or attribute, the user agent must invoke its internal API for that attribute or method so that e.g. the author can't change the behavior by overriding attributes or methods with custom properties or functions in ECMAScript. 3.219 - 3.220 -<p>Unless otherwise stated, string comparisons are done in a 3.221 -<span data-anolis-spec=dom>case-sensitive</span> manner. 3.222 - 3.223 - 3.224 -<h2 id="terminology">Terminology</h2> 3.225 - 3.226 -<p>Terminology used in this specification is from 3.227 -<cite>DOM4</cite>, 3.228 -<cite>HTML</cite>, 3.229 -<cite>Associating Style Sheets with XML documents</cite> 3.230 -and 3.231 -<cite>XML</cite> 3.232 -<span data-anolis-ref>DOM</span> 3.233 -<span data-anolis-ref>HTML</span> 3.234 -<span data-anolis-ref>XMLSS</span> 3.235 -<span data-anolis-ref>XML</span> 3.236 - 3.237 -<p class="XXX"><dfn>supported styling language</dfn> 3.238 - 3.239 -<p>When this specification talks about object 3.240 -<code title><var>A</var></code> where <code title><var>A</var></code> is actually an interface, it generally means an object implementing interface 3.241 -<code title><var>A</var></code>.</p> 3.242 - 3.243 -<p>The term <dfn id="whitespace">whitespace</dfn> is used as defined in CSS. 3.244 -<!--XXX <a href="#ref-css">[CSS]</a>--></p> 3.245 - 3.246 + <p>All diagrams, examples, and notes in this specification are 3.247 + non-normative, as are all sections explicitly marked non-normative. 3.248 + Everything else in this specification is normative. 3.249 + 3.250 + </p><p>The key words "MUST", "MUST NOT", "REQUIRED", <!--"SHALL", "SHALL 3.251 + NOT",--> "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 3.252 + "OPTIONAL" in the normative parts of this document are to be 3.253 + interpreted as described in RFC2119. For readability, these words do 3.254 + not appear in all uppercase letters in this specification. 3.255 + <span data-anolis-ref>RFC2119</span> 3.256 + 3.257 + </p><p>Requirements phrased in the imperative as part of algorithms 3.258 + (such as "strip any leading space characters" or "return false and 3.259 + terminate these steps") are to be interpreted with the meaning of the 3.260 + key word ("must", "should", "may", etc) used in introducing the 3.261 + algorithm. 3.262 + 3.263 + </p><p>Conformance requirements phrased as algorithms or specific steps 3.264 + may be implemented in any manner, so long as the end result is 3.265 + equivalent. (In particular, the algorithms defined in this 3.266 + specification are intended to be easy to follow, and not intended to 3.267 + be performant.) 3.268 + 3.269 + </p><p id="hardwareLimitations">User agents may impose 3.270 + implementation-specific limits on otherwise unconstrained inputs, 3.271 + e.g. to prevent denial of service attacks, to guard against running 3.272 + out of memory, or to work around platform-specific limitations. 3.273 + 3.274 + </p><p>When a method or an attribute is said to call another method or attribute, the user agent must invoke its internal API for that attribute or method so that e.g. the author can't change the behavior by overriding attributes or methods with custom properties or functions in ECMAScript. 3.275 + 3.276 + </p><p>Unless otherwise stated, string comparisons are done in a 3.277 + <span data-anolis-spec="dom">case-sensitive</span> manner. 3.278 + 3.279 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.280 + 3.281 + </p><h2 id="terminology">Terminology</h2> 3.282 + 3.283 + <p>Terminology used in this specification is from 3.284 + <cite>DOM4</cite>, 3.285 + <cite>HTML</cite>, 3.286 + <cite>Associating Style Sheets with XML documents</cite> 3.287 + and 3.288 + <cite>XML</cite> 3.289 + <span data-anolis-ref>DOM</span> 3.290 + <span data-anolis-ref>HTML</span> 3.291 + <span data-anolis-ref>XMLSS</span> 3.292 + <span data-anolis-ref>XML</span> 3.293 + 3.294 + </p><p class="XXX"><dfn>supported styling language</dfn> 3.295 + 3.296 + </p><p>When this specification talks about object 3.297 + <code><var>A</var></code> where <code><var>A</var></code> is actually an interface, it generally means an object implementing interface 3.298 + <code><var>A</var></code>.</p> 3.299 + 3.300 + <p>The term <dfn id="whitespace">whitespace</dfn> is used as defined in CSS. 3.301 + <!--XXX <a href="#ref-css">[CSS]</a>--></p> 3.302 + 3.303 + <!-- ........................................................................................................................ --> 3.304 + <!-- ........................................................................................................................ --> 3.305 3.306 <h3>Common Serializing Idioms</h3> 3.307 3.308 @@ -211,10 +215,10 @@ 3.309 <ul> 3.310 <li>If the character is in the range U+0000 to U+001F or U+007F to 3.311 U+009F, the character 3.312 - <span title="serialize a character as code point">escaped as code point</span>. 3.313 + <span title="serialize a character as code point">escaped as code point</span>.</li> 3.314 <li>If the character is the first character and is in the range 0-9 3.315 (U+0030 to U+0039), the character 3.316 - <span title="serialize a character as code point">escaped as code point</span>. 3.317 + <span title="serialize a character as code point">escaped as code point</span>.</li> 3.318 <li>If the character is the second character and is in the range 0-9 3.319 (U+0030 to U+0039) and the first character is a "<code>-</code>" 3.320 (U+002D), the character 3.321 @@ -239,7 +243,7 @@ 3.322 <ul> 3.323 <li>If the character is in the range U+0000 to U+001F or U+007F to 3.324 U+009F, the character 3.325 - <span title="serialize a character as code point">escaped as code point</span>. 3.326 + <span title="serialize a character as code point">escaped as code point</span>.</li> 3.327 <li>If the character is '<code>"</code>' (U+0022) or '<code>\</code>' 3.328 (U+005C), the <span title="serialize a character">escaped</span> character.</li> 3.329 <li>Otherwise, the character itself.</li> 3.330 @@ -249,7 +253,7 @@ 3.331 are always serialized with '<code>"</code>' (U+0022).</p> 3.332 3.333 <p>To <dfn>serialize a URL</dfn> means to create a string represented by 3.334 - "<code title>url(</code>", followed by the 3.335 + "<code>url(</code>", followed by the 3.336 <span title="serialize a string">string escaped</span> value of the given 3.337 string, followed by "<code>)</code>".</p> 3.338 3.339 @@ -260,6 +264,7 @@ 3.340 <p>To <dfn>serialize a whitespace-separated list</dfn> concatenate all 3.341 items of the list in list order while separating them a space (U+0020).</p> 3.342 3.343 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.344 3.345 <h2>Media Queries</h2> 3.346 3.347 @@ -269,27 +274,31 @@ 3.348 3.349 <!-- XXX ref --> 3.350 3.351 + <!-- ........................................................................................................................ --> 3.352 + <!-- ........................................................................................................................ --> 3.353 + 3.354 <h3>Parsing Media Queries</h3> 3.355 3.356 <p>To 3.357 <dfn id="parse-a-media-query-list">parse a media query list</dfn> for a 3.358 - given string <var title>s</var> into a media query list is defined in 3.359 + given string <var>s</var> into a media query list is defined in 3.360 the Media Queries specification. Return the list of one or more media 3.361 queries that the algorithm defined there gives.</p> <!-- XXX ref --> 3.362 3.363 <p class="note">A media query that ends up being "ignored" will turn 3.364 - into "<code title>not all</code>".</p> 3.365 + into "<code>not all</code>".</p> 3.366 3.367 <p>To 3.368 <dfn id="parse-a-media-query">parse a media query</dfn> for a given string 3.369 - <var title>s</var> means to follow the 3.370 + <var>s</var> means to follow the 3.371 <span>parse a media query list</span> steps and return null if more 3.372 than one media query is returned or a media query if a 3.373 single media query is returned.</p> 3.374 3.375 <p class="note">Again, a media query that ends up being "ignored" will 3.376 - turn into "<code title>not all</code>".</p> 3.377 - 3.378 + turn into "<code>not all</code>".</p> 3.379 + 3.380 + <!-- ........................................................................................................................ --> 3.381 3.382 <h3>Serializing Media Queries</h3> 3.383 3.384 @@ -310,25 +319,25 @@ 3.385 3.386 <p>To 3.387 <dfn id="serialize-a-media-query">serialize a media query</dfn> let 3.388 - <var title>s</var> be the empty string, run the steps below, and 3.389 - finally return <var title>s</var>:</p> 3.390 + <var>s</var> be the empty string, run the steps below, and 3.391 + finally return <var>s</var>:</p> 3.392 3.393 <ol> 3.394 <li><p>If the media query is negated append "<code>not</code>", followed 3.395 - by a space (U+0020), to <var title>s</var>.</p></li> 3.396 - 3.397 - <li><p>Let <var title>type</var> be the media type of the media query, 3.398 + by a space (U+0020), to <var>s</var>.</p></li> 3.399 + 3.400 + <li><p>Let <var>type</var> be the media type of the media query, 3.401 <span title="serialize an identifier">escaped</span> and 3.402 - <span data-anolis-spec=dom>converted to ASCII lowercase</span>.</p></li> 3.403 + <span data-anolis-spec="dom">converted to ASCII lowercase</span>.</p></li> 3.404 3.405 <li><p>If the media query does not contain media features append 3.406 - <var title>type</var>, to <var title>s</var>, 3.407 - then return <var title>s</var> and terminate this algorithm.</p></li> 3.408 - 3.409 - <li><p>If <var title>type</var> is not "<code>all</code>" or if the 3.410 - media query is negated append <var title>type</var>, followed by a 3.411 + <var>type</var>, to <var>s</var>, 3.412 + then return <var>s</var> and terminate this algorithm.</p></li> 3.413 + 3.414 + <li><p>If <var>type</var> is not "<code>all</code>" or if the 3.415 + media query is negated append <var>type</var>, followed by a 3.416 space (U+0020), followed by "<code>and</code>", followed by a space 3.417 - (U+0020), to <var title>s</var>.</p></li> 3.418 + (U+0020), to <var>s</var>.</p></li> 3.419 3.420 <li><p>Sort the media features in lexicographical order.</p></li> 3.421 3.422 @@ -337,20 +346,20 @@ 3.423 3.424 <ol> 3.425 <li>Append a "<code>(</code>" (U+0028), followed by the media feature 3.426 - name, <span data-anolis-spec=dom>converted to ASCII lowercase</span>, 3.427 - to <var title>s</var>.</p></li> 3.428 + name, <span data-anolis-spec="dom">converted to ASCII lowercase</span>, 3.429 + to <var>s</var>.<p></p></li> 3.430 3.431 <li><p>If a value is given append a "<code>:</code>" (U+003A), followed 3.432 by a space (U+0020), followed by the 3.433 <span title="serialize a media feature value">serialized media feature value</span>, 3.434 - to <var title>s</var>.</p> 3.435 + to <var>s</var>.</p></li> 3.436 3.437 <li><p>Append a "<code>)</code>" (U+0029) to 3.438 - <var title>s</var>.</p></li> 3.439 + <var>s</var>.</p></li> 3.440 3.441 <li><p>If this is not the last media feature append a space (U+0020), 3.442 followed by "<code>and</code>", followed by a space (U+0020), to 3.443 - <var title>s</var>.</p></li> 3.444 + <var>s</var>.</p></li> 3.445 </ol> 3.446 </li> 3.447 </ol> 3.448 @@ -361,18 +370,20 @@ 3.449 3.450 <table> 3.451 <thead> 3.452 - <tr><th>Input<th>Output 3.453 - <tbody> 3.454 + <tr><th>Input</th><th>Output 3.455 + </th></tr></thead><tbody> 3.456 <tr> 3.457 <td><code>not screen and (min-WIDTH:5px) AND (max-width:40px )</code> 3.458 - <td><code>not screen and (max-width: 40px) and (min-width: 5px)</code> 3.459 - <tr> 3.460 + </td><td><code>not screen and (max-width: 40px) and (min-width: 5px)</code> 3.461 + </td></tr><tr> 3.462 <td><code>all and (color) and (color)</code> 3.463 - <td><code>(color)</code> 3.464 - </table> 3.465 + </td><td><code>(color)</code> 3.466 + </td></tr></tbody></table> 3.467 </div> 3.468 3.469 3.470 + <!-- ........................................................................................................................ --> 3.471 + 3.472 <h4>Serializing Media Feature Values</h4> 3.473 3.474 <p class="XXX">This should probably be done in terms of mapping it to 3.475 @@ -380,180 +391,115 @@ 3.476 values after all.</p> 3.477 3.478 <p>To <dfn id="serialize-a-media-feature-value">serialize a media feature value</dfn> 3.479 - named <var title>v</var> locate <var title>v</var> in the first 3.480 + named <var>v</var> locate <var>v</var> in the first 3.481 column of the table below and use the serialization format described in 3.482 the second column:</p> 3.483 3.484 <table> 3.485 - <tr> 3.486 + <tbody><tr> 3.487 <th>Media Feature 3.488 - <th>Serialization 3.489 - <tr> 3.490 - <td><code title>width</code> 3.491 - <td>... 3.492 - <tr> 3.493 - <td><code title>height</code> 3.494 - <td>... 3.495 - <tr> 3.496 - <td><code title>device-width</code> 3.497 - <td>... 3.498 - <tr> 3.499 - <td><code title>device-height</code> 3.500 - <td>... 3.501 - <tr> 3.502 - <td><code title>orientation</code> 3.503 - <td> 3.504 - <p>If the value is `<code title>portrait</code>`: "<code title>portrait</code>".</p> 3.505 - <p>If the value is `<code title>landscape</code>`: "<code title>landscape</code>".</p> 3.506 - <tr> 3.507 - <td><code title>aspect-ratio</code> 3.508 - <td>... 3.509 - <tr> 3.510 - <td><code title>device-aspect-ratio</code> 3.511 - <td>... 3.512 - <tr> 3.513 - <td><code title>color</code> 3.514 - <td>... 3.515 - <tr> 3.516 - <td><code title>color-index</code> 3.517 - <td>... 3.518 - <tr> 3.519 - <td><code title>monochrome</code> 3.520 - <td>... 3.521 - <tr> 3.522 - <td><code title>resolution</code> 3.523 - <td>... 3.524 - <tr> 3.525 - <td><code title>scan</code> 3.526 - <td> 3.527 - <p>If the value is `<code title>progressive</code>`: "<code title>progressive</code>".</p> 3.528 - <p>If the value is `<code title>interlace</code>`: "<code title>interlace</code>".</p> 3.529 - <tr> 3.530 - <td><code title>grid</code> 3.531 - <td>... 3.532 - </table> 3.533 + </th><th>Serialization 3.534 + </th></tr><tr> 3.535 + <td><code>width</code> 3.536 + </td><td>... 3.537 + </td></tr><tr> 3.538 + <td><code>height</code> 3.539 + </td><td>... 3.540 + </td></tr><tr> 3.541 + <td><code>device-width</code> 3.542 + </td><td>... 3.543 + </td></tr><tr> 3.544 + <td><code>device-height</code> 3.545 + </td><td>... 3.546 + </td></tr><tr> 3.547 + <td><code>orientation</code> 3.548 + </td><td> 3.549 + <p>If the value is `<code>portrait</code>`: "<code>portrait</code>".</p> 3.550 + <p>If the value is `<code>landscape</code>`: "<code>landscape</code>".</p> 3.551 + </td></tr><tr> 3.552 + <td><code>aspect-ratio</code> 3.553 + </td><td>... 3.554 + </td></tr><tr> 3.555 + <td><code>device-aspect-ratio</code> 3.556 + </td><td>... 3.557 + </td></tr><tr> 3.558 + <td><code>color</code> 3.559 + </td><td>... 3.560 + </td></tr><tr> 3.561 + <td><code>color-index</code> 3.562 + </td><td>... 3.563 + </td></tr><tr> 3.564 + <td><code>monochrome</code> 3.565 + </td><td>... 3.566 + </td></tr><tr> 3.567 + <td><code>resolution</code> 3.568 + </td><td>... 3.569 + </td></tr><tr> 3.570 + <td><code>scan</code> 3.571 + </td><td> 3.572 + <p>If the value is `<code>progressive</code>`: "<code>progressive</code>".</p> 3.573 + <p>If the value is `<code>interlace</code>`: "<code>interlace</code>".</p> 3.574 + </td></tr><tr> 3.575 + <td><code>grid</code> 3.576 + </td><td>... 3.577 + </td></tr></tbody></table> 3.578 3.579 <p>Other specifications can extend this table and vendor-prefixed media 3.580 features can have custom serialization formats as well.</p> 3.581 3.582 - 3.583 + <!-- ........................................................................................................................ --> 3.584 + <!-- ........................................................................................................................ --> 3.585 3.586 <h3>Comparing Media Queries</h3> 3.587 3.588 <p>To 3.589 <dfn id="compare-media-queries">compare media queries</dfn> 3.590 - <var title>m1</var> and <var title>m2</var> means to 3.591 + <var>m1</var> and <var>m2</var> means to 3.592 <span title="serialize a media query">serialize</span> them both and 3.593 return true if they are a 3.594 - <span data-anolis-spec=dom>case-sensitive</span> match and false if they 3.595 + <span data-anolis-spec="dom">case-sensitive</span> match and false if they 3.596 are not.</p> 3.597 3.598 - 3.599 - 3.600 - <h3>The <code title>MediaList</code> Interface</h3> 3.601 - 3.602 - <p>An object that implements the <code>MediaList</code> interface has an 3.603 - associated <dfn>collection of media queries</dfn>.</p> 3.604 - 3.605 - <!-- http://dev.w3.org/2006/webapi/WebIDL/#idl-indexed-properties --> 3.606 - 3.607 - <pre class="idl">interface <dfn>MediaList</dfn> { 3.608 - stringifier attribute DOMString <span title="dom-MediaList-mediaText">mediaText</span>; 3.609 - readonly attribute unsigned long <span title="dom-MediaList-length">length</span>; 3.610 - getter DOMString <span title="dom-MediaList-item">item</span>(unsigned long <var title>index</var>); 3.611 - void <span title="dom-MediaList-appendMedium">appendMedium</span>(DOMString <var title>medium</var>); 3.612 - void <span title="dom-MediaList-deleteMedium">deleteMedium</span>(DOMString <var title>medium</var>); 3.613 -};</pre> 3.614 - 3.615 - <p>The 3.616 - <dfn title="dom-MediaList-mediaText"><code>mediaText</code></dfn> 3.617 - attribute must return a 3.618 - <span title="serialize a media query list">serialization</span> of 3.619 - the <span>collection of media queries</span>.</p> 3.620 - 3.621 - <p>Setting the <code title="dom-MediaList-mediaText">mediaText</code> 3.622 - attribute must run these steps: 3.623 - 3.624 - <ol> 3.625 - <li><p>Empty the <span>collection of media queries</span>.</p></li> 3.626 - 3.627 - <li><p>If the given value is the empty string terminate these 3.628 - steps.</p></li> 3.629 - 3.630 - <li><p>Append all the media queries as a result of 3.631 - <span title="parse a media query list">parsing</span> the given 3.632 - value to the <span>collection of media queries</span>.</p></li> 3.633 - </ol> 3.634 - 3.635 - <p>The 3.636 - <dfn title="dom-MediaList-length"><code>length</code></dfn> 3.637 - attribute must return the number of media queries in 3.638 - the <span>collection of media queries</span>.</p> 3.639 - 3.640 - <p>The 3.641 - <dfn title="dom-MediaList-item"><code>item(<var title>index</var>)</code></dfn> 3.642 - method must return the media query in the 3.643 - <span>collection of media queries</span> given by 3.644 - <var title>index</var>, or null, if <var title>index</var> is 3.645 - greater than or equal to the number of media queries in the 3.646 - <span>collection of media queries</span>.</p> 3.647 - <!-- XXX need consistency here WebIDL? list of media queries? --> 3.648 - 3.649 - <p>The 3.650 - <dfn title="dom-MediaList-appendmedium"><code>appendMedium(<var title>medium</var>)</code></dfn> 3.651 - method must run these steps:</p> 3.652 - 3.653 - <ol> 3.654 - <li><p>Let <var title>m</var> be the result of 3.655 - <span title="parse a media query">parsing</span> the given 3.656 - value.</p></li> 3.657 - 3.658 - <li><p>If <var title>m</var> is null terminate these steps.</p></li> 3.659 - 3.660 - <li><p>If <span title="compare media queries">comparing</span> 3.661 - <var title>m</var> with any of the media queries in the 3.662 - <span>collection of media queries</span> returns true terminate these 3.663 - steps.</p></li> 3.664 - 3.665 - <li><p>Append <var title>m</var> to the 3.666 - <span>collection of media queries</span>.</p></li> 3.667 - </ol> 3.668 - 3.669 - <p>The 3.670 - <dfn title="dom-MediaList-deletemedium"><code>deleteMedium(<var title>medium</var>)</code></dfn> 3.671 - method must run these steps:</p> 3.672 - 3.673 - <ol> 3.674 - <li><p>Let <var title>m</var> be the result of 3.675 - <span title="parse a media query">parsing</span> the given 3.676 - value.</p></li> 3.677 - 3.678 - <li><p>If <var title>m</var> is null terminate these steps.</p></li> 3.679 - 3.680 - <li><p>Remove any media query from the 3.681 - <span>collection of media queries</span> for which 3.682 - <span title="compare media queries">comparing</span> the media query with 3.683 - <var title>m</var> returns true.</p></li> 3.684 - </ol> 3.685 - 3.686 - 3.687 - <h3>Creating a <code title>MediaList</code> Object</h3> 3.688 - 3.689 - <p>To 3.690 - <dfn id="create-a-medialist-object">create a <code>MediaList</code> object</dfn> 3.691 - from a string <var title>s</var>, run these steps:</p> 3.692 - 3.693 - <ol> 3.694 - <li><p>Create a new <code>MediaList</code> object.</p></li> 3.695 - 3.696 - <li><p>Set its <span title="dom-MediaList-mediaText">mediaText</span> 3.697 - attribute to <var title>s</var>.</p></li> 3.698 - 3.699 - <li><p>Return the newly created <code>MediaList</code> object.</p></li> 3.700 - </ol> 3.701 - 3.702 - 3.703 - 3.704 + <!-- ........................................................................................................................ --> 3.705 + <!-- ........................................................................................................................ --> 3.706 + 3.707 + <h3>The <code>MediaList</code> Interface</h3> 3.708 + 3.709 + <p>An object that implements the <a class="idlType" href="#widl-def-MediaList"><code>MediaList</code></a> interface has an associated <dfn>collection of media queries</dfn>.</p> 3.710 +<pre class="idl"><span class="idlInterface" id="widl-def-MediaList">interface <span class="idlInterfaceID">MediaList</span> { 3.711 +<span class="idlAttribute"> stringifier attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MediaList-mediaText">mediaText</a></span>;</span> 3.712 +<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> 3.713 +<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-MediaList-item-DOMString-unsigned-long-index">item</a></span> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 3.714 +<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-MediaList-appendMedium-void-DOMString-medium">appendMedium</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">medium</span></span>);</span> 3.715 +<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> 3.716 +};</span></pre> 3.717 +<dl class="attributes"> 3.718 +<dt class="attribute"> 3.719 +<code>mediaText</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 3.720 +<dd> 3.721 +<p>The <code>mediaText</code> attribute must return a <span title='serialize a media query list'>serialization</span> of the <span>collection of media queries</span>.</p> <p>Setting the <code>mediaText</code> attribute must run these steps: <ol> <li><p>Empty the <span>collection of media queries</span>.</p></li> <li><p>If the given value is the empty string terminate these steps.</p></li> <li><p>Append all the media queries as a result of <span title='parse a media query list'>parsing</span> the given value to the <span>collection of media queries</span>.</p></li> </ol></dd> 3.722 +<dt class="attribute"> 3.723 +<code>length</code> of type <span class="idlAttrType"><a>unsigned long</a></span>, readonly</dt> 3.724 +<dd> 3.725 +<p>The <code>length</code> attribute must return the number of media queries in the <span>collection of media queries</span>.</p></dd> 3.726 +</dl> 3.727 +<dl class="methods"> 3.728 +<dt class="method"> 3.729 +<code>item</code> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>DOMString</a></span></dt> 3.730 +<dd> 3.731 +<p>The <code>item</code> method must return the media query in the <span>collection of media queries</span> given by <var>index</var>, or null, if <var>index</var> is greater than or equal to the number of media queries in the <span>collection of media queries</span>.</p></dd> 3.732 +<dt class="method"> 3.733 +<code>appendMedium</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 3.734 +<dd> 3.735 +<p>The <code>appendMedium</code> method must run these steps:</p> <ol> <li><p>Let <var>m</var> be the result of <span title='parse a media query'>parsing</span> the given value.</p></li> <li><p>If <var>m</var> is null terminate these steps.</p></li> <li><p>If <span title='compare media queries'>comparing</span> <var>m</var> with any of the media queries in the <span>collection of media queries</span> returns true terminate these steps.</p></li> <li><p>Append <var>m</var> to the <span>collection of media queries</span>.</p></li> </ol></dd> 3.736 +<dt class="method"> 3.737 +<code>deleteMedium</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 3.738 +<dd> 3.739 +<p>The <code>deleteMedium</code> method must run these steps:</p> <ol> <li><p>Let <var>m</var> be the result of <span title='parse a media query'>parsing</span> the given value.</p></li> <li><p>If <var>m</var> is null terminate these steps.</p></li> <li><p>Remove any media query from the <span>collection of media queries</span> for which <span title='compare media queries'>comparing</span> the media query with <var>m</var> returns true.</p></li> </ol></dd> 3.740 +</dl> 3.741 +<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 {@name} object.</p></li> <li><p>Set its <span title='dom-MediaList-mediaText'>mediaText</span> attribute to <var>s</var>.</p></li> <li><p>Return the newly created <code>{@name}</code> object.</p></li> </ol> 3.742 + 3.743 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.744 3.745 <h2>Selectors</h2> 3.746 3.747 @@ -562,15 +508,20 @@ 3.748 3.749 <!-- XXX ref universal selector etc? some are in <span> some not --> 3.750 3.751 + <!-- ........................................................................................................................ --> 3.752 + <!-- ........................................................................................................................ --> 3.753 + 3.754 <h3>Parsing Selectors</h3> 3.755 3.756 <p>To 3.757 <dfn id="parse-a-group-of-selectors">parse a group of selectors</dfn> 3.758 - means to parse the value using the <code title>selectors_group</code> 3.759 + means to parse the value using the <code>selectors_group</code> 3.760 production defined in the Selectors specification and return either a 3.761 group of selectors if parsing did not fail or null if parsing did 3.762 fail.</p> <!-- XXX ref --> 3.763 3.764 + <!-- ........................................................................................................................ --> 3.765 + <!-- ........................................................................................................................ --> 3.766 3.767 <h3>Serializing Selectors</h3> 3.768 <!-- http://dump.testsuite.org/2009/cssom/serializing-selectors.htm --> 3.769 @@ -583,16 +534,16 @@ 3.770 group.</p> 3.771 3.772 <p>To <dfn id="serialize-a-selector">serialize a selector</dfn> let 3.773 - <var title>s</var> be the empty string, run the steps below for each 3.774 + <var>s</var> be the empty string, run the steps below for each 3.775 part of the chain of the selector, and finally return 3.776 - <var title>s</var>:</p> 3.777 + <var>s</var>:</p> 3.778 3.779 <ol> 3.780 <li><p>If there is only one <span>simple selector</span> in the 3.781 <span>sequence of simple selectors</span> which is a 3.782 <span>universal selector</span>, append the result of 3.783 <span title="serialize a simple selector">serializing</span> the 3.784 - <span>universal selector</span> to <var title>s</var>.</p></li> 3.785 + <span>universal selector</span> to <var>s</var>.</p></li> 3.786 3.787 <li><p>Otherwise, for each <span>simple selector</span> in the 3.788 <span>sequence of simple selectors</span> that is not a 3.789 @@ -602,26 +553,26 @@ 3.790 <span>default namespace</span> 3.791 <span title="serialize a simple selector">serialize</span> the 3.792 <span>simple selector</span> and append the result to 3.793 - <var title>s</var>.</p></li> 3.794 + <var>s</var>.</p></li> 3.795 3.796 <li><p>If this is not the last part of the chain of the selector append a 3.797 space (U+0020), followed by the combinator 3.798 - "<code>></code>", 3.799 + "<code>></code>", 3.800 "<code>+</code>", or 3.801 "<code>~</code>" 3.802 as appropriate, followed by another space (U+0020) if the combinator was 3.803 - not whitespace, to <var title>s</var>.</p></li> 3.804 + not whitespace, to <var>s</var>.</p></li> 3.805 3.806 <li><p>If this is the last part of the chain of the selector and there is 3.807 a pseudo-element, append "<code>::</code>" followed by the name of the 3.808 - pseudo-class, to <var title>s</var>.</p></li> 3.809 + pseudo-class, to <var>s</var>.</p></li> 3.810 </ol> 3.811 3.812 3.813 <p>To 3.814 <dfn id="serialize-a-simple-selector">serialize a simple selector</dfn> 3.815 - let <var title>s</var> be the empty string, run the steps below, and 3.816 - finally return <var title>s</var>:</p> 3.817 + let <var>s</var> be the empty string, run the steps below, and 3.818 + finally return <var>s</var>:</p> 3.819 3.820 <dl class="switch"> 3.821 <dt>type selector</dt> 3.822 @@ -633,19 +584,19 @@ 3.823 null namespace (not in a namespace) append the 3.824 <span title="serialize an identifier">escaped</span> 3.825 <span>namespace prefix</span>, followed by a "<code>|</code>" (U+007C) 3.826 - to <var title>s</var>.</p></li> 3.827 + to <var>s</var>.</p></li> 3.828 3.829 <li><p>If the <span>namespace prefix</span> maps to a namespace that is 3.830 the null namespace (not in a namespace) append 3.831 - "<code>|</code>" (U+007C) to <var title>s</var>.</p></li> 3.832 + "<code>|</code>" (U+007C) to <var>s</var>.</p></li> 3.833 <!-- This includes |* --> 3.834 3.835 <li><p>If this is a type selector append the 3.836 <span title="serialize an identifier">escaped</span> element name to 3.837 - <var title>s</var>.</p> 3.838 + <var>s</var>.</p></li> 3.839 3.840 <li><p>If this is a universal selector append "<code>*</code>" (U+002A) 3.841 - to <var title>s</var>.</p></li> 3.842 + to <var>s</var>.</p></li> 3.843 </ol> 3.844 </dd> 3.845 3.846 @@ -653,21 +604,21 @@ 3.847 <dd> 3.848 <ol> 3.849 <li><p>Append "<code>[</code>" (U+005B) to 3.850 - <var title>s</var>.</p></li> 3.851 + <var>s</var>.</p></li> 3.852 3.853 <li><p>If the <span>namespace prefix</span> maps to a namespace that is 3.854 not the null namespace (not in a namespace) append the 3.855 <span title="serialize an identifier">escaped</span> 3.856 <span>namespace prefix</span>, followed by a "<code>|</code>" (U+007C) 3.857 - to <var title>s</var>.</p></li> 3.858 + to <var>s</var>.</p></li> 3.859 3.860 <li><p>If the <span>namespace prefix</span> maps to a namespace that is 3.861 the null namespace (not in a namespace) append 3.862 - "<code>|</code>" (U+007C) to <var title>s</var>.</p></li> 3.863 + "<code>|</code>" (U+007C) to <var>s</var>.</p></li> 3.864 <!-- This includes |* --> 3.865 3.866 <li><p>Append the <span title="serialize an identifier">escaped</span> 3.867 - attribute name to <var title>s</var>.</p></li> 3.868 + attribute name to <var>s</var>.</p></li> 3.869 3.870 <li><p>If there is an attribute value specified, append 3.871 "<code>=</code>", 3.872 @@ -678,92 +629,94 @@ 3.873 "<code>*=</code>" 3.874 as appropriate (depending on the type of attribute selector), followed 3.875 by the <span title="serialize a string">string escaped</span> 3.876 - attribute value, to <var title>s</var>.</p></li> 3.877 + attribute value, to <var>s</var>.</p></li> 3.878 3.879 <li><p>Append "<code>]</code>" (U+005D) to 3.880 - <var title>s</vaR>.</p></li> 3.881 + <var>s</var>.</p></li> 3.882 </ol> 3.883 </dd> 3.884 3.885 <dt>class selector</dt> 3.886 <dd><p>Append a "<code>.</code>" (U+002E), followed by the 3.887 <span title="serialize an identifier">escaped</span> class name to 3.888 - <var title>s</var>.</p></dd> 3.889 + <var>s</var>.</p></dd> 3.890 3.891 <dt>ID selector</dt> 3.892 <dd><p>Append a "<code>#</code>" (U+0023), followed by the 3.893 <span title="serialize an identifier">escaped</span> ID to 3.894 - <var title>s</var>.</p></dd> 3.895 + <var>s</var>.</p></dd> 3.896 3.897 <dt>pseudo-class</dt> 3.898 <dd> 3.899 <p>If the pseudo-class does not accept arguments append 3.900 "<code>:</code>" (U+003A), followed by the name of the pseudo-class, to 3.901 - <var title>s</var>.</p> 3.902 + <var>s</var>.</p> 3.903 3.904 <p>Otherwise, append "<code>:</code>" (U+003A), followed by the name of 3.905 the pseudo-class, followed by "<code>(</code>" (U+0028), followed by the 3.906 value of the pseudo-class argument determined as per below, followed by 3.907 - "<code>)</code>" (U+0029), to <var title>s</var>.</p> 3.908 + "<code>)</code>" (U+0029), to <var>s</var>.</p> 3.909 3.910 <dl class="switch"> 3.911 - <dt><code title>:lang()</code></dt> 3.912 + <dt><code>:lang()</code></dt> 3.913 <dd><p>The <span title="serialize an identifier">escaped</span> 3.914 value.</p></dd> 3.915 3.916 - <dt><code title>:nth-child()</code></dt> 3.917 - <dt><code title>:nth-last-child()</code></dt> 3.918 - <dt><code title>:nth-of-type()</code></dt> 3.919 - <dt><code title>:nth-last-of-type()</code></dt> 3.920 + <dt><code>:nth-child()</code></dt> 3.921 + <dt><code>:nth-last-child()</code></dt> 3.922 + <dt><code>:nth-of-type()</code></dt> 3.923 + <dt><code>:nth-last-of-type()</code></dt> 3.924 <dd> 3.925 <ol> 3.926 <li><p>If the value is odd let the value be 3.927 - "<code title>2n+1</code>".</p></li> 3.928 + "<code>2n+1</code>".</p></li> 3.929 3.930 <li><p>If the value is even let the value be 3.931 - "<code title>2n</code>".</p></li> 3.932 - 3.933 - <li><p>If <var title>a</var> is zero let the value be 3.934 - <var title>b</var> 3.935 - <span title="serialize a CSS component value">serialized</span> as <integer>.</p></li> 3.936 - 3.937 - <li><p>If <var title>a</var> is one or minus one and 3.938 - <var title>b</var> is zero let the value be 3.939 - "<code title>n</code>" (U+006E).</p></li> 3.940 - 3.941 - <li><p>If <var title>a</var> is one or minus one let the value be 3.942 - "<code title>n</code>" (U+006E), followed by 3.943 - "<code>+</code>" (U+002B) if <var title>b</var> is positive, 3.944 - followed by <var title>b</var> 3.945 - <span title="serialize a CSS component value">serialized</span> as <integer>.</p></li> 3.946 - 3.947 - <li><p>If <var title>b</var> is zero let the value be 3.948 - <var title>a</var> 3.949 - <span title="serialize a CSS component value">serialized</span> as <integer>, 3.950 - followed by "<code title>n</code>" (U+006E).</p></li> 3.951 + "<code>2n</code>".</p></li> 3.952 + 3.953 + <li><p>If <var>a</var> is zero let the value be 3.954 + <var>b</var> 3.955 + <span title="serialize a CSS component value">serialized</span> as <integer>.</p></li> 3.956 + 3.957 + <li><p>If <var>a</var> is one or minus one and 3.958 + <var>b</var> is zero let the value be 3.959 + "<code>n</code>" (U+006E).</p></li> 3.960 + 3.961 + <li><p>If <var>a</var> is one or minus one let the value be 3.962 + "<code>n</code>" (U+006E), followed by 3.963 + "<code>+</code>" (U+002B) if <var>b</var> is positive, 3.964 + followed by <var>b</var> 3.965 + <span title="serialize a CSS component value">serialized</span> as <integer>.</p></li> 3.966 + 3.967 + <li><p>If <var>b</var> is zero let the value be 3.968 + <var>a</var> 3.969 + <span title="serialize a CSS component value">serialized</span> as <integer>, 3.970 + followed by "<code>n</code>" (U+006E).</p></li> 3.971 3.972 <li><p>Otherwise let the value be 3.973 - <var title>a</var> 3.974 - <span title="serialize a CSS component value">serialized</span> as <integer>, 3.975 - followed by "<code title>n</code>" (U+006E), followed by 3.976 - "<code>+</code>" (U+002B) if <var title>b</var> is positive, 3.977 - followed by <var title>b</var> 3.978 - <span title="serialize a CSS component value">serialized</span> as <integer>.</p></li> 3.979 + <var>a</var> 3.980 + <span title="serialize a CSS component value">serialized</span> as <integer>, 3.981 + followed by "<code>n</code>" (U+006E), followed by 3.982 + "<code>+</code>" (U+002B) if <var>b</var> is positive, 3.983 + followed by <var>b</var> 3.984 + <span title="serialize a CSS component value">serialized</span> as <integer>.</p></li> 3.985 </ol> 3.986 </dd> 3.987 3.988 - <dt><code title>:not()</code></dt> 3.989 + <dt><code>:not()</code></dt> 3.990 <dd><p>The result of serializing the value using the rules for 3.991 <span title="serialize a group of selectors">serializing a group of selectors</span>.</p></dd> 3.992 </dl> 3.993 </dd> 3.994 </dl> 3.995 3.996 - 3.997 - 3.998 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.999 3.1000 <h2>CSS</h2> 3.1001 3.1002 + <!-- ........................................................................................................................ --> 3.1003 + <!-- ........................................................................................................................ --> 3.1004 + 3.1005 <h3>Style Sheet</h3> 3.1006 3.1007 <!-- XXX 3.1008 @@ -781,7 +734,7 @@ 3.1009 <dd><p>The literal string "<code>text/css</code>".</p></dd> 3.1010 3.1011 <dt><dfn id="style-sheet-location">style sheet location</dfn></dt> 3.1012 - <dd><p>The <span data-anolis-spec=html>URL</span> of the 3.1013 + <dd><p>The <span data-anolis-spec="html">URL</span> of the 3.1014 <span>style sheet</span> or null if the <span>style sheet</span> was 3.1015 embedded.</p></dd> 3.1016 3.1017 @@ -818,9 +771,9 @@ 3.1018 <p>In these examples the <span>style sheet title</span> ends up being 3.1019 empty:</p> 3.1020 3.1021 - <pre><style title> body { background:papayawhip } </style></pre> 3.1022 - 3.1023 - <pre><style> body { background:orange } </style></pre> 3.1024 + <pre><style> body { background:papayawhip } </style></pre> 3.1025 + 3.1026 + <pre><style> body { background:orange } </style></pre> 3.1027 </div> 3.1028 </dd> 3.1029 3.1030 @@ -832,9 +785,9 @@ 3.1031 <p>The following <span title="style sheet">style sheets</span> have 3.1032 their <span>style sheet alternate flag</span> set:</p> 3.1033 3.1034 - <pre><code><?xml-stylesheet alternate="yes" title="x" href="data:text/css,…"?></code></pre> 3.1035 - 3.1036 - <pre><code><link rel="alternate stylesheet" title="x" href="data:text/css,…"></code></pre> 3.1037 + <pre><code><?xml-stylesheet alternate="yes" title="x" href="data:text/css,…"?></code></pre> 3.1038 + 3.1039 + <pre><code><link rel="alternate stylesheet" title="x" href="data:text/css,…"></code></pre> 3.1040 </div> 3.1041 </dd> 3.1042 3.1043 @@ -859,122 +812,100 @@ 3.1044 3.1045 <!-- same-origin restrictions --> 3.1046 3.1047 - 3.1048 - <h4>The <code title>StyleSheet</code> Interface</h4> 3.1049 - 3.1050 - <p>The <code>StyleSheet</code> interface represents a base interface that 3.1051 - has no meaning on its own.</p> 3.1052 - 3.1053 - <pre class="idl">interface <dfn id="stylesheet">StyleSheet</dfn> { 3.1054 - readonly attribute DOMString <span title="dom-StyleSheet-type">type</span>; 3.1055 - readonly attribute DOMString <span title="dom-StyleSheet-href">href</span>; 3.1056 - readonly attribute Node <span title="dom-StyleSheet-ownerNode">ownerNode</span>; 3.1057 - readonly attribute <span>StyleSheet</span> <span title="dom-StyleSheet-parentStyleSheet">parentStyleSheet</span>; 3.1058 - readonly attribute DOMString <span title="dom-StyleSheet-title">title</span>; 3.1059 - [PutForwards=<span title="dom-MediaList-mediaText">mediaText</span>] readonly attribute <span>MediaList</span> <span title="dom-StyleSheet-media">media</span>; 3.1060 - attribute boolean <span title="dom-StyleSheet-disabled">disabled</span>; 3.1061 -};</pre> 3.1062 - 3.1063 - <p>The 3.1064 - <dfn title="dom-StyleSheet-type"><code>type</code></dfn> 3.1065 - attribute must return the 3.1066 - <span>style sheet type</span>.</p> 3.1067 - 3.1068 - <p>The 3.1069 - <dfn title="dom-StyleSheet-href"><code>href</code></dfn> 3.1070 - attribute must return the 3.1071 - <span>style sheet location</span>.</p> 3.1072 - 3.1073 - <p>The 3.1074 - <dfn title="dom-StyleSheet-ownerNode"><code>ownerNode</code></dfn> 3.1075 - attribute must return the 3.1076 - <span>style sheet owner node</span>.</p> 3.1077 - 3.1078 - <p>The 3.1079 - <dfn title="dom-StyleSheet-parentStyleSheet"><code>parentStyleSheet</code></dfn> 3.1080 - attribute must return the 3.1081 - <span>style sheet parent</span>.</p> 3.1082 - 3.1083 - <p>The 3.1084 - <dfn title="dom-StyleSheet-title"><code>title</code></dfn> 3.1085 - attribute must return the 3.1086 - <span>style sheet title</span>.</p> 3.1087 - 3.1088 - <p>The 3.1089 - <dfn title="dom-StyleSheet-media"><code>media</code></dfn> 3.1090 - attribute must return the 3.1091 - <span>style sheet media</span>.</p> 3.1092 - 3.1093 - <p>The 3.1094 - <dfn title="dom-StyleSheet-disabled"><code>disabled</code></dfn> 3.1095 - attribute must return true if the <span>style sheet disabled flag</span> 3.1096 - is set, or false otherwise. 3.1097 - 3.1098 - <p>Setting the <code title="dom-StyleSheet-disabled">disabled</code> 3.1099 - attribute must set the <span>style sheet disabled flag</span> if the new 3.1100 - value is true, or unset the <span>style sheet disabled flag</span> 3.1101 - otherwise. 3.1102 - 3.1103 - 3.1104 - <h4>The <code title>CSSStyleSheet</code> Interface</h4> 3.1105 - 3.1106 - <p>The <code>CSSStyleSheet</code> interface represents a 3.1107 - <span>style sheet</span>.</p> 3.1108 - 3.1109 - <!-- 3.1110 - IE exposes: 3.1111 - owningElement, pages, id, type, href, disabled, cssText, readOnly, title, 3.1112 - parentStyleSheet, imports, rules, media 3.1113 - --> 3.1114 - 3.1115 - <pre class="idl">interface <dfn>CSSStyleSheet</dfn> : <span>StyleSheet</span> { 3.1116 - readonly attribute <span>CSSRule</span> <span title="dom-CSSStyleSheet-ownerRule">ownerRule</span>; 3.1117 - readonly attribute <span>CSSRuleList</span> <span title="dom-CSSStyleSheet-cssRules">cssRules</span>; 3.1118 - unsigned long <span title="dom-CSSStyleSheet-insertRule">insertRule</span>(DOMString <var title>rule</var>, unsigned long <var title>index</var>); 3.1119 - void <span title="dom-CSSStyleSheet-deleteRule">deleteRule</span>(unsigned long <var title>index</var>); 3.1120 -};</pre> 3.1121 - 3.1122 - <p>The 3.1123 - <dfn title="dom-CSSStyleSheet-ownerRule"><code>ownerRule</code></dfn> 3.1124 - attribute must return the 3.1125 - <span>style sheet owner CSS rule</span>.</p> 3.1126 - 3.1127 - <p>The 3.1128 - <dfn title="dom-CSSStyleSheet-cssRules"><code>cssRules</code></dfn> 3.1129 - attribute must return a <code>CSSRuleList</code> 3.1130 - object representing the <span>style sheet CSS rules</span>.</p> 3.1131 - 3.1132 - <p class="note">CSS rules that were dropped during parsing can not be 3.1133 - found using APIs described by this specification.</p> 3.1134 - 3.1135 - <p>The 3.1136 - <dfn title="dom-CSSStyleSheet-insertRule"><code>insertRule(<var title>rule</var>, <var title>index</var>)</code></dfn> 3.1137 - method must <span>insert a CSS rule</span> 3.1138 - <var title>rule</var> the in CSS rule list returned by 3.1139 - <code title="dom-CSSStyleSheet-cssRules">cssRules</code> at 3.1140 - <var title>index</var>.</p> 3.1141 - 3.1142 - <p>The 3.1143 - <dfn title="dom-CSSStyleSheet-deleteRule"><code>deleteRule(<var title>index</var>)</code></dfn> 3.1144 - method must <span>remove a CSS rule</span> from the 3.1145 - CSS rule list returned by 3.1146 - <code title="dom-CSSStyleSheet-cssRules">cssRules</code> at 3.1147 - <var title>index</var>.</p> 3.1148 - 3.1149 - 3.1150 + <!-- ........................................................................................................................ --> 3.1151 + 3.1152 + <h4>The <code>StyleSheet</code> Interface</h4> 3.1153 + 3.1154 + <p>The <code>StyleSheet</code> interface represents an abstract, base style sheet.</p> 3.1155 +<pre class="idl"><span class="idlInterface" id="widl-def-StyleSheet">interface <span class="idlInterfaceID">StyleSheet</span> { 3.1156 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-type">type</a></span>;</span> 3.1157 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-href">href</a></span>;</span> 3.1158 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>Node</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-ownerNode">ownerNode</a></span>;</span> 3.1159 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>StyleSheet</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-parentStyleSheet">parentStyleSheet</a></span>;</span> 3.1160 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-title">title</a></span>;</span> 3.1161 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>MediaList</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-media">media</a></span>;</span> 3.1162 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>boolean</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-disabled">disabled</a></span>;</span> 3.1163 +};</span></pre> 3.1164 +<dl class="attributes"> 3.1165 +<dt class="attribute"> 3.1166 +<code>type</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 3.1167 +<dd> 3.1168 +<p>The <code>type</code> attribute must return the <span>style sheet type</span>.</p></dd> 3.1169 +<dt class="attribute"> 3.1170 +<code>href</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 3.1171 +<dd> 3.1172 +<p>The <code>href</code> attribute must return the <span>style sheet location</span>.</p></dd> 3.1173 +<dt class="attribute"> 3.1174 +<code>ownerNode</code> of type <span class="idlAttrType"><a>Node</a></span>, readonly</dt> 3.1175 +<dd> 3.1176 +<p>The <code>ownerNode</code> attribute must return the <span>style sheet owner node</span>.</p></dd> 3.1177 +<dt class="attribute"> 3.1178 +<code>parentStyleSheet</code> of type <span class="idlAttrType"><a>StyleSheet</a></span>, readonly</dt> 3.1179 +<dd> 3.1180 +<p>The <code>parentStyleSheet</code> attribute must return the <span>style sheet parent</span>.</p></dd> 3.1181 +<dt class="attribute"> 3.1182 +<code>title</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 3.1183 +<dd> 3.1184 +<p>The <code>title</code> attribute must return the <span>style sheet title</span>.</p></dd> 3.1185 +<dt class="attribute"> 3.1186 +<code>media</code> of type <span class="idlAttrType"><a>MediaList</a></span>, readonly</dt> 3.1187 +<dd> 3.1188 +<p>The <code>media</code> attribute must return the <span>style sheet media</span>.</p></dd> 3.1189 +<dt class="attribute"> 3.1190 +<code>disabled</code> of type <span class="idlAttrType"><a>boolean</a></span></dt> 3.1191 +<dd> 3.1192 +<p>The <code>disabled</code> attribute must return true if the <span>style sheet disabled flag</span> is set, or false otherwise.</p> <p>Setting the <code>disabled</code> attribute must set the <span>style sheet disabled flag</span> if the new value is true, or unset the <span>style sheet disabled flag</span> otherwise.</p></dd> 3.1193 +</dl> 3.1194 + 3.1195 + 3.1196 + <!-- ........................................................................................................................ --> 3.1197 + 3.1198 + <h4>The <code>CSSStyleSheet</code> Interface</h4> 3.1199 + 3.1200 + <p>The <code>CSSStyleSheet</code> interface represents a CSS <span>style sheet</span> rule.</p> 3.1201 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSStyleSheet">interface <span class="idlInterfaceID">CSSStyleSheet</span> { 3.1202 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRule</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleSheet-ownerRule">ownerRule</a></span>;</span> 3.1203 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRuleList</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleSheet-cssRules">cssRules</a></span>;</span> 3.1204 +<span class="idlMethod"> <span class="idlMethType"><a>unsigned long</a></span> <span class="idlMethName"><a href="#widl-CSSStyleSheet-insertRule-unsigned-long-DOMString-rule-unsigned-long-index">insertRule</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">rule</span></span>, <span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 3.1205 +<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-CSSStyleSheet-deleteRule-void-unsigned-long-index">deleteRule</a></span> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 3.1206 +};</span></pre> 3.1207 +<dl class="attributes"> 3.1208 +<dt class="attribute"> 3.1209 +<code>ownerRule</code> of type <span class="idlAttrType"><a>CSSRule</a></span>, readonly</dt> 3.1210 +<dd> 3.1211 +<p>The <code>ownerRule</code> attribute must return the <span>style sheet owner CSS rule</span>.</p></dd> 3.1212 +<dt class="attribute"> 3.1213 +<code>cssRules</code> of type <span class="idlAttrType"><a>CSSRuleList</a></span>, readonly</dt> 3.1214 +<dd> 3.1215 +<p>The <code>cssRules</code> attribute must return a <code>CSSRuleList</code> object representing the <span>style sheet CSS rules</span>.</p> <p class='note'>CSS rules that were dropped during parsing can not be found using APIs described by this specification.</p></dd> 3.1216 +</dl> 3.1217 +<dl class="methods"> 3.1218 +<dt class="method"> 3.1219 +<code>insertRule</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>, <span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>unsigned long</a></span></dt> 3.1220 +<dd> 3.1221 +<p>The <code>insertRule</code> operation must <span>insert a CSS rule</span> <var>rule</var> the in CSS rule list returned by <code title='dom-CSSStyleSheet-cssRules'>cssRules</code> at <var>index</var>.</p></dd> 3.1222 +<dt class="method"> 3.1223 +<code>deleteRule</code> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 3.1224 +<dd> 3.1225 +<p>The <code>deleteRule</code> operation must <span>remove a CSS rule</span> from the CSS rule list returned by <code title='dom-CSSStyleSheet-cssRules'>cssRules</code> at <var>index</var>.</p></dd> 3.1226 +</dl> 3.1227 + 3.1228 + 3.1229 + <!-- ........................................................................................................................ --> 3.1230 + <!-- ........................................................................................................................ --> 3.1231 3.1232 <h3>Style Sheet Collections</h3> 3.1233 3.1234 <p>Below various new concepts are defined that are associated with each 3.1235 - <code data-anolis-spec=dom>Document</code> object.</p> 3.1236 - 3.1237 - <p>Each <code data-anolis-spec=dom>Document</code> has an associated list of zero or more 3.1238 + <code data-anolis-spec="dom">Document</code> object.</p> 3.1239 + 3.1240 + <p>Each <code data-anolis-spec="dom">Document</code> has an associated list of zero or more 3.1241 <span title="style sheet">style sheets</span>, named the 3.1242 <dfn id="document-style-sheets">document style sheets</dfn>. This is 3.1243 an ordered list that contains all 3.1244 <span title="style sheet">style sheets</span> associated with the 3.1245 - <code data-anolis-spec=dom>Document</code>, in 3.1246 - <span data-anolis-spec=dom title=concept-tree-order>tree order</span>, with 3.1247 + <code data-anolis-spec="dom">Document</code>, in 3.1248 + <span title="concept-tree-order" data-anolis-spec="dom">tree order</span>, with 3.1249 <span title="style sheet">style sheets</span> created from HTTP 3.1250 <code title="http-link">Link</code> headers first, if any, in header 3.1251 order.</p> 3.1252 @@ -1012,19 +943,19 @@ 3.1253 <p>If any of the following is true unset the 3.1254 <span>style sheet disabled flag</span> and terminate these steps: 3.1255 3.1256 - <ul> 3.1257 + </p><ul> 3.1258 <li><p>The <span>style sheet title</span> is empty.</p></li> 3.1259 <li><p>The <span>last style sheet set name</span> is null and the 3.1260 <span>style sheet title</span> is a 3.1261 - <span data-anolis-spec=dom>case-sensitive</span> match 3.1262 + <span data-anolis-spec="dom">case-sensitive</span> match 3.1263 for the <span>preferred style sheet set name</span>.</p></li> 3.1264 <li><p>The <span>style sheet title</span> is a 3.1265 - <span data-anolis-spec=dom>case-sensitive</span> match for the 3.1266 + <span data-anolis-spec="dom">case-sensitive</span> match for the 3.1267 <span>last style sheet set name</span>.</p></li> 3.1268 </ul> 3.1269 </li> 3.1270 3.1271 - <li><p>Set the <span>style sheet disabled flag</span>. 3.1272 + <li><p>Set the <span>style sheet disabled flag</span>.</p></li> 3.1273 </ol> 3.1274 3.1275 <p>A <dfn id="persistent-style-sheet">persistent style sheet</dfn> is a 3.1276 @@ -1046,31 +977,31 @@ 3.1277 its <span>style sheet disabled flag</span> unset.</p> 3.1278 3.1279 <p>To <dfn id="enable-a-style-sheet-set">enable a style sheet set</dfn> 3.1280 - with name <var title>name</var>, run these steps:</p> 3.1281 + with name <var>name</var>, run these steps:</p> 3.1282 3.1283 <ol> 3.1284 - <li><p>If <var title>name</var> is the empty string, set the 3.1285 + <li><p>If <var>name</var> is the empty string, set the 3.1286 <span>style sheet disabled flag</span> for each <span>style sheet</span> 3.1287 - that is in a <span>style sheet set</span> and terminate these steps. 3.1288 + that is in a <span>style sheet set</span> and terminate these steps.</p></li> 3.1289 3.1290 <li><p>Unset the <span>style sheet disabled flag</span> for each 3.1291 <span>style sheet</span> in a <span>style sheet set</span> whose 3.1292 <span>style sheet set name</span> is a 3.1293 - <span data-anolis-spec=dom>case-sensitive</span> match for 3.1294 - <var title>name</var> and set it for all other 3.1295 + <span data-anolis-spec="dom">case-sensitive</span> match for 3.1296 + <var>name</var> and set it for all other 3.1297 <span title="style sheet">style sheets</span> in a 3.1298 <span>style sheet set</span>.</p></li> 3.1299 </ol> 3.1300 3.1301 <p>To <dfn id="select-a-style-sheet-set">select a style sheet set</dfn> 3.1302 - with name <var title>name</var>, run these steps:</p> 3.1303 + with name <var>name</var>, run these steps:</p> 3.1304 3.1305 <ol> 3.1306 <li><p><span>Enable a style sheet set</span> with name 3.1307 - <var title>name</var>.</p></li> 3.1308 + <var>name</var>.</p></li> 3.1309 3.1310 <li><p>Set <span>last style sheet set name</span> to 3.1311 - <var title>name</var>.</p></li> 3.1312 + <var>name</var>.</p></li> 3.1313 </ol> 3.1314 3.1315 <p>A <dfn id="last-style-sheet-set-name">last style sheet set name</dfn> 3.1316 @@ -1081,27 +1012,27 @@ 3.1317 <p>A 3.1318 <dfn id="preferred-style-sheet-set-name">preferred style sheet set name</dfn> 3.1319 is a concept to determine which 3.1320 - <span style="style sheet">style sheets</span> need to have their 3.1321 + <span title="style sheet">style sheets</span> need to have their 3.1322 <span>style sheet disabled flag</span> unset. Initially its value 3.1323 is the empty string. 3.1324 3.1325 - <p>To 3.1326 + </p><p>To 3.1327 <dfn id="change-the-preferred-style-sheet-set-name">change the preferred style sheet set name</dfn> 3.1328 - with name <var title>name</var>, run these steps:</p> 3.1329 + with name <var>name</var>, run these steps:</p> 3.1330 3.1331 <ol> 3.1332 <li><p>Let the <span>preferred style sheet set name</span> be 3.1333 - <var title>current</var>.</p></li> 3.1334 + <var>current</var>.</p></li> 3.1335 3.1336 <li><p>Set <span>preferred style sheet set name</span> to 3.1337 - <var title>name</var>.</p></li> 3.1338 - 3.1339 - <li><p>If <var title>name</var> is not a 3.1340 - <span data-anolis-spec=dom>case-sensitive</span> match for 3.1341 - <var title>current</var> and 3.1342 + <var>name</var>.</p></li> 3.1343 + 3.1344 + <li><p>If <var>name</var> is not a 3.1345 + <span data-anolis-spec="dom">case-sensitive</span> match for 3.1346 + <var>current</var> and 3.1347 <span>last style sheet set name</span> is null 3.1348 <span>enable a style sheet set</span> with name 3.1349 - <var title>new</var>.</p></li> 3.1350 + <var>new</var>.</p></li> 3.1351 </ol> 3.1352 3.1353 <!-- XXX ought to define "applied" 3.1354 @@ -1110,8 +1041,9 @@ 3.1355 depends on disabled flag, alternate flag, media queries, sheesh 3.1356 --> 3.1357 3.1358 - 3.1359 - <h4>The HTTP <code title>Default-Style</code> Header</h4> 3.1360 + <!-- ........................................................................................................................ --> 3.1361 + 3.1362 + <h4>The HTTP <code>Default-Style</code> Header</h4> 3.1363 3.1364 <p>The HTTP <code title="http-default-style">Default-Style</code> header 3.1365 can be used to set the <span>preferred style sheet set name</span> 3.1366 @@ -1123,148 +1055,59 @@ 3.1367 <span>change the preferred style sheet set name</span> with name being the 3.1368 value of the header.</p> 3.1369 3.1370 - 3.1371 - 3.1372 - 3.1373 - <h4>The <code title>StyleSheetList</code> Sequence</h4> 3.1374 - 3.1375 - <p>The sequence parameterized type represents an ordered collection of 3.1376 - <span title="style sheet">style sheets</span>.</p> 3.1377 - 3.1378 - <pre class="idl">typedef sequence<<span>StyleSheet</span>> <dfn>StyleSheetList</dfn>;</pre> 3.1379 - 3.1380 -<!-- 3.1381 - <pre class="idl">interface <dfn>StyleSheetList</dfn> { 3.1382 - readonly attribute unsigned long <span title="stylesheetlist-length">length</span>; 3.1383 - getter <span>StyleSheet</span> <span title="stylesheetlist-item">item</span>(unsigned long <var title>index</var>); 3.1384 -};</pre> 3.1385 - 3.1386 - <p>The 3.1387 - <dfn id="stylesheetlist-length" title="stylesheetlist-length"><code>length</code></dfn> 3.1388 - attribute, on getting, must return the number of 3.1389 - objects currently in the list.</p> 3.1390 - 3.1391 - <p>The 3.1392 - <dfn title="stylesheetlist-item"><code>item(<var title>index</var>)</code></dfn> 3.1393 - method, when invoked, must return the 3.1394 - <code>StyleSheet</code> object in the list given by <var title>index</var>, or 3.1395 - null, if <var title>index</var> is greater than or equal to the 3.1396 - number of items in the list.</p> 3.1397 ---> 3.1398 - 3.1399 - 3.1400 - <h4>Extensions to the <code title>Document</code> Interface</h4> 3.1401 - 3.1402 - <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=200930 (FIXED) --> 3.1403 - <pre class="idl">partial interface <span data-anolis-spec=dom>Document</span> { 3.1404 - readonly attribute <span>StyleSheetList</span> <span title="dom-Document-styleSheets">styleSheets</span>; 3.1405 - attribute DOMString? <span title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</span>; 3.1406 - readonly attribute DOMString? <span title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</span>; 3.1407 - readonly attribute DOMString? <span title="dom-Document-preferredStyleSheetSet">preferredStyleSheetSet</span>; 3.1408 - readonly attribute DOMStringList <span title="dom-Document-styleSheetSets">styleSheetSets</span>; 3.1409 - void <span title="dom-Document-enableStyleSheetsForSet">enableStyleSheetsForSet</span>(DOMString? <var title>name</var>); 3.1410 -};</pre> 3.1411 - 3.1412 - <p>The 3.1413 - <dfn id="dom-document-stylesheets" title="dom-Document-styleSheets"><code>styleSheets</code></dfn> 3.1414 - attribute must return a <code>StyleSheetList</code> 3.1415 - sequence representing the <span>document style sheets</span>.</p> 3.1416 - 3.1417 - <p class="note">Because of historical IDL limitations the 3.1418 - <code title="dom-Document-styleSheets">styleSheets</code> attribute used 3.1419 - to be on a separate interface, <code title>DocumentStyle</code>.</p> 3.1420 - 3.1421 - <p>The 3.1422 - <dfn id="dom-document-selectedStyleSheetSet" title="dom-Document-selectedStyleSheetSet"><code>selectedStyleSheetSet</code></dfn> 3.1423 - attribute, on getting, must run these steps:</p> 3.1424 - 3.1425 - <ol> 3.1426 - <li><p>If there is a single <span>enabled style sheet set</span> and no 3.1427 - other <span>document style sheets</span> with a non-empty 3.1428 - <span>style sheet title</span> have the 3.1429 - <span>style sheet disabled flag</span> unset, return the 3.1430 - <span>style sheet set name</span> of the 3.1431 - <span>enabled style sheet set</span> and terminate these steps. 3.1432 - 3.1433 - <li><p>Otherwise, if <span title="style sheet">style sheets</span> from 3.1434 - different <span title="style sheet set">style sheet sets</span> have 3.1435 - their <span>style sheet disabled flag</span> unset, return 3.1436 - null and terminate these steps. 3.1437 - 3.1438 - <li> 3.1439 - <p>Otherwise, return the empty string.</p> 3.1440 - 3.1441 - <p class="note">At this point either all 3.1442 - <span title="style sheet">style sheets</span> with a non-empty 3.1443 - <span>style sheet title</span> have the 3.1444 - <span>style sheet disabled flag</span> set, or there are no such 3.1445 - <span title="style sheet">style sheets</span>.</p> 3.1446 - </li> 3.1447 - </ol> 3.1448 - 3.1449 - <p>On setting the 3.1450 - <code title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code> 3.1451 - attribute these steps must be run:</p> 3.1452 - 3.1453 - <ol> 3.1454 - <li><p>If the value is null terminate this set of steps.</p></li> 3.1455 - 3.1456 - <li><p>Otherwise, <span>select a style sheet set</span> with as name the 3.1457 - value passed.</p></li> 3.1458 - </ol> 3.1459 - 3.1460 - <p>From the DOM's perspective, all views have the same 3.1461 - <code title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code>. 3.1462 - If a user agent supports multiple views with different selected 3.1463 - alternative style sheets, then this attribute (and the 3.1464 - <code>StyleSheet</code> interface's 3.1465 - <code title="dom-StyleSheet-disabled">disabled</code> attribute) 3.1466 - must return and set the value for the default 3.1467 - view.</p> 3.1468 - <!-- XXX clean up once we get rid of views --> 3.1469 - 3.1470 - <p>The 3.1471 - <dfn id="dom-document-lastStyleSheetSet" title="dom-Document-lastStyleSheetSet"><code>lastStyleSheetSet</code></dfn> 3.1472 - attribute must return the 3.1473 - <span>last style sheet set name</span>.</p> 3.1474 - 3.1475 - <p class="note">This attribute is initially null.</p> 3.1476 - 3.1477 - <p>The 3.1478 - <dfn id="dom-document-preferredStyleSheetSet" title="dom-Document-preferredStyleSheetSet"><code>preferredStyleSheetSet</code></dfn> 3.1479 - attribute must return the 3.1480 - <span>preferred style sheet set name</span>.</p> 3.1481 - 3.1482 - <p class="note">Unlike 3.1483 - <code title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code>, 3.1484 - this attribute is initially the empty string.</p> <!-- XXX change? --> 3.1485 - 3.1486 - <p>The 3.1487 - <dfn id="dom-document-styleSheetSets" title="dom-Document-styleSheetSets"><code>styleSheetSets</code></dfn> 3.1488 - attribute must return a list of the 3.1489 - <span title="style sheet set name">style sheet set names</span> of the 3.1490 - <span title="style sheet set">style sheet sets</span>, in order of the 3.1491 - <span>document style sheets</span>.</p> 3.1492 - 3.1493 - <p>The 3.1494 - <dfn id="dom-document-enablestylesheetsforset" title="dom-Document-enableStyleSheetsForSet"><code>enableStyleSheetsForSet(<var title>name</var>)</code></dfn> 3.1495 - method must, when invoked, run these steps:</p> 3.1496 - 3.1497 - <ol> 3.1498 - <li><p>If <var title>name</var> is null terminate these 3.1499 - steps.</p></li> 3.1500 - 3.1501 - <li><p><span>Enable a style sheet set</span> with name 3.1502 - <var title>name</var>.</p></li> 3.1503 - </ol> 3.1504 - 3.1505 - <p class="note"><span title="Style sheet">Style sheets</span> with an 3.1506 - empty <span>style sheet title</span> are never affected by this method. 3.1507 - This method does not change the values of the 3.1508 - <code title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code> or 3.1509 - <code title="dom-Document-preferredStyleSheetSet">preferredStyleSheetSet</code> 3.1510 - attributes.</p> 3.1511 - 3.1512 + <!-- ........................................................................................................................ --> 3.1513 + 3.1514 + <h4>The <code>StyleSheetList</code> Sequence</h4> 3.1515 + 3.1516 + <p>The <code>StyleSheetList</code> sequence represents an ordered collection of <span title='style sheets'>style sheets</span>.</p> 3.1517 +<pre class="idl">[[TBD - TYPEDEF]] 3.1518 +</pre> 3.1519 + 3.1520 + 3.1521 + <!-- ........................................................................................................................ --> 3.1522 + 3.1523 + <h4>Extensions to the <code>Document</code> Interface</h4> 3.1524 + 3.1525 + 3.1526 +<pre class="idl"><span class="idlInterface" id="widl-def-Document">partial interface <span class="idlInterfaceID">Document</span> { 3.1527 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>StyleSheetList</a></span> <span class="idlAttrName"><a href="#widl-Document-styleSheets">styleSheets</a></span>;</span> 3.1528 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-Document-selectedStyleSheetSet">selectedStyleSheetSet</a></span>;</span> 3.1529 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-Document-lastStyleSheetSet">lastStyleSheetSet</a></span>;</span> 3.1530 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-Document-preferredStyleSheetSet">preferredStyleSheetSet</a></span>;</span> 3.1531 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMStringList</a></span> <span class="idlAttrName"><a href="#widl-Document-styleSheetSets">styleSheetSets</a></span>;</span> 3.1532 +<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-Document-enableStyleSheetsForSet-void-DOMString-name">enableStyleSheetsForSet</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">name</span></span>);</span> 3.1533 +};</span></pre> 3.1534 +<dl class="attributes"> 3.1535 +<dt class="attribute"> 3.1536 +<code>styleSheets</code> of type <span class="idlAttrType"><a>StyleSheetList</a></span>, readonly</dt> 3.1537 +<dd> 3.1538 +<p>The <code>styleSheets</code> attribute must return a <code>StyleSheetList</code> sequence representing the <span>document style sheets</span>.</p> <p class='note'>Because of historical IDL limitations the <code>styleSheets</code> attribute used to be on a separate interface, <code>DocumentStyle</code>.</p></dd> 3.1539 +<dt class="attribute"> 3.1540 +<code>selectedStyleSheetSet</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 3.1541 +<dd> 3.1542 +<p>The <code>selectedStyleSheetSet</code> attribute must, on getting, must run these steps:</p> <ol> <li><p>If there is a single <span>enabled style sheet set</span> and no other <span>document style sheets</span> with a non-empty <span>style sheet title</span> have the <span>style sheet disabled flag</span> unset, return the <span>style sheet set name</span> of the <span>enabled style sheet set</span> and terminate these steps.</li> <li><p>Otherwise, if <span title='style sheet'>style sheets</span> from different <span title='style sheet set'>style sheet sets</span> have their <span>style sheet disabled flag</span> unset, return null and terminate these steps.</li> <li> <p>Otherwise, return the empty string.</p> <p class='note'>At this point either all <span title='style sheet'>style sheets</span> with a non-empty <span>style sheet title</span> have the <span>style sheet disabled flag</span> set, or there are no such <span title='style sheet'>style sheets</span>.</p> </li> </ol> <p>On setting the <code title='dom-Document-selectedStyleSheetSet'>selectedStyleSheetSet</code> attribute these steps must be run:</p> <ol> <li><p>If the value is null terminate this set of steps.</p></li> <li><p>Otherwise, <span>select a style sheet set</span> with as name the value passed.</p></li> </ol> <p>From the DOM's perspective, all views have the same <code title='dom-Document-selectedStyleSheetSet'>selectedStyleSheetSet</code>. If a user agent supports multiple views with different selected alternative style sheets, then this attribute (and the <code>StyleSheet</code> interface's <code title='dom-StyleSheet-disabled'>disabled</code> attribute) must return and set the value for the default view.</p></dd> 3.1543 +<dt class="attribute"> 3.1544 +<code>lastStyleSheetSet</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 3.1545 +<dd> 3.1546 +<p>The <code>lastStyleSheetSet</code> attribute must return the <span>last style sheet set name</span>.</p> <p class='note'>This attribute is initially null.</p></dd> 3.1547 +<dt class="attribute"> 3.1548 +<code>preferredStyleSheetSet</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 3.1549 +<dd> 3.1550 +<p>The <code>preferredStyleSheetSet</code> attribute must return the <span>preferred style sheet set name</span>.</p> <p class='note'>Unlike <code title='dom-Document-lastStyleSheetSet'>lastStyleSheetSet</code>, this attribute is initially the empty string.</p></dd> 3.1551 +<dt class="attribute"> 3.1552 +<code>styleSheetSets</code> of type <span class="idlAttrType"><a>DOMStringList</a></span>, readonly</dt> 3.1553 +<dd> 3.1554 +<p>The <code>styleSheetSets</code> attribute must return a list of the <span title='style sheet set name'>style sheet set names</span> of the <span title='style sheet set'>style sheet sets</span>, in order of the <span>document style sheets</span>.</p></dd> 3.1555 +</dl> 3.1556 +<dl class="methods"> 3.1557 +<dt class="method"> 3.1558 +<code>enableStyleSheetsForSet</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 3.1559 +<dd> 3.1560 +<p>The <code>enableStyleSheetsForSet</code> operation must, when invoked, run these steps:</p> <ol> <li><p>If <var>name</var> is null terminate these steps.</p></li> <li><p><span>Enable a style sheet set</span> with name <var>name</var>.</p></li> </ol> <p class='note'><span title='Style sheet'>Style sheets</span> with an empty <span>style sheet title</span> are never affected by this method. This method does not change the values of the <code title='dom-Document-lastStyleSheetSet'>lastStyleSheetSet</code> or <code title='dom-Document-preferredStyleSheetSet'>preferredStyleSheetSet</code> attributes.</p></dd> 3.1561 +</dl> 3.1562 + 3.1563 + 3.1564 + <!-- ........................................................................................................................ --> 3.1565 3.1566 <h4>Interaction with the User Interface</h4> 3.1567 3.1568 @@ -1312,6 +1155,8 @@ 3.1569 <!-- XXX this UI section suggests we may want to introduce a few more 3.1570 idioms --> 3.1571 3.1572 + <!-- ........................................................................................................................ --> 3.1573 + 3.1574 <h4>Examples</h4> 3.1575 3.1576 <div class="example"> 3.1577 @@ -1368,41 +1213,41 @@ 3.1578 are not.</p> 3.1579 </div> 3.1580 3.1581 - 3.1582 - 3.1583 + <!-- ........................................................................................................................ --> 3.1584 + <!-- ........................................................................................................................ --> 3.1585 3.1586 <h3>Style Sheet Association</h3> 3.1587 3.1588 <p>This section defines the interface a 3.1589 <span>style sheet owner node</span> of a <span>style sheet</span> has to 3.1590 implement and defines the requirements for 3.1591 - <span data-anolis-spec=xmlss title="xml-stylesheet processing instruction">xml-stylesheet processing instructions</span> 3.1592 + <span title="xml-stylesheet processing instruction" data-anolis-spec="xmlss">xml-stylesheet processing instructions</span> 3.1593 and HTTP <code title="http-link">Link</code> headers when the link 3.1594 relation type is an 3.1595 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 3.1596 - "<code title>stylesheet</code>" since nobody else was interested in 3.1597 + <span data-anolis-spec="dom">ASCII case-insensitive</span> match for 3.1598 + "<code>stylesheet</code>" since nobody else was interested in 3.1599 defining this.</p> 3.1600 3.1601 - <p class=note>The editor is in good hope that HTML and SVG will define the 3.1602 + <p class="note">The editor is in good hope that HTML and SVG will define the 3.1603 appropriate processing in their respective specifications, in terms of 3.1604 this specification, in due course.</p> 3.1605 3.1606 3.1607 - <h4>The <code title>LinkStyle</code> Interface</h4> 3.1608 - 3.1609 - <p>The <dfn id="associated-style-sheet">associated style sheet</dfn> of a 3.1610 - node is the <span>style sheet</span> in the list of 3.1611 - <span>document style sheets</span> of which the 3.1612 - <span>style sheet owner node</span> 3.1613 - implements the <code>LinkStyle</code> interface.</p> 3.1614 - 3.1615 - <pre class="idl">[NoInterfaceObject] interface <dfn>LinkStyle</dfn> { 3.1616 - readonly attribute <span>StyleSheet</span> <span title="dom-linkstyle-sheet">sheet</span>; 3.1617 -};</pre> 3.1618 - 3.1619 - <p>The <dfn title="dom-LinkStyle-sheet"><code>sheet</code></dfn> attribute 3.1620 - must return the <span>associated style sheet</span> for the node, or null, 3.1621 - if there is no <span>associated style sheet</span>.</p> 3.1622 + <!-- ........................................................................................................................ --> 3.1623 + 3.1624 + <h4>The <code>LinkStyle</code> Interface</h4> 3.1625 + 3.1626 + <p>The <dfn id='associated-style-sheet'>associated style sheet</dfn> of a node is the <span>style sheet</span> in the list of <span>document style sheets</span> of which the <span>style sheet owner node</span> implements the <code>LinkStyle</code> interface.</p> 3.1627 +<pre class="idl"><span class="idlInterface" id="widl-def-LinkStyle">interface <span class="idlInterfaceID">LinkStyle</span> { 3.1628 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>StyleSheet</a></span> <span class="idlAttrName"><a href="#widl-LinkStyle-sheet">sheet</a></span>;</span> 3.1629 +};</span></pre> 3.1630 +<dl class="attributes"> 3.1631 +<dt class="attribute"> 3.1632 +<code>sheet</code> of type <span class="idlAttrType"><a>StyleSheet</a></span>, readonly</dt> 3.1633 +<dd> 3.1634 +<p>The <code>sheet</code> attribute must return the <span>associated style sheet</span> for the node, or null, if there is no <span>associated style sheet</span>.</p></dd> 3.1635 +</dl> 3.1636 + 3.1637 3.1638 <div class="example"> 3.1639 <p>In the following HTML snippet the first HTML <code>style</code> 3.1640 @@ -1412,14 +1257,14 @@ 3.1641 (Assuming the user agent supports CSS (<code>text/css</code>) and does 3.1642 not support ExampleSheets (<code>text/example-sheets</code>).</p> 3.1643 3.1644 - <pre><style type=text/css> body { background:lime } </style> 3.1645 -<style type=text/example-sheets> $(body).background := lime </style></pre> 3.1646 + <pre><style type=text/css> body { background:lime } </style> 3.1647 +<style type=text/example-sheets> $(body).background := lime </style></pre> 3.1648 </div> 3.1649 3.1650 <p class="note">Whether or not the node refers to a style sheet is defined 3.1651 by the specification that defines the semantics of said node.</p> 3.1652 3.1653 - 3.1654 + <!-- ........................................................................................................................ --> 3.1655 3.1656 <h4>Requirements on specifications</h4> 3.1657 3.1658 @@ -1432,48 +1277,57 @@ 3.1659 3.1660 3.1661 3.1662 + <!-- ........................................................................................................................ --> 3.1663 + 3.1664 <h4>Requirements on User Agents Implementing the 3.1665 - <span title><code>xml-stylesheet</code> processing instruction</span></h4> 3.1666 + <span><code>xml-stylesheet</code> processing instruction</span></h4> 3.1667 3.1668 <!-- XXX load/error events, reparse --> 3.1669 3.1670 + 3.1671 +<pre class="idl">[[TBD - IMPLEMENTS]] 3.1672 +</pre> 3.1673 + 3.1674 + 3.1675 + <!-- 3.1676 <pre class="idl"><span data-anolis-spec=dom>ProcessingInstruction</span> implements <span>LinkStyle</span>;</pre> 3.1677 + --> 3.1678 3.1679 <p>For each 3.1680 - <span data-anolis-spec=xmlss><code>xml-stylesheet</code> processing instruction</span> 3.1681 + <span data-anolis-spec="xmlss"><code>xml-stylesheet</code> processing instruction</span> 3.1682 that is not part of the 3.1683 - <span data-anolis-spec=xml>document type declaration</span> and has an 3.1684 - <code title>href</code> 3.1685 - <span data-anolis-spec=xmlss>pseudo-attribute</span> these steps must 3.1686 + <span data-anolis-spec="xml">document type declaration</span> and has an 3.1687 + <code>href</code> 3.1688 + <span data-anolis-spec="xmlss">pseudo-attribute</span> these steps must 3.1689 (unless otherwise stated) be run:</p> 3.1690 3.1691 <ol> 3.1692 - <li><p>Let <var title>title</var> be the value of the 3.1693 - <code title>title</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> or the empty string if the 3.1694 - <code title>title</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> is not specified.</p></li> 3.1695 - 3.1696 - <li><p>If there is an <code title>alternate</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> 3.1697 - whose value is a <span data-anolis-spec=dom>case-sensitive</span> match 3.1698 - for "<code title>yes</code>" and <var title>title</var> is the 3.1699 + <li><p>Let <var>title</var> be the value of the 3.1700 + <code>title</code> <span data-anolis-spec="xmlss">pseudo-attribute</span> or the empty string if the 3.1701 + <code>title</code> <span data-anolis-spec="xmlss">pseudo-attribute</span> is not specified.</p></li> 3.1702 + 3.1703 + <li><p>If there is an <code>alternate</code> <span data-anolis-spec="xmlss">pseudo-attribute</span> 3.1704 + whose value is a <span data-anolis-spec="dom">case-sensitive</span> match 3.1705 + for "<code>yes</code>" and <var>title</var> is the 3.1706 empty string terminate these steps.</p></li> 3.1707 3.1708 - <li><p>If there is a <code title>type</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> whose 3.1709 + <li><p>If there is a <code>type</code> <span data-anolis-spec="xmlss">pseudo-attribute</span> whose 3.1710 value is not a <span>supported styling language</span> the user agent 3.1711 may terminate these steps.</p></li> 3.1712 3.1713 - <li><p><span data-anolis-spec=html title="Resolve a URL">Resolve</span> 3.1714 - the <span data-anolis-spec=html>URL</span> specified by the 3.1715 - <code title>href</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> and then 3.1716 - <span data-anolis-spec=html>fetch</span> it.</p></li> 3.1717 + <li><p><span title="Resolve a URL" data-anolis-spec="html">Resolve</span> 3.1718 + the <span data-anolis-spec="html">URL</span> specified by the 3.1719 + <code>href</code> <span data-anolis-spec="xmlss">pseudo-attribute</span> and then 3.1720 + <span data-anolis-spec="html">fetch</span> it.</p></li> 3.1721 3.1722 <li> 3.1723 <p>When the resource is available, the document is in 3.1724 - <span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span> 3.1725 + <span title="concept-quirks-mode" data-anolis-spec="dom">quirks mode</span> 3.1726 and the 3.1727 - <span data-anolis-spec=html>Content-Type metadata</span> of 3.1728 + <span data-anolis-spec="html">Content-Type metadata</span> of 3.1729 the resource is not a <span>supported styling language</span> change the 3.1730 - <span data-anolis-spec=html>Content-Type metadata</span> of the resource 3.1731 - to <code title>text/css</code>.</p> 3.1732 + <span data-anolis-spec="html">Content-Type metadata</span> of the resource 3.1733 + to <code>text/css</code>.</p> 3.1734 3.1735 <p class="note">This step might never actually happen, but is included 3.1736 here in case other specifications change, to keep things consistent.</p> 3.1737 @@ -1487,7 +1341,7 @@ 3.1738 3.1739 <dl> 3.1740 <dt><span>style sheet location</span></dt> 3.1741 - <dd><p>The <span data-anolis-spec=html>absolute URL</span> of the 3.1742 + <dd><p>The <span data-anolis-spec="html">absolute URL</span> of the 3.1743 resource.</p></dd> 3.1744 3.1745 <dt><span>style sheet parent</span></dt> 3.1746 @@ -1500,24 +1354,26 @@ 3.1747 <dd><p>null</p></dd> 3.1748 3.1749 <dt><span>style sheet media</span></dt> 3.1750 - <dd><p>The value of the <code title>media</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> 3.1751 + <dd><p>The value of the <code>media</code> <span data-anolis-spec="xmlss">pseudo-attribute</span> 3.1752 if any, or the empty string otherwise.</p></dd> 3.1753 3.1754 <dt><span>style sheet title</span></dt> 3.1755 - <dd><p><var title>title</var></p></dd> 3.1756 + <dd><p><var>title</var></p></dd> 3.1757 3.1758 <dt><span>style sheet alternate flag</span></dt> 3.1759 - <dd><p>Set if the <code title>alternate</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> 3.1760 - value is a <span data-anolis-spec=dom>case-sensitive</span> match for 3.1761 + <dd><p>Set if the <code>alternate</code> <span data-anolis-spec="xmlss">pseudo-attribute</span> 3.1762 + value is a <span data-anolis-spec="dom">case-sensitive</span> match for 3.1763 "<code>yes</code>", or unset otherwise. 3.1764 - </dl> 3.1765 + </p></dd></dl> 3.1766 </li> 3.1767 </ol> 3.1768 3.1769 3.1770 3.1771 + <!-- ........................................................................................................................ --> 3.1772 + 3.1773 <h4>Requirements on User Agents Implementing the HTTP 3.1774 - <code title>Link</code> Header</h4> 3.1775 + <code>Link</code> Header</h4> 3.1776 3.1777 <!-- XXX ref, one day --> 3.1778 3.1779 @@ -1525,30 +1381,30 @@ 3.1780 3.1781 <p>For each HTTP <code title="http-link">Link</code> header of which one 3.1782 of the link relation types is an 3.1783 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match 3.1784 - for "<code title>stylesheet</code>" these steps 3.1785 + <span data-anolis-spec="dom">ASCII case-insensitive</span> match 3.1786 + for "<code>stylesheet</code>" these steps 3.1787 must be run:</p> 3.1788 3.1789 <ol> 3.1790 - <li><p>Let <var title>title</var> be the value of the first of all the 3.1791 - <code title>title</code> and <code title>title*</code> parameters. 3.1792 + <li><p>Let <var>title</var> be the value of the first of all the 3.1793 + <code>title</code> and <code>title*</code> parameters. 3.1794 If there are no such parameters it is the empty string.</p></li> 3.1795 3.1796 <li><p>If one of the (other) link relation types is an 3.1797 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 3.1798 - "<code title>alternate</code>" and <var title>title</var> is the 3.1799 + <span data-anolis-spec="dom">ASCII case-insensitive</span> match for 3.1800 + "<code>alternate</code>" and <var>title</var> is the 3.1801 empty string terminate these steps.</p></li> 3.1802 3.1803 - <li><p><span data-anolis-spec=html title="Resolve a URL">Resolve</span> 3.1804 - the specified <span data-anolis-spec=html>URL</span> and 3.1805 - <span data-anolis-spec=html>fetch</span> it.</p></li> 3.1806 + <li><p><span title="Resolve a URL" data-anolis-spec="html">Resolve</span> 3.1807 + the specified <span data-anolis-spec="html">URL</span> and 3.1808 + <span data-anolis-spec="html">fetch</span> it.</p></li> 3.1809 3.1810 <li><p>When the resource is available, the document is in 3.1811 - <span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span> 3.1812 - and the <span data-anolis-spec=html>Content-Type metadata</span> of 3.1813 + <span title="concept-quirks-mode" data-anolis-spec="dom">quirks mode</span> 3.1814 + and the <span data-anolis-spec="html">Content-Type metadata</span> of 3.1815 the resource is not a <span>supported styling language</span> change the 3.1816 - <span data-anolis-spec=html>Content-Type metadata</span> of the resource 3.1817 - to <code title>text/css</code>.</p></li> 3.1818 + <span data-anolis-spec="html">Content-Type metadata</span> of the resource 3.1819 + to <code>text/css</code>.</p></li> 3.1820 3.1821 <li><p>If the resource is not in a 3.1822 <span>supported styling language</span> terminate these steps.</p></li> 3.1823 @@ -1558,7 +1414,7 @@ 3.1824 3.1825 <dl> 3.1826 <dt><span>style sheet location</span></dt> 3.1827 - <dd><p>The <span data-anolis-spec=html>absolute URL</span> of the 3.1828 + <dd><p>The <span data-anolis-spec="html">absolute URL</span> of the 3.1829 resource.</p></dd> 3.1830 3.1831 <dt><span>style sheet owner node</span></dt> 3.1832 @@ -1574,21 +1430,23 @@ 3.1833 <dd><p>null</p></dd> 3.1834 3.1835 <dt><span>style sheet media</span></dt> 3.1836 - <dd><p>The value of the first <code title>media</code> parameter.</p></dd> 3.1837 + <dd><p>The value of the first <code>media</code> parameter.</p></dd> 3.1838 <!-- XXX register media parameter? bah --> 3.1839 3.1840 <dt><span>style sheet title</span></dt> 3.1841 - <dd><p><var title>title</var></p></dd> 3.1842 + <dd><p><var>title</var></p></dd> 3.1843 3.1844 <dt><span>style sheet alternate flag</span></dt> 3.1845 <dd><p>Set if one of the specified link relation type for this HTTP 3.1846 <code title="http-link">Link</code> header is an 3.1847 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 3.1848 - "<code title>alternate</code>", or false otherwise. 3.1849 - </dl> 3.1850 + <span data-anolis-spec="dom">ASCII case-insensitive</span> match for 3.1851 + "<code>alternate</code>", or false otherwise. 3.1852 + </p></dd></dl> 3.1853 </li> 3.1854 </ol> 3.1855 3.1856 + <!-- ........................................................................................................................ --> 3.1857 + <!-- ........................................................................................................................ --> 3.1858 3.1859 <h3>CSS Rules</h3> 3.1860 3.1861 @@ -1599,7 +1457,7 @@ 3.1862 3.1863 <dl class="switch"> 3.1864 <dt><code>CSSStyleRule</code></dt> 3.1865 - <dd class=XXX>...</dd> 3.1866 + <dd class="XXX">...</dd> 3.1867 3.1868 <dt><code>CSSImportRule</code></dt> 3.1869 <dd> 3.1870 @@ -1618,13 +1476,13 @@ 3.1871 </dd> 3.1872 3.1873 <dt><code>CSSMediaRule</code></dt> 3.1874 - <dd class=XXX>...</dd> 3.1875 + <dd class="XXX">...</dd> 3.1876 3.1877 <dt><code>CSSFontFaceRule</code></dt> 3.1878 - <dd class=XXX>...</dd> 3.1879 + <dd class="XXX">...</dd> 3.1880 3.1881 <dt><code>CSSPageRule</code></dt> 3.1882 - <dd class=XXX>...</dd> 3.1883 + <dd class="XXX">...</dd> 3.1884 3.1885 <dt><code>CSSNamespaceRule</code></dt> 3.1886 <dd><p>The literal string "<code>@namespace</code>", followed by a space 3.1887 @@ -1637,337 +1495,228 @@ 3.1888 attribute, followed the character "<code>;</code>" (U+003B).</p></dd> 3.1889 </dl> 3.1890 3.1891 - <p>To <dfn>insert a CSS rule</dfn> <var title>rule</var> into a 3.1892 - CSS rule list <var title>list</var> at location 3.1893 - <var title>index</var> follow these steps:</p> 3.1894 + <p>To <dfn>insert a CSS rule</dfn> <var>rule</var> into a 3.1895 + CSS rule list <var>list</var> at location 3.1896 + <var>index</var> follow these steps:</p> 3.1897 3.1898 <ol> 3.1899 - <li><p>If <var title>index</var> is negative or greater than the 3.1900 - length of the <var title>list</var>, 3.1901 - <span data-anolis-spec=dom title=concept-throw>throw</span> an 3.1902 - "<code data-anolis-spec=dom>IndexSizeError</code>" exception and 3.1903 - terminate these steps. 3.1904 + <li><p>If <var>index</var> is negative or greater than the 3.1905 + length of the <var>list</var>, 3.1906 + <span title="concept-throw" data-anolis-spec="dom">throw</span> an 3.1907 + "<code data-anolis-spec="dom">IndexSizeError</code>" exception and 3.1908 + terminate these steps.</p></li> 3.1909 3.1910 <li><p><span title="Parse a CSS rule">Parse</span> 3.1911 - <var title>rule</var>.</p></li> 3.1912 + <var>rule</var>.</p></li> 3.1913 3.1914 <li><p>If parsing failed terminate these steps.</p></li> 3.1915 3.1916 <li><p>If the new object can not be inserted within the 3.1917 - <var title>list</var> at the given <var title>index</var> due to 3.1918 + <var>list</var> at the given <var>index</var> due to 3.1919 limitations of the CSS specification, 3.1920 - <span data-anolis-spec=dom title=concept-throw>throw</span> an 3.1921 - "<code data-anolis-spec=dom>HierarchyRequestError</code>" exception and 3.1922 - terminate these steps. 3.1923 - 3.1924 - <li><p>Insert the new object at the given <var title>index</var> 3.1925 - within the <var title>list</var>.</p></li> 3.1926 + <span title="concept-throw" data-anolis-spec="dom">throw</span> an 3.1927 + "<code data-anolis-spec="dom">HierarchyRequestError</code>" exception and 3.1928 + terminate these steps.</p></li> 3.1929 + 3.1930 + <li><p>Insert the new object at the given <var>index</var> 3.1931 + within the <var>list</var>.</p></li> 3.1932 </ol> 3.1933 3.1934 <p>To <dfn>remove a CSS rule</dfn> from CSS rule list 3.1935 - <var title>list</var> at location <var title>index</var> follow 3.1936 + <var>list</var> at location <var>index</var> follow 3.1937 these steps:</p> 3.1938 3.1939 <ol> 3.1940 - <li><p>If <var title>index</var> is negative or greater than the 3.1941 - length of the <var title>list</var> 3.1942 - <span data-anolis-spec=dom title=concept-throw>throw</span> an 3.1943 - "<code data-anolis-spec=dom>IndexSizeError</code>" exception and terminate these steps.</p></li> 3.1944 - 3.1945 - <li><p>Remove the object at <var title>index</var> from 3.1946 - <var title>list</var>.</p></li> 3.1947 + <li><p>If <var>index</var> is negative or greater than the 3.1948 + length of the <var>list</var> 3.1949 + <span title="concept-throw" data-anolis-spec="dom">throw</span> an 3.1950 + "<code data-anolis-spec="dom">IndexSizeError</code>" exception and terminate these steps.</p></li> 3.1951 + 3.1952 + <li><p>Remove the object at <var>index</var> from 3.1953 + <var>list</var>.</p></li> 3.1954 </ol> 3.1955 3.1956 3.1957 - <h4>The <code title>CSSRuleList</code> Sequence</h4> 3.1958 - 3.1959 - <p>The <code>CSSRuleList</code> object represents an ordered collection of 3.1960 - CSS rules.</p> 3.1961 - 3.1962 - <pre class="idl">typedef sequence<<span>CSSRule</span>> <dfn>CSSRuleList</dfn>;</pre> 3.1963 - 3.1964 - 3.1965 - <h4>The <code title>CSSRule</code> Interface</h4> 3.1966 - 3.1967 - <p>The <code>CSSRule</code> interface is a base interface. Each unique 3.1968 - CSS rule has its own interface which inherits from this one.</p> 3.1969 - 3.1970 - <pre class="idl">interface <dfn>CSSRule</dfn> { 3.1971 - // Types 3.1972 - const unsigned short <span title="dom-CSSRule-STYLE_RULE">STYLE_RULE</span> = 1; 3.1973 - const unsigned short <span title="dom-CSSRule-IMPORT_RULE">IMPORT_RULE</span> = 3; 3.1974 - const unsigned short <span title="dom-CSSRule-MEDIA_RULE">MEDIA_RULE</span> = 4; 3.1975 - const unsigned short <span title="dom-CSSRule-FONT_FACE_RULE">FONT_FACE_RULE</span> = 5; 3.1976 - const unsigned short <span title="dom-CSSRule-PAGE_RULE">PAGE_RULE</span> = 6; 3.1977 - const unsigned short <span title="dom-CSSRule-NAMESPACE_RULE">NAMESPACE_RULE</span> = 10; 3.1978 - readonly attribute unsigned short <span title="dom-CSSRule-type">type</span>; 3.1979 - 3.1980 - // Parsing and serialization 3.1981 - attribute DOMString <span title="dom-CSSRule-cssText">cssText</span>; 3.1982 - 3.1983 - // Context 3.1984 - readonly attribute <span>CSSRule</span> <span title="dom-CSSRule-parentRule">parentRule</span>; 3.1985 - readonly attribute <span>CSSStyleSheet</span> <span title="dom-CSSRule-parentStyleSheet">parentStyleSheet</span>; 3.1986 -};</pre> 3.1987 - 3.1988 - 3.1989 - <p>The 3.1990 - <dfn id="dom-cssrule-type" title="dom-CSSRule-type"><code>type</code></dfn> 3.1991 - attribute must return the <span>CSS rule</span> type, 3.1992 - as follows:</p> 3.1993 - 3.1994 - <dl class="switch"> 3.1995 - <dt><dfn id="dom-cssrule-style_rule" title="dom-CSSRule-STYLE_RULE"><code>STYLE_RULE</code></dfn> (numeric value 1)</dt> 3.1996 - <dd>The object is a <code>CSSStyleRule</code>.</dd> 3.1997 - <dt><dfn id="dom-cssrule-import_rule" title="dom-CSSRule-IMPORT_RULE"><code>IMPORT_RULE</code></dfn> (numeric value 3)</dt> 3.1998 - <dd>The object is a <code>CSSImportRule</code>.</dd> 3.1999 - <dt><dfn id="dom-cssrule-media_rule" title="dom-CSSRule-MEDIA_RULE"><code>MEDIA_RULE</code></dfn> (numeric value 4)</dt> 3.2000 - <dd>The object is a <code>CSSMediaRule</code>.</dd> 3.2001 - <dt><dfn id="dom-cssrule-font_face_rule" title="dom-CSSRule-FONT_FACE_RULE"><code>FONT_FACE_RULE</code></dfn> (numeric value 5)</dt> 3.2002 - <dd>The object is a <code>CSSFontFaceRule</code>.</dd> 3.2003 - <dt><dfn id="dom-cssrule-page_rule" title="dom-CSSRule-PAGE_RULE"><code>PAGE_RULE</code></dfn> (numeric value 6)</dt> 3.2004 - <dd>The object is a <code>CSSPageRule</code>.</dd> 3.2005 - <dt><dfn id="dom-cssrule-namespace_rule" title="dom-CSSRule-NAMESPACE_RULE"><code>NAMESPACE_RULE</code></dfn> (numeric value 10)</dt> 3.2006 - <dd>The object is a <code>CSSNamespaceRule</code>.</dd> 3.2007 - </dl> 3.2008 - 3.2009 - <p class="note">Constants with values 0 and 2 have been obsoleted by this 3.2010 - specification. They might be re-allocated in the future. 3.2011 - 3.2012 - <p class="note">Constants for new and proprietary features are coordinated 3.2013 - on the 3.2014 - <a href="http://wiki.csswg.org/spec/cssom-constants">CSSOM Constants</a> 3.2015 - wiki page. 3.2016 - 3.2017 - <p>The 3.2018 - <dfn id="dom-cssrule-csstext" title="dom-CSSRule-cssText"><code>cssText</code></dfn> 3.2019 - attribute, on getting, must return a 3.2020 - <span title="serialize a CSS rule">serialization</span> of the 3.2021 - <span>CSS rule</span>.</p> 3.2022 - 3.2023 - <p>On setting the <code title="dom-CSSRule-cssText">cssText</code> 3.2024 - attribute these steps must be run:</p> 3.2025 - 3.2026 - <ol> 3.2027 - <li><p><span title="Parse a CSS rule">Parse</span> the value.</p></li> 3.2028 - 3.2029 - <li><p>If parsing failed terminate this algorithm.</p></li> 3.2030 - 3.2031 - <li><p>If the <code title="dom-CSSRule-type">type</code> of the new 3.2032 - object does not match the <code title="dom-CSSRule-type">type</code> of 3.2033 - the current object 3.2034 - <span data-anolis-spec=dom title=concept-throw>throw</span> an 3.2035 - "<code data-anolis-spec=dom>InvalidModificationError</code>" exception. 3.2036 - 3.2037 - <li><p>Replace the current object with the new object.</p></li> 3.2038 - </ol> 3.2039 - 3.2040 - 3.2041 - <p>The 3.2042 - <dfn id="dom-cssrule-parentrule" title="dom-CSSRule-parentRule"><code>parentRule</code></dfn> 3.2043 - attribute must return the nearest enclosing rule of the 3.2044 - current rule or null, if there is no enclosing rule.</p> 3.2045 - 3.2046 - <p class="note">E.g. <code title>@media</code> can enclose a rule.</p> 3.2047 - 3.2048 - <p>The 3.2049 - <dfn id="dom-cssrule-parentstylesheet" title="dom-CSSRule-parentStyleSheet"><code>parentStyleSheet</code></dfn> 3.2050 - attribute must return the <code>CSSStyleSheet</code> 3.2051 - object that contains the the current rule.</p> 3.2052 - 3.2053 - 3.2054 - 3.2055 - <h4>CSS Style Rule (Rule Set)</h4> 3.2056 - 3.2057 - <p>The <code>CSSStyleRule</code> object represents a rule set.</p> 3.2058 - <!-- XXX ref --> 3.2059 - 3.2060 - <pre class="idl">interface <dfn>CSSStyleRule</dfn> : <span>CSSRule</span> { 3.2061 - attribute DOMString <span title="dom-CSSStyleRule-selectorText">selectorText</span>; 3.2062 - readonly attribute <span>CSSStyleDeclaration</span> <span title="dom-CSSStyleRule-style">style</span>; 3.2063 -};</pre> 3.2064 - 3.2065 - <p>The 3.2066 - <dfn id="dom-cssstylerule-selectortext" title="dom-CSSStyleRule-selectorText"><code>selectorText</code></dfn> 3.2067 - attribute, on getting, must return the result of 3.2068 - <span title="serialize a group of selectors">serializing</span> the 3.2069 - associated <span>group of selectors</span>.</p> 3.2070 - 3.2071 - <p>On setting the 3.2072 - <code title="dom-CSSStyleRule-selectorText">selectorText</code> attribute 3.2073 - these steps must be run:</p> 3.2074 - 3.2075 - <ol> 3.2076 - <li><p>Run the <span>parse a group of selectors</span> algorithm on the 3.2077 - given value.</p></li> 3.2078 - 3.2079 - <li><p>If the algorithm returns a non-null value replace the associated 3.2080 - <span>group of selectors</span> with the returned value.</p></li> 3.2081 - 3.2082 - <li><p>Otherwise, if the algorithm returns a null value, do 3.2083 - nothing.</p></li> 3.2084 - </ol> 3.2085 - 3.2086 - <p>The 3.2087 - <dfn id="dom-cssstylerule-style" title="dom-CSSStyleRule-style"><code>style</code></dfn> 3.2088 - attribute must return a 3.2089 - <code>CSSStyleDeclaration</code> object for the rule set.</p> 3.2090 - 3.2091 - 3.2092 - <h4>CSS <code title>@import</code> Rule</h4> 3.2093 - 3.2094 - <p>The <code>CSSImportRule</code> object represents an 3.2095 - <code>@import</code> rule.</p> 3.2096 - 3.2097 - <pre class="idl">interface <dfn>CSSImportRule</dfn> : <span>CSSRule</span> { 3.2098 - readonly attribute DOMString <span title="dom-CSSImportRule-href">href</span>; 3.2099 - [PutForwards=<span title="dom-MediaList-mediaText">mediaText</span>] readonly attribute <span>MediaList</span> <span title="dom-CSSImportRule-media">media</span>; 3.2100 - readonly attribute <span>CSSStyleSheet</span> <span title="dom-CSSImportRule-styleSheet">styleSheet</span>; 3.2101 -};</pre> 3.2102 - 3.2103 - <p>The 3.2104 - <dfn id="dom-cssimportrule-href" title="dom-CSSImportRule-href"><code>href</code></dfn> 3.2105 - attribute must return the <span>URL</span> specified 3.2106 - by the <code>@import</code> rule.</p> 3.2107 - 3.2108 - <p class="note">To get the resolved <span>URL</span> use the 3.2109 - <code title="dom-StyleSheet-href">href</code> attribute of the associated 3.2110 - <span>style sheet</span>.</p> 3.2111 - 3.2112 - <p>The 3.2113 - <dfn id="dom-cssimportrule-media" title="dom-CSSImportRule-media"><code>media</code></dfn> 3.2114 - attribute must return the value of the 3.2115 - <code title="dom-StyleSheet-media">media</code> attribute of the 3.2116 - associated <span>style sheet</span>.</p> 3.2117 - 3.2118 - <p>The 3.2119 - <dfn id="dom-cssimportrule-stylesheet" title="dom-CSSImportRule-stylesheet"><code>styleSheet</code></dfn> 3.2120 - attribute must return the associated 3.2121 - <span>style sheet</span>.</p> 3.2122 - 3.2123 - <p class="note">If loading of the style sheet fails its 3.2124 - <code title="dom-CSSStyleSheet-cssRules">cssRules</code> list is simply 3.2125 - empty. I.e. an <code>@import</code> rule always has an associated 3.2126 - <span>style sheet</span>.</p> 3.2127 - 3.2128 - 3.2129 - <h4>CSS <code title>@media</code> Rule</h4> 3.2130 - 3.2131 - <p>The <code>CSSMediaRule</code> object represents an 3.2132 - <code title>@media</code> rule.</p> 3.2133 - 3.2134 - <pre class="idl">interface <dfn>CSSMediaRule</dfn> : <span>CSSRule</span> { 3.2135 - [PutForwards=<span title="dom-MediaList-mediaText">mediaText</span>] readonly attribute <span>MediaList</span> <span title="dom-CSSMediaRule-media">media</span>; 3.2136 - readonly attribute <span>CSSRuleList</span> <span title="dom-CSSMediaRule-cssRules">cssRules</span>; 3.2137 - unsigned long <span title="dom-CSSMediaRule-insertRule">insertRule</span>(DOMString <var title>rule</var>, in unsigned long <var title>index</var>); 3.2138 - void <span title="dom-CSSMediaRule-deleteRule">deleteRule</span>(unsigned long <var title>index</var>); 3.2139 -};</pre> 3.2140 - 3.2141 - <p>The 3.2142 - <dfn id="dom-cssmediarule-media" title="dom-CSSMediaRule-media"><code>media</code></dfn> 3.2143 - attribute must return a 3.2144 - <code>MediaList</code> object for the list of media queries specified 3.2145 - with the <code title>@media</code> rule.</p> 3.2146 - 3.2147 - <p>The 3.2148 - <dfn id="dom-cssmediarule-cssrules" title="dom-CSSMediaRule-cssRules"><code>cssRules</code></dfn> 3.2149 - attribute must return a 3.2150 - <code>CSSRuleList</code> object for the list of CSS rules specified with the 3.2151 - <code title>@media</code> rule.</p> 3.2152 - 3.2153 - <p>The 3.2154 - <dfn id="dom-cssmediarule-insertrule" title="dom-CSSMediaRule-insertRule"><code>insertRule(<var title>rule</var>, 3.2155 - <var title>index</var>)</code></dfn> method must 3.2156 - <span>insert a CSS rule</span> <var title>rule</var> into the 3.2157 - CSS rule list returned by 3.2158 - <code title="dom-CSSMediaRule-cssRules">cssRules</code> at 3.2159 - <var title>index</var>.</p> 3.2160 - 3.2161 - <p>The 3.2162 - <dfn id="dom-cssmediarule-deleterule" title="dom-CSSMediaRule-deleteRule"><code>deleteRule(<var title>index</var>)</code></dfn> 3.2163 - method must <span>remove a CSS rule</span> from the 3.2164 - CSS rule list returned by 3.2165 - <code title="dom-CSSMediaRule-cssRules">cssRules</code> at 3.2166 - <var title>index</var>.</p> 3.2167 - 3.2168 - 3.2169 - <h4>CSS <code title>@font-face</code> Rule</h4> 3.2170 - 3.2171 - <p>The <code>CSSFontFaceRule</code> object represents an 3.2172 - <code>@font-face</code> rule.</p> 3.2173 - 3.2174 - <pre class="idl">interface <dfn>CSSFontFaceRule</dfn> : <span>CSSRule</span> { 3.2175 - readonly attribute <span>CSSStyleDeclaration</span> <span title="dom-CSSFontFaceRule-style">style</span>; 3.2176 -};</pre> 3.2177 - 3.2178 - <p>The 3.2179 - <dfn id="dom-cssfontfacerule-style" title="dom-CSSFontFaceRule-style"><code>style</code></dfn> 3.2180 - attribute must return a <code>CSSStyleDeclaration</code> 3.2181 - block that contains the property declarations specified within the 3.2182 - <code>@font-face</code> rule.</p> 3.2183 - 3.2184 - 3.2185 - <h4>CSS <code title>@page</code> Rule</h4> 3.2186 - 3.2187 - <p class="XXX">Need to define the rules for 3.2188 - <dfn id="parse-a-css-page-selector">parse a CSS page selector</dfn> and 3.2189 - <dfn id="serialize-a-css-page-selector">serialize a CSS page selector</dfn>.</p> 3.2190 - 3.2191 - <p>The <code>CSSPageRule</code> object represents an <code>@page</code> 3.2192 - rule.</p> 3.2193 - 3.2194 - <pre class="idl">interface <dfn>CSSPageRule</dfn> : <span>CSSRule</span> { 3.2195 - attribute DOMString <span title="dom-CSSPageRule-selectorText">selectorText</span>; 3.2196 - readonly attribute <span>CSSStyleDeclaration</span> <span title="dom-CSSPageRule-style">style</span>; 3.2197 -};</pre> 3.2198 - 3.2199 - <p>The 3.2200 - <dfn id="dom-csspagerule-selectortext" title="dom-CSSPageRule-selectorText"><code>selectorText</code></dfn> 3.2201 - attribute, on getting, must return the result of 3.2202 - <span title="serialize a CSS page selector">serializing</span> the 3.2203 - associated <span>CSS page selector</span>.</p> 3.2204 - 3.2205 - <p>On setting the 3.2206 - <code title="dom-CSSPageRule-selectorText">selectorText</code> attribute 3.2207 - these steps must be run:</p> 3.2208 - 3.2209 - <ol> 3.2210 - <li><p>Run the <span>parse a CSS page selector</span> algorithm on the 3.2211 - given value.</p></li> 3.2212 - 3.2213 - <li><p>If the algorithm returns a non-null value replace the associated 3.2214 - <span>CSS page selector</span> with the returned value.</p></li> 3.2215 - 3.2216 - <li><p>Otherwise, if the algorithm returns a null value, do 3.2217 - nothing.</p></li> 3.2218 - </ol> 3.2219 - 3.2220 - <p>The 3.2221 - <dfn id="dom-csspagerule-style" title="dom-CSSPageRule-style"><code>style</code></dfn> 3.2222 - attribute must return a 3.2223 - <code>CSSStyleDeclaration</code> for the <code>@page</code> rule.</p> 3.2224 - 3.2225 - 3.2226 - <h4>CSS <code title>@namespace</code> Rule</h4> 3.2227 - 3.2228 - <p>The <code>CSSNamespaceRule</code> object represents an 3.2229 - <code>@namespace</code> rule.</p> 3.2230 - 3.2231 - <pre class="idl">interface <dfn>CSSNamespaceRule</dfn> : <span>CSSRule</span> { 3.2232 - readonly attribute DOMString <span title="dom-CSSNamespaceRule-namespaceURI">namespaceURI</span>; 3.2233 - readonly attribute DOMString? <span title="dom-CSSNamespaceRule-prefix">prefix</span>; 3.2234 -};</pre> 3.2235 - 3.2236 - <p>The 3.2237 - <dfn id="dom-cssnamespacerule-namespaceuri" title="dom-CSSNamespaceRule-namespaceURI"><code>namespaceURI</code></dfn> 3.2238 - attribute must return the namespace of 3.2239 - the <code>@namespace</code> rule.</p> 3.2240 - 3.2241 - <p>The 3.2242 - <dfn id="dom-cssnamespacerule-prefix" title="dom-CSSNamespaceRule-prefix"><code>prefix</code></dfn> 3.2243 - attribute must return the prefix of the 3.2244 - <code>@namespace</code> rule or the empty string if there is no prefix.</p> 3.2245 - 3.2246 + <!-- ........................................................................................................................ --> 3.2247 + 3.2248 + <h4>The <code>CSSRuleList</code> Sequence</h4> 3.2249 + 3.2250 + <p>The <code>CSSRuleList</code> sequence represents an ordered collection of CSS style rules.</p> 3.2251 +<pre class="idl">[[TBD - TYPEDEF]] 3.2252 +</pre> 3.2253 + 3.2254 + 3.2255 + <!-- ........................................................................................................................ --> 3.2256 + 3.2257 + <h4>The <code>CSSRule</code> Interface</h4> 3.2258 + 3.2259 + <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> 3.2260 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSRule">interface <span class="idlInterfaceID">CSSRule</span> { 3.2261 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>unsigned short</a></span> <span class="idlAttrName"><a href="#widl-CSSRule-type">type</a></span>;</span> 3.2262 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSRule-cssText">cssText</a></span>;</span> 3.2263 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRule</a></span> <span class="idlAttrName"><a href="#widl-CSSRule-parentRule">parentRule</a></span>;</span> 3.2264 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleSheet</a></span> <span class="idlAttrName"><a href="#widl-CSSRule-parentStyleSheet">parentStyleSheet</a></span>;</span> 3.2265 +};</span></pre> 3.2266 +<dl class="attributes"> 3.2267 +<dt class="attribute"> 3.2268 +<code>type</code> of type <span class="idlAttrType"><a>unsigned short</a></span>, readonly</dt> 3.2269 +<dd> 3.2270 +<p>The <code>type</code> attribute must return the <span>CSS rule</span> type, as follows:</p> <dl class='switch'> <dt><code>STYLE_RULE</code></dt> <dd>The object is a <code>CSSStyleRule</code>.</dd> <dt><code>IMPORT_RULE</code></dt> <dd>The object is a <code>CSSImportRule</code>.</dd> <dt><code>MEDIA_RULE</code></dt> <dd>The object is a <code>CSSMediaRule</code>.</dd> <dt><code>FONT_FACE_RULE</code></dt> <dd>The object is a <code>CSSFontFaceRule</code>.</dd> <dt><code>PAGE_RULE</code></dt> <dd>The object is a <code>CSSPageRule</code>.</dd> <dt><code>NAMESPACE_RULE</code></dt> <dd>The object is a <code>CSSNamespaceRule</code>.</dd> </dl> <p class='note'>Constants with values 0 and 2 have been obsoleted by this specification. They might be re-allocated in the future. <p class='note'>Constants for new and proprietary features are coordinated on the <a href='http://wiki.csswg.org/spec/cssom-constants'>CSSOM Constants</a> wiki page.</p></dd> 3.2271 +<dt class="attribute"> 3.2272 +<code>cssText</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 3.2273 +<dd> 3.2274 +<p>The <code>cssText</code> attribute must return a <span title='serialize a CSS rule'>serialization</span> of the <span>CSS rule</span>.</p> <p>On setting the <code>cssText</code> attribute these steps must be run:</p> <ol> <li><p><span title='Parse a CSS rule'>Parse</span> the value.</p></li> <li><p>If parsing failed terminate this algorithm.</p></li> <li><p>If the <code title='dom-CSSRule-type'>type</code> of the new object does not match the <code title='dom-CSSRule-type'>type</code> of the current object <span data-anolis-spec=dom title=concept-throw>throw</span> an '<code data-anolis-spec=dom>InvalidModificationError</code>' exception.</li> <li><p>Replace the current object with the new object.</p></li> </ol></dd> 3.2275 +<dt class="attribute"> 3.2276 +<code>parentRule</code> of type <span class="idlAttrType"><a>CSSRule</a></span>, readonly</dt> 3.2277 +<dd> 3.2278 +<p>The <code>parentRule</code> attribute must return the nearest enclosing rule of the current rule or null, if there is no enclosing rule.</p> <p class='note'>For example, <code>@media</code> can enclose a rule.</p></dd> 3.2279 +<dt class="attribute"> 3.2280 +<code>parentStyleSheet</code> of type <span class="idlAttrType"><a>CSSStyleSheet</a></span>, readonly</dt> 3.2281 +<dd> 3.2282 +<p>The <code>parentStyleSheet</code> attribute must return the <code>CSSStyleSheet</code> object that contains the the current rule.</p></dd> 3.2283 +</dl> 3.2284 + 3.2285 + 3.2286 + <!-- ........................................................................................................................ --> 3.2287 + 3.2288 + <h4>The <code>CSSStyleRule</code> Interface</h4> 3.2289 + 3.2290 + <p>The <code>CSSStyleRule</code> interface represents a rule set.</p> 3.2291 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSStyleRule">interface <span class="idlInterfaceID">CSSStyleRule</span> { 3.2292 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleRule-selectorText">selectorText</a></span>;</span> 3.2293 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleDeclaration</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleRule-style">style</a></span>;</span> 3.2294 +};</span></pre> 3.2295 +<dl class="attributes"> 3.2296 +<dt class="attribute"> 3.2297 +<code>selectorText</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 3.2298 +<dd> 3.2299 +<p>The <code>selectorText</code> attribute, on getting, must return the result of <span title='serialize a group of selectors'>serializing</span> the associated <span>group of selectors</span>.</p> <p>On setting the <code>selectorText</code> attribute these steps must be run:</p> <ol> <li><p>Run the <span>parse a group of selectors</span> algorithm on the given value.</p></li> <li><p>If the algorithm returns a non-null value replace the associated <span>group of selectors</span> with the returned value.</p></li> <li><p>Otherwise, if the algorithm returns a null value, do nothing.</p></li> </ol></dd> 3.2300 +<dt class="attribute"> 3.2301 +<code>style</code> of type <span class="idlAttrType"><a>CSSStyleDeclaration</a></span>, readonly</dt> 3.2302 +<dd> 3.2303 +<p>The <code>style</code> attribute must return a <code>CSSStyleDeclaration</code> object for the rule set.</p></dd> 3.2304 +</dl> 3.2305 + 3.2306 + 3.2307 + <!-- ........................................................................................................................ --> 3.2308 + 3.2309 + <h4>The <code>CSSImportRule</code> Interface</h4> 3.2310 + 3.2311 + <p>The <code>CSSImportRule</code> interface represents an <code>@import</code> rule.</p> 3.2312 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSImportRule">interface <span class="idlInterfaceID">CSSImportRule</span> { 3.2313 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSImportRule-href">href</a></span>;</span> 3.2314 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>MediaList</a></span> <span class="idlAttrName"><a href="#widl-CSSImportRule-media">media</a></span>;</span> 3.2315 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleSheet</a></span> <span class="idlAttrName"><a href="#widl-CSSImportRule-styleSheet">styleSheet</a></span>;</span> 3.2316 +};</span></pre> 3.2317 +<dl class="attributes"> 3.2318 +<dt class="attribute"> 3.2319 +<code>href</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 3.2320 +<dd> 3.2321 +<p>The <code>href</code> attribute must return the <span>URL</span> specified by the <code>@import</code> rule.</p> <p class='note'>To get the resolved <span>URL</span> use the <code title='dom-StyleSheet-href'>href</code> attribute of the associated <span>style sheet</span>.</p></dd> 3.2322 +<dt class="attribute"> 3.2323 +<code>media</code> of type <span class="idlAttrType"><a>MediaList</a></span>, readonly</dt> 3.2324 +<dd> 3.2325 +<p>The <code>media</code> attribute must return the value of the <code title='dom-StyleSheet-media'>media</code> attribute of the associated <span>style sheet</span>.</p></dd> 3.2326 +<dt class="attribute"> 3.2327 +<code>styleSheet</code> of type <span class="idlAttrType"><a>CSSStyleSheet</a></span>, readonly</dt> 3.2328 +<dd> 3.2329 +<p>The <code>styleSheet</code> attribute must return the associated <span>style sheet</span>.</p> <p class='note'>If loading of the style sheet fails its <code title='dom-CSSStyleSheet-cssRules'>cssRules</code> list is simply empty, i.e., an <code>@import</code> rule always has an associated <span>style sheet</span>.</p></dd> 3.2330 +</dl> 3.2331 + 3.2332 + 3.2333 + <!-- ........................................................................................................................ --> 3.2334 + 3.2335 + <h4>The <code>CSSMediaRule</code> Interface</h4> 3.2336 + 3.2337 + <p>The <code>CSSMediaRule</code> interface represents a <code>@media</code> rule.</p> 3.2338 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSMediaRule">interface <span class="idlInterfaceID">CSSMediaRule</span> { 3.2339 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>MediaList</a></span> <span class="idlAttrName"><a href="#widl-CSSMediaRule-media">media</a></span>;</span> 3.2340 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRuleList</a></span> <span class="idlAttrName"><a href="#widl-CSSMediaRule-cssRules">cssRules</a></span>;</span> 3.2341 +<span class="idlMethod"> <span class="idlMethType"><a>unsigned long</a></span> <span class="idlMethName"><a href="#widl-CSSMediaRule-insertRule-unsigned-long-DOMString-rule-unsigned-long-index">insertRule</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">rule</span></span>, <span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 3.2342 +<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-CSSMediaRule-deleteRule-void-unsigned-long-index">deleteRule</a></span> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 3.2343 +};</span></pre> 3.2344 +<dl class="attributes"> 3.2345 +<dt class="attribute"> 3.2346 +<code>media</code> of type <span class="idlAttrType"><a>MediaList</a></span>, readonly</dt> 3.2347 +<dd> 3.2348 +<p>The <code>media</code> attribute must return a <code>MediaList</code> object for the list of media queries specified with the <code>@media</code> rule.</p></dd> 3.2349 +<dt class="attribute"> 3.2350 +<code>cssRules</code> of type <span class="idlAttrType"><a>CSSRuleList</a></span>, readonly</dt> 3.2351 +<dd> 3.2352 +<p>The <code>cssRules</code> attribute must return a <code>CSSRuleList</code> object for the list of CSS rules specified with the <code>@media</code> rule.</p></dd> 3.2353 +</dl> 3.2354 +<dl class="methods"> 3.2355 +<dt class="method"> 3.2356 +<code>insertRule</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>, <span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>unsigned long</a></span></dt> 3.2357 +<dd> 3.2358 +<p>The <code>insertRule</code> operation must <span>insert a CSS rule</span> <var>rule</var> into the CSS rule list returned by <code title='dom-CSSMediaRule-cssRules'>cssRules</code> at <var>index</var>.</p></dd> 3.2359 +<dt class="method"> 3.2360 +<code>deleteRule</code> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 3.2361 +<dd> 3.2362 +<p>The <code>deleteRule</code> operation must <span>remove a CSS rule</span> from the CSS rule list returned by <code title='dom-CSSMediaRule-cssRules'>cssRules</code> at <var>index</var>.</p></dd> 3.2363 +</dl> 3.2364 + 3.2365 + 3.2366 + <!-- ........................................................................................................................ --> 3.2367 + 3.2368 + <h4>The <code>CSSFontFaceRule</code> Interface</h4> 3.2369 + 3.2370 + <p>The <code>CSSFontFaceRule</code> interface represents a <code>@font-face</code> rule.</p> 3.2371 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSFontFaceRule">interface <span class="idlInterfaceID">CSSFontFaceRule</span> { 3.2372 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleDeclaration</a></span> <span class="idlAttrName"><a href="#widl-CSSFontFaceRule-style">style</a></span>;</span> 3.2373 +};</span></pre> 3.2374 +<dl class="attributes"> 3.2375 +<dt class="attribute"> 3.2376 +<code>style</code> of type <span class="idlAttrType"><a>CSSStyleDeclaration</a></span>, readonly</dt> 3.2377 +<dd> 3.2378 +<p>The <code>style</code> attribute must return a <code>CSSStyleDeclaration</code> block that contains the property declarations specified within the <code>@font-face</code> rule.</p></dd> 3.2379 +</dl> 3.2380 + 3.2381 + 3.2382 + <!-- ........................................................................................................................ --> 3.2383 + 3.2384 + <h4>The <code>CSSPageRule</code> Interface</h4> 3.2385 + 3.2386 + <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> 3.2387 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSPageRule">interface <span class="idlInterfaceID">CSSPageRule</span> { 3.2388 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSPageRule-selectorText">selectorText</a></span>;</span> 3.2389 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleDeclaration</a></span> <span class="idlAttrName"><a href="#widl-CSSPageRule-style">style</a></span>;</span> 3.2390 +};</span></pre> 3.2391 +<dl class="attributes"> 3.2392 +<dt class="attribute"> 3.2393 +<code>selectorText</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 3.2394 +<dd> 3.2395 +<p>The <code>selectorText</code> attribute, on getting, must return the result of <span title='serialize a CSS page selector'>serializing</span> the associated <span>CSS page selector</span>.</p> <p>On setting the <code>selectorText</code> attribute these steps must be run:</p> <ol> <li><p>Run the <span>parse a CSS page selector</span> algorithm on the given value.</p></li> <li><p>If the algorithm returns a non-null value replace the associated <span>CSS page selector</span> with the returned value.</p></li> <li><p>Otherwise, if the algorithm returns a null value, do nothing.</p></li> </ol></dd> 3.2396 +<dt class="attribute"> 3.2397 +<code>style</code> of type <span class="idlAttrType"><a>CSSStyleDeclaration</a></span>, readonly</dt> 3.2398 +<dd> 3.2399 +<p>The <code>style</code> attribute must return a <code>CSSStyleDeclaration</code> for the <code>@page</code> rule.</p></dd> 3.2400 +</dl> 3.2401 + 3.2402 + 3.2403 + <!-- ........................................................................................................................ --> 3.2404 + 3.2405 + <h4>The <code>CSSNamespaceRule</code> Interface</h4> 3.2406 + 3.2407 + <p>The <code>CSSNamespaceRule</code> interface represents a <code>@namespace</code> rule.</p> 3.2408 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSNamespaceRule">interface <span class="idlInterfaceID">CSSNamespaceRule</span> { 3.2409 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSNamespaceRule-namespaceURI">namespaceURI</a></span>;</span> 3.2410 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-CSSNamespaceRule-prefix">prefix</a></span>;</span> 3.2411 +};</span></pre> 3.2412 +<dl class="attributes"> 3.2413 +<dt class="attribute"> 3.2414 +<code>namespaceURI</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 3.2415 +<dd> 3.2416 +<p>The <code>namespaceURI</code> attribute must return the namespace of the <code>@namespace</code> rule.</p></dd> 3.2417 +<dt class="attribute"> 3.2418 +<code>prefix</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt> 3.2419 +<dd> 3.2420 +<p>The <code>prefix</code> attribute must return the prefix of the <code>@namespace</code> rule or the empty string if there is no prefix.</p></dd> 3.2421 +</dl> 3.2422 + 3.2423 + 3.2424 + <!-- ........................................................................................................................ --> 3.2425 + <!-- ........................................................................................................................ --> 3.2426 3.2427 <h3>CSS Declaration Blocks</h3> 3.2428 3.2429 @@ -2001,145 +1750,60 @@ 3.2430 3.2431 3.2432 3.2433 - <h4>The <code title>CSSStyleDeclaration</code> Interface</h4> 3.2434 - 3.2435 + <!-- ........................................................................................................................ --> 3.2436 + 3.2437 + <h4>The <code>CSSStyleDeclaration</code> Interface</h4> 3.2438 + 3.2439 + 3.2440 +<pre class="idl"><span class="idlInterface" id="widl-def-CSSStyleDeclaration">interface <span class="idlInterfaceID">CSSStyleDeclaration</span> { 3.2441 +<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleDeclaration-cssText">cssText</a></span>;</span> 3.2442 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>unsigned long</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleDeclaration-length">length</a></span>;</span> 3.2443 +<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-item-DOMString-unsigned-long-index">item</a></span> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span> 3.2444 +<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-getPropertyValue-DOMString-DOMString-property">getPropertyValue</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>);</span> 3.2445 +<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-getPropertyPriority-DOMString-DOMString-property">getPropertyPriority</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>);</span> 3.2446 +<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-setProperty-void-DOMString-property-DOMString-value-DOMString-priority">setProperty</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">value</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">priority</span></span>);</span> 3.2447 +<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-removeProperty-DOMString-DOMString-property">removeProperty</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>);</span> 3.2448 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRule</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleDeclaration-parentRule">parentRule</a></span>;</span> 3.2449 +};</span></pre> 3.2450 +<dl class="attributes"> 3.2451 +<dt class="attribute"> 3.2452 +<code>cssText</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt> 3.2453 +<dt class="attribute"> 3.2454 +<code>length</code> of type <span class="idlAttrType"><a>unsigned long</a></span>, readonly</dt> 3.2455 +<dt class="attribute"> 3.2456 +<code>parentRule</code> of type <span class="idlAttrType"><a>CSSRule</a></span>, readonly</dt> 3.2457 +</dl> 3.2458 +<dl class="methods"> 3.2459 +<dt class="method"> 3.2460 +<code>item</code> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span></span>), returns <span class="idlMethType"><a>DOMString</a></span></dt> 3.2461 +<dt class="method"> 3.2462 +<code>getPropertyValue</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>DOMString</a></span></dt> 3.2463 +<dt class="method"> 3.2464 +<code>getPropertyPriority</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>DOMString</a></span></dt> 3.2465 +<dt class="method"> 3.2466 +<code>setProperty</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>, <span class="idlParam">optional <span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>void</a></span></dt> 3.2467 +<dt class="method"> 3.2468 +<code>removeProperty</code> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>DOMString</a></span></dt> 3.2469 +</dl> 3.2470 + 3.2471 + 3.2472 + <!-- 3.2473 <pre class="idl">interface <dfn>CSSStyleDeclaration</dfn> { 3.2474 attribute DOMString <span title="dom-CSSStyleDeclaration-cssText">cssText</span>; 3.2475 3.2476 readonly attribute unsigned long <span title="dom-CSSStyleDeclaration-length">length</span>; 3.2477 - DOMString <span title="dom-CSSStyleDeclaration-item">item</span>(unsigned long <var title>index</var>); 3.2478 - 3.2479 - DOMString <span title="dom-CSSStyleDeclaration-getPropertyValue">getPropertyValue</span>(DOMString <var title>property</var>); 3.2480 - DOMString <span title="dom-CSSStyleDeclaration-getPropertyPriority">getPropertyPriority</span>(DOMString <var title>property</var>); 3.2481 - void <span title="dom-CSSStyleDeclaration-setProperty">setProperty</span>(DOMString <var title>property</var>, DOMString <var title>value</var>, optional DOMString <var title>priority</var>); 3.2482 - DOMString <span title="dom-CSSStyleDeclaration-removeProperty">removeProperty</span>(DOMString <var title>property</var>); 3.2483 + DOMString <span title="dom-CSSStyleDeclaration-item">item</span>(unsigned long <var>index</var>); 3.2484 + 3.2485 + DOMString <span title="dom-CSSStyleDeclaration-getPropertyValue">getPropertyValue</span>(DOMString <var>property</var>); 3.2486 + DOMString <span title="dom-CSSStyleDeclaration-getPropertyPriority">getPropertyPriority</span>(DOMString <var>property</var>); 3.2487 + void <span title="dom-CSSStyleDeclaration-setProperty">setProperty</span>(DOMString <var>property</var>, DOMString <var>value</var>, optional DOMString <var>priority</var>); 3.2488 + DOMString <span title="dom-CSSStyleDeclaration-removeProperty">removeProperty</span>(DOMString <var>property</var>); 3.2489 3.2490 readonly attribute <span>CSSRule</span> <span title="dom-CSSStyleDeclaration-parentRule">parentRule</span>; 3.2491 3.2492 // CSS Properties 3.2493 - attribute DOMString <span title="dom-CSSStyleDeclaration-azimuth">azimuth</span>; 3.2494 - attribute DOMString <span title="dom-CSSStyleDeclaration-background">background</span>; 3.2495 - attribute DOMString <span title="dom-CSSStyleDeclaration-backgroundAttachment">backgroundAttachment</span>; 3.2496 - attribute DOMString <span title="dom-CSSStyleDeclaration-backgroundColor">backgroundColor</span>; 3.2497 - attribute DOMString <span title="dom-CSSStyleDeclaration-backgroundImage">backgroundImage</span>; 3.2498 - attribute DOMString <span title="dom-CSSStyleDeclaration-backgroundPosition">backgroundPosition</span>; 3.2499 - attribute DOMString <span title="dom-CSSStyleDeclaration-backgroundRepeat">backgroundRepeat</span>; 3.2500 - attribute DOMString <span title="dom-CSSStyleDeclaration-border">border</span>; 3.2501 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderCollapse">borderCollapse</span>; 3.2502 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderColor">borderColor</span>; 3.2503 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderSpacing">borderSpacing</span>; 3.2504 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderStyle">borderStyle</span>; 3.2505 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderTop">borderTop</span>; 3.2506 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderRight">borderRight</span>; 3.2507 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderBottom">borderBottom</span>; 3.2508 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderLeft">borderLeft</span>; 3.2509 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderTopColor">borderTopColor</span>; 3.2510 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderRightColor">borderRightColor</span>; 3.2511 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderBottomColor">borderBottomColor</span>; 3.2512 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderLeftColor">borderLeftColor</span>; 3.2513 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderTopStyle">borderTopStyle</span>; 3.2514 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderRightStyle">borderRightStyle</span>; 3.2515 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderBottomStyle">borderBottomStyle</span>; 3.2516 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderLeftStyle">borderLeftStyle</span>; 3.2517 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderTopWidth">borderTopWidth</span>; 3.2518 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderRightWidth">borderRightWidth</span>; 3.2519 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderBottomWidth">borderBottomWidth</span>; 3.2520 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderLeftWidth">borderLeftWidth</span>; 3.2521 - attribute DOMString <span title="dom-CSSStyleDeclaration-borderWidth">borderWidth</span>; 3.2522 - attribute DOMString <span title="dom-CSSStyleDeclaration-bottom">bottom</span>; 3.2523 - attribute DOMString <span title="dom-CSSStyleDeclaration-captionSide">captionSide</span>; 3.2524 - attribute DOMString <span title="dom-CSSStyleDeclaration-clear">clear</span>; 3.2525 - attribute DOMString <span title="dom-CSSStyleDeclaration-clip">clip</span>; 3.2526 - attribute DOMString <span title="dom-CSSStyleDeclaration-color">color</span>; 3.2527 - attribute DOMString <span title="dom-CSSStyleDeclaration-content">content</span>; 3.2528 - attribute DOMString <span title="dom-CSSStyleDeclaration-counterIncrement">counterIncrement</span>; 3.2529 - attribute DOMString <span title="dom-CSSStyleDeclaration-counterReset">counterReset</span>; 3.2530 - attribute DOMString <span title="dom-CSSStyleDeclaration-cue">cue</span>; 3.2531 - attribute DOMString <span title="dom-CSSStyleDeclaration-cueAfter">cueAfter</span>; 3.2532 - attribute DOMString <span title="dom-CSSStyleDeclaration-cueBefore">cueBefore</span>; 3.2533 - attribute DOMString <span title="dom-CSSStyleDeclaration-cursor">cursor</span>; 3.2534 - attribute DOMString <span title="dom-CSSStyleDeclaration-direction">direction</span>; 3.2535 - attribute DOMString <span title="dom-CSSStyleDeclaration-display">display</span>; 3.2536 - attribute DOMString <span title="dom-CSSStyleDeclaration-elevation">elevation</span>; 3.2537 - attribute DOMString <span title="dom-CSSStyleDeclaration-emptyCells">emptyCells</span>; 3.2538 - attribute DOMString <span title="dom-CSSStyleDeclaration-cssFloat">cssFloat</span>; 3.2539 - attribute DOMString <span title="dom-CSSStyleDeclaration-font">font</span>; 3.2540 - attribute DOMString <span title="dom-CSSStyleDeclaration-fontFamily">fontFamily</span>; 3.2541 - attribute DOMString <span title="dom-CSSStyleDeclaration-fontSize">fontSize</span>; 3.2542 - attribute DOMString <span title="dom-CSSStyleDeclaration-fontSizeAdjust">fontSizeAdjust</span>; 3.2543 - attribute DOMString <span title="dom-CSSStyleDeclaration-fontStretch">fontStretch</span>; 3.2544 - attribute DOMString <span title="dom-CSSStyleDeclaration-fontStyle">fontStyle</span>; 3.2545 - attribute DOMString <span title="dom-CSSStyleDeclaration-fontVariant">fontVariant</span>; 3.2546 - attribute DOMString <span title="dom-CSSStyleDeclaration-fontWeight">fontWeight</span>; 3.2547 - attribute DOMString <span title="dom-CSSStyleDeclaration-height">height</span>; 3.2548 - attribute DOMString <span title="dom-CSSStyleDeclaration-left">left</span>; 3.2549 - attribute DOMString <span title="dom-CSSStyleDeclaration-letterSpacing">letterSpacing</span>; 3.2550 - attribute DOMString <span title="dom-CSSStyleDeclaration-lineHeight">lineHeight</span>; 3.2551 - attribute DOMString <span title="dom-CSSStyleDeclaration-listStyle">listStyle</span>; 3.2552 - attribute DOMString <span title="dom-CSSStyleDeclaration-listStyleImage">listStyleImage</span>; 3.2553 - attribute DOMString <span title="dom-CSSStyleDeclaration-listStylePosition">listStylePosition</span>; 3.2554 - attribute DOMString <span title="dom-CSSStyleDeclaration-listStyleType">listStyleType</span>; 3.2555 - attribute DOMString <span title="dom-CSSStyleDeclaration-margin">margin</span>; 3.2556 - attribute DOMString <span title="dom-CSSStyleDeclaration-marginTop">marginTop</span>; 3.2557 - attribute DOMString <span title="dom-CSSStyleDeclaration-marginRight">marginRight</span>; 3.2558 - attribute DOMString <span title="dom-CSSStyleDeclaration-marginBottom">marginBottom</span>; 3.2559 - attribute DOMString <span title="dom-CSSStyleDeclaration-marginLeft">marginLeft</span>; 3.2560 - attribute DOMString <span title="dom-CSSStyleDeclaration-markerOffset">markerOffset</span>; 3.2561 - attribute DOMString <span title="dom-CSSStyleDeclaration-marks">marks</span>; 3.2562 - attribute DOMString <span title="dom-CSSStyleDeclaration-maxHeight">maxHeight</span>; 3.2563 - attribute DOMString <span title="dom-CSSStyleDeclaration-maxWidth">maxWidth</span>; 3.2564 - attribute DOMString <span title="dom-CSSStyleDeclaration-minHeight">minHeight</span>; 3.2565 - attribute DOMString <span title="dom-CSSStyleDeclaration-minWidth">minWidth</span>; 3.2566 - attribute DOMString <span title="dom-CSSStyleDeclaration-orphans">orphans</span>; 3.2567 - attribute DOMString <span title="dom-CSSStyleDeclaration-outline">outline</span>; 3.2568 - attribute DOMString <span title="dom-CSSStyleDeclaration-outlineColor">outlineColor</span>; 3.2569 - attribute DOMString <span title="dom-CSSStyleDeclaration-outlineStyle">outlineStyle</span>; 3.2570 - attribute DOMString <span title="dom-CSSStyleDeclaration-outlineWidth">outlineWidth</span>; 3.2571 - attribute DOMString <span title="dom-CSSStyleDeclaration-overflow">overflow</span>; 3.2572 - attribute DOMString <span title="dom-CSSStyleDeclaration-padding">padding</span>; 3.2573 - attribute DOMString <span title="dom-CSSStyleDeclaration-paddingTop">paddingTop</span>; 3.2574 - attribute DOMString <span title="dom-CSSStyleDeclaration-paddingRight">paddingRight</span>; 3.2575 - attribute DOMString <span title="dom-CSSStyleDeclaration-paddingBottom">paddingBottom</span>; 3.2576 - attribute DOMString <span title="dom-CSSStyleDeclaration-paddingLeft">paddingLeft</span>; 3.2577 - attribute DOMString <span title="dom-CSSStyleDeclaration-page">page</span>; 3.2578 - attribute DOMString <span title="dom-CSSStyleDeclaration-pageBreakAfter">pageBreakAfter</span>; 3.2579 - attribute DOMString <span title="dom-CSSStyleDeclaration-pageBreakBefore">pageBreakBefore</span>; 3.2580 - attribute DOMString <span title="dom-CSSStyleDeclaration-pageBreakInside">pageBreakInside</span>; 3.2581 - attribute DOMString <span title="dom-CSSStyleDeclaration-pause">pause</span>; 3.2582 - attribute DOMString <span title="dom-CSSStyleDeclaration-pauseAfter">pauseAfter</span>; 3.2583 - attribute DOMString <span title="dom-CSSStyleDeclaration-pauseBefore">pauseBefore</span>; 3.2584 - attribute DOMString <span title="dom-CSSStyleDeclaration-pitch">pitch</span>; 3.2585 - attribute DOMString <span title="dom-CSSStyleDeclaration-pitchRange">pitchRange</span>; 3.2586 - attribute DOMString <span title="dom-CSSStyleDeclaration-playDuring">playDuring</span>; 3.2587 - attribute DOMString <span title="dom-CSSStyleDeclaration-position">position</span>; 3.2588 - attribute DOMString <span title="dom-CSSStyleDeclaration-quotes">quotes</span>; 3.2589 - attribute DOMString <span title="dom-CSSStyleDeclaration-richness">richness</span>; 3.2590 - attribute DOMString <span title="dom-CSSStyleDeclaration-right">right</span>; 3.2591 - attribute DOMString <span title="dom-CSSStyleDeclaration-size">size</span>; 3.2592 - attribute DOMString <span title="dom-CSSStyleDeclaration-speak">speak</span>; 3.2593 - attribute DOMString <span title="dom-CSSStyleDeclaration-speakHeader">speakHeader</span>; 3.2594 - attribute DOMString <span title="dom-CSSStyleDeclaration-speakNumeral">speakNumeral</span>; 3.2595 - attribute DOMString <span title="dom-CSSStyleDeclaration-speakPunctuation">speakPunctuation</span>; 3.2596 - attribute DOMString <span title="dom-CSSStyleDeclaration-speechRate">speechRate</span>; 3.2597 - attribute DOMString <span title="dom-CSSStyleDeclaration-stress">stress</span>; 3.2598 - attribute DOMString <span title="dom-CSSStyleDeclaration-tableLayout">tableLayout</span>; 3.2599 - attribute DOMString <span title="dom-CSSStyleDeclaration-textAlign">textAlign</span>; 3.2600 - attribute DOMString <span title="dom-CSSStyleDeclaration-textDecoration">textDecoration</span>; 3.2601 - attribute DOMString <span title="dom-CSSStyleDeclaration-textIndent">textIndent</span>; 3.2602 - attribute DOMString <span title="dom-CSSStyleDeclaration-textShadow">textShadow</span>; 3.2603 - attribute DOMString <span title="dom-CSSStyleDeclaration-textTransform">textTransform</span>; 3.2604 - attribute DOMString <span title="dom-CSSStyleDeclaration-top">top</span>; 3.2605 - attribute DOMString <span title="dom-CSSStyleDeclaration-unicodeBidi">unicodeBidi</span>; 3.2606 - attribute DOMString <span title="dom-CSSStyleDeclaration-verticalAlign">verticalAlign</span>; 3.2607 - attribute DOMString <span title="dom-CSSStyleDeclaration-visibility">visibility</span>; 3.2608 - attribute DOMString <span title="dom-CSSStyleDeclaration-voiceFamily">voiceFamily</span>; 3.2609 - attribute DOMString <span title="dom-CSSStyleDeclaration-volume">volume</span>; 3.2610 - attribute DOMString <span title="dom-CSSStyleDeclaration-whiteSpace">whiteSpace</span>; 3.2611 - attribute DOMString <span title="dom-CSSStyleDeclaration-widows">widows</span>; 3.2612 - attribute DOMString <span title="dom-CSSStyleDeclaration-width">width</span>; 3.2613 - attribute DOMString <span title="dom-CSSStyleDeclaration-wordSpacing">wordSpacing</span>; 3.2614 - attribute DOMString <span title="dom-CSSStyleDeclaration-zIndex">zIndex</span>; 3.2615 };</pre> 3.2616 + --> 3.2617 3.2618 <p>The 3.2619 <dfn title="dom-CSSStyleDeclaration-cssText"><code>cssText</code></dfn> 3.2620 @@ -2147,15 +1811,15 @@ 3.2621 <span title="serialize a CSS declaration block">serializing</span> the 3.2622 <span>CSS declaration block declarations</span>.</p> 3.2623 3.2624 - <p>Setting the <code title>cssText</code> attribute must run these steps: 3.2625 - 3.2626 - <ol> 3.2627 + <p>Setting the <code>cssText</code> attribute must run these steps: 3.2628 + 3.2629 + </p><ol> 3.2630 <li><p>If the <span>CSS declaration block readonly flag</span> is set, 3.2631 - <span data-anolis-spec=dom title=concept-throw>throw</span> a 3.2632 - "<code data-anolis-spec=dom>NoModificationAllowedError</code>" exception 3.2633 - and terminate these steps. 3.2634 - 3.2635 - <li><p>Empty the <span>CSS declaration block declarations</span>. 3.2636 + <span title="concept-throw" data-anolis-spec="dom">throw</span> a 3.2637 + "<code data-anolis-spec="dom">NoModificationAllowedError</code>" exception 3.2638 + and terminate these steps.</p></li> 3.2639 + 3.2640 + <li><p>Empty the <span>CSS declaration block declarations</span>.</p></li> 3.2641 3.2642 <li><p><span title="Parse a CSS declaration block">Parse</span> the given 3.2643 value and, if the return value is not null, insert it into the 3.2644 @@ -2170,7 +1834,7 @@ 3.2645 the <span>collection of CSS declarations</span>.</p> 3.2646 3.2647 <p>The 3.2648 - <dfn title="dom-CSSStyleDeclaration-item"><code>item(<var title>index</var>)</code></dfn> 3.2649 + <dfn title="dom-CSSStyleDeclaration-item"><code>item(<var>index</var>)</code></dfn> 3.2650 method must <span class="XXX">...</span>.</p> 3.2651 <!-- returns the name of property at position index. --> 3.2652 3.2653 @@ -2179,74 +1843,74 @@ 3.2654 <dfn title="dom-CSSStyleDeclaration-getPropertyValue"><code>getPropertyValue(<var>property</var>)</code></dfn> 3.2655 method must <span class="XXX">...</span>.</p> 3.2656 <!-- Once we have defined how everything will be canonicalized we can start 3.2657 - thinking about this... --></p> 3.2658 + thinking about this... --><p></p> 3.2659 3.2660 <p>The 3.2661 <dfn title="dom-CSSStyleDeclaration-getPropertyPriority"><code>getPropertyPriority(<var>property</var>)</code></dfn> 3.2662 - method, when invoked, if <var title>property</var> is an 3.2663 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match for a 3.2664 + method, when invoked, if <var>property</var> is an 3.2665 + <span data-anolis-spec="dom">ASCII case-insensitive</span> match for a 3.2666 property that has a priority user agents must return the canonical 3.2667 priority of that property as given in the syntax definition. Otherwise, 3.2668 the empty string must be returned.</p> 3.2669 3.2670 <p class="example">E.g. for <code>background-color:lime !IMPORTANT</code> 3.2671 - the return value would be "<code title>important</code>".</p> 3.2672 + the return value would be "<code>important</code>".</p> 3.2673 3.2674 3.2675 <p>The 3.2676 <dfn title="dom-CSSStyleDeclaration-setProperty"><code>setProperty(<var>property</var>, <var>value</var>, <var>priority</var>)</code></dfn> 3.2677 method must run these steps: 3.2678 3.2679 - <ol> 3.2680 + </p><ol> 3.2681 <li><p>If the <span>CSS declaration block readonly flag</span> is set, 3.2682 - <span data-anolis-spec=dom title=concept-throw>throw</span> an 3.2683 - "<code data-anolis-spec=dom>NoModificationAllowedError</code>" and 3.2684 - terminate these steps. 3.2685 - 3.2686 - <li><p>If <var title>property</var> is not an 3.2687 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match for a 3.2688 + <span title="concept-throw" data-anolis-spec="dom">throw</span> an 3.2689 + "<code data-anolis-spec="dom">NoModificationAllowedError</code>" and 3.2690 + terminate these steps.</p></li> 3.2691 + 3.2692 + <li><p>If <var>property</var> is not an 3.2693 + <span data-anolis-spec="dom">ASCII case-insensitive</span> match for a 3.2694 supported property, terminate this algorithm.</p></li> 3.2695 3.2696 - <li><p>If <var title>value</var> is the empty string, invoke 3.2697 + <li><p>If <var>value</var> is the empty string, invoke 3.2698 <code title="dom-CSSStyleDeclaration-removeProperty">removeProperty()</code> 3.2699 - with <var title>property</var> as argument and terminate this 3.2700 + with <var>property</var> as argument and terminate this 3.2701 algorithm.</p></li> 3.2702 3.2703 - <li><p>If the <var title>priority</var> argument has been omitted let 3.2704 - <var title>priority</var> be the empty string.</p></li> 3.2705 - 3.2706 - <li><p>If <var title>priority</var> is neither a valid priority nor 3.2707 + <li><p>If the <var>priority</var> argument has been omitted let 3.2708 + <var>priority</var> be the empty string.</p></li> 3.2709 + 3.2710 + <li><p>If <var>priority</var> is neither a valid priority nor 3.2711 the empty string terminate this algorithm.</p></li> 3.2712 <!-- define valid priority somehow --> 3.2713 3.2714 <li> 3.2715 <p>If <span title="parse a CSS value">parsing the 3.2716 - <var title>value</var></span> returns null terminate this algorithm. 3.2717 - 3.2718 - <p class="note"><var title>value</var> can not include 3.2719 - "<code title>!important</code>".</p> 3.2720 + <var>value</var></span> returns null terminate this algorithm. 3.2721 + 3.2722 + </p><p class="note"><var>value</var> can not include 3.2723 + "<code>!important</code>".</p> 3.2724 </li> 3.2725 3.2726 - <li><p>Finally, set <var title>property</var> to <var title>value</var> 3.2727 - with priority <var title>priority</var> when <var title>priority</var> 3.2728 + <li><p>Finally, set <var>property</var> to <var>value</var> 3.2729 + with priority <var>priority</var> when <var>priority</var> 3.2730 is not the empty string. Otherwise set 3.2731 - <var title>property</var> to <var title>value</var>.</p></li> 3.2732 + <var>property</var> to <var>value</var>.</p></li> 3.2733 </ol> 3.2734 3.2735 <p>The 3.2736 <dfn title="dom-CSSStyleDeclaration-removeProperty"><code>removeProperty(<var>property</var>)</code></dfn> 3.2737 method must run these steps: 3.2738 3.2739 - <ol> 3.2740 + </p><ol> 3.2741 <li><p>If the <span>CSS declaration block readonly flag</span> is set, 3.2742 - <span data-anolis-spec=dom title=concept-throw>throw</span> a 3.2743 - "<code data-anolis-spec=dom>NoModificationAllowedError</code>" and 3.2744 - terminate these steps. 3.2745 - 3.2746 - <li><p>If <var title>property</var> is an 3.2747 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match for a 3.2748 + <span title="concept-throw" data-anolis-spec="dom">throw</span> a 3.2749 + "<code data-anolis-spec="dom">NoModificationAllowedError</code>" and 3.2750 + terminate these steps.</p></li> 3.2751 + 3.2752 + <li><p>If <var>property</var> is an 3.2753 + <span data-anolis-spec="dom">ASCII case-insensitive</span> match for a 3.2754 property of a declaration in the 3.2755 - <span>collection of CSS declarations</span> remove the declaration.</p> 3.2756 + <span>collection of CSS declarations</span> remove the declaration.</p></li> 3.2757 </ol> 3.2758 3.2759 3.2760 @@ -2262,7 +1926,7 @@ 3.2761 it is not associated with a <code>CSSrule</code> object.</p> 3.2762 <!-- XXX introduce a concept for this instead --> 3.2763 3.2764 - <hr> 3.2765 + <hr/> 3.2766 3.2767 <p>For the table below, the IDL attribute in the first column 3.2768 must return the result of invoking 3.2769 @@ -2281,375 +1945,10 @@ 3.2770 <thead> 3.2771 <tr> 3.2772 <th>IDL attribute 3.2773 - <th>CSS property 3.2774 - <tbody> 3.2775 - <tr> 3.2776 - <td><dfn title="dom-CSSStyleDeclaration-azimuth"><code>azimuth</code></dfn></td> 3.2777 - <td>"<code>azimuth</code>"</td> 3.2778 - <tr> 3.2779 - <td><dfn title="dom-CSSStyleDeclaration-background"><code>background</code></dfn></td> 3.2780 - <td>"<code>background</code>"</td> 3.2781 - <tr> 3.2782 - <td><dfn title="dom-CSSStyleDeclaration-backgroundAttachment"><code>backgroundAttachment</code></dfn></td> 3.2783 - <td>"<code>background-attachment</code>"</td> 3.2784 - <tr> 3.2785 - <td><dfn title="dom-CSSStyleDeclaration-backgroundColor"><code>backgroundColor</code></dfn></td> 3.2786 - <td>"<code>background-color</code>"</td> 3.2787 - <tr> 3.2788 - <td><dfn title="dom-CSSStyleDeclaration-backgroundImage"><code>backgroundImage</code></dfn></td> 3.2789 - <td>"<code>background-image</code>"</td> 3.2790 - <tr> 3.2791 - <td><dfn title="dom-CSSStyleDeclaration-backgroundPosition"><code>backgroundPosition</code></dfn></td> 3.2792 - <td>"<code>background-position</code>"</td> 3.2793 - <tr> 3.2794 - <td><dfn title="dom-CSSStyleDeclaration-backgroundRepeat"><code>backgroundRepeat</code></dfn></td> 3.2795 - <td>"<code>background-repeat</code>"</td> 3.2796 - <tr> 3.2797 - <td><dfn title="dom-CSSStyleDeclaration-border"><code>border</code></dfn></td> 3.2798 - <td>"<code>border</code>"</td> 3.2799 - <tr> 3.2800 - <td><dfn title="dom-CSSStyleDeclaration-borderCollapse"><code>borderCollapse</code></dfn></td> 3.2801 - <td>"<code>border-collapse</code>"</td> 3.2802 - <tr> 3.2803 - <td><dfn title="dom-CSSStyleDeclaration-borderColor"><code>borderColor</code></dfn></td> 3.2804 - <td>"<code>border-color</code>"</td> 3.2805 - <tr> 3.2806 - <td><dfn title="dom-CSSStyleDeclaration-borderSpacing"><code>borderSpacing</code></dfn></td> 3.2807 - <td>"<code>border-spacing</code>"</td> 3.2808 - <tr> 3.2809 - <td><dfn title="dom-CSSStyleDeclaration-borderStyle"><code>borderStyle</code></dfn></td> 3.2810 - <td>"<code>border-style</code>"</td> 3.2811 - <tr> 3.2812 - <td><dfn title="dom-CSSStyleDeclaration-borderTop"><code>borderTop</code></dfn></td> 3.2813 - <td>"<code>border-top</code>"</td> 3.2814 - <tr> 3.2815 - <td><dfn title="dom-CSSStyleDeclaration-borderRight"><code>borderRight</code></dfn></td> 3.2816 - <td>"<code>border-right</code>"</td> 3.2817 - <tr> 3.2818 - <td><dfn title="dom-CSSStyleDeclaration-borderBottom"><code>borderBottom</code></dfn></td> 3.2819 - <td>"<code>border-bottom</code>"</td> 3.2820 - <tr> 3.2821 - <td><dfn title="dom-CSSStyleDeclaration-borderLeft"><code>borderLeft</code></dfn></td> 3.2822 - <td>"<code>border-left</code>"</td> 3.2823 - <tr> 3.2824 - <td><dfn title="dom-CSSStyleDeclaration-borderTopColor"><code>borderTopColor</code></dfn></td> 3.2825 - <td>"<code>border-top-color</code>"</td> 3.2826 - <tr> 3.2827 - <td><dfn title="dom-CSSStyleDeclaration-borderRightColor"><code>borderRightColor</code></dfn></td> 3.2828 - <td>"<code>border-right-color</code>"</td> 3.2829 - <tr> 3.2830 - <td><dfn title="dom-CSSStyleDeclaration-borderBottomColor"><code>borderBottomColor</code></dfn></td> 3.2831 - <td>"<code>border-bottom-color</code>"</td> 3.2832 - <tr> 3.2833 - <td><dfn title="dom-CSSStyleDeclaration-borderLeftColor"><code>borderLeftColor</code></dfn></td> 3.2834 - <td>"<code>border-left-color</code>"</td> 3.2835 - <tr> 3.2836 - <td><dfn title="dom-CSSStyleDeclaration-borderTopStyle"><code>borderTopStyle</code></dfn></td> 3.2837 - <td>"<code>border-top-style</code>"</td> 3.2838 - <tr> 3.2839 - <td><dfn title="dom-CSSStyleDeclaration-borderRightStyle"><code>borderRightStyle</code></dfn></td> 3.2840 - <td>"<code>border-right-style</code>"</td> 3.2841 - <tr> 3.2842 - <td><dfn title="dom-CSSStyleDeclaration-borderBottomStyle"><code>borderBottomStyle</code></dfn></td> 3.2843 - <td>"<code>border-bottom-style</code>"</td> 3.2844 - <tr> 3.2845 - <td><dfn title="dom-CSSStyleDeclaration-borderLeftStyle"><code>borderLeftStyle</code></dfn></td> 3.2846 - <td>"<code>border-left-style</code>"</td> 3.2847 - <tr> 3.2848 - <td><dfn title="dom-CSSStyleDeclaration-borderTopWidth"><code>borderTopWidth</code></dfn></td> 3.2849 - <td>"<code>border-top-width</code>"</td> 3.2850 - <tr> 3.2851 - <td><dfn title="dom-CSSStyleDeclaration-borderRightWidth"><code>borderRightWidth</code></dfn></td> 3.2852 - <td>"<code>border-right-width</code>"</td> 3.2853 - <tr> 3.2854 - <td><dfn title="dom-CSSStyleDeclaration-borderBottomWidth"><code>borderBottomWidth</code></dfn></td> 3.2855 - <td>"<code>border-bottom-width</code>"</td> 3.2856 - <tr> 3.2857 - <td><dfn title="dom-CSSStyleDeclaration-borderLeftWidth"><code>borderLeftWidth</code></dfn></td> 3.2858 - <td>"<code>border-left-width</code>"</td> 3.2859 - <tr> 3.2860 - <td><dfn title="dom-CSSStyleDeclaration-borderWidth"><code>borderWidth</code></dfn></td> 3.2861 - <td>"<code>border-width</code>"</td> 3.2862 - <tr> 3.2863 - <td><dfn title="dom-CSSStyleDeclaration-bottom"><code>bottom</code></dfn></td> 3.2864 - <td>"<code>bottom</code>"</td> 3.2865 - <tr> 3.2866 - <td><dfn title="dom-CSSStyleDeclaration-captionSide"><code>captionSide</code></dfn></td> 3.2867 - <td>"<code>caption-side</code>"</td> 3.2868 - <tr> 3.2869 - <td><dfn title="dom-CSSStyleDeclaration-clear"><code>clear</code></dfn></td> 3.2870 - <td>"<code>clear</code>"</td> 3.2871 - <tr> 3.2872 - <td><dfn title="dom-CSSStyleDeclaration-clip"><code>clip</code></dfn></td> 3.2873 - <td>"<code>clip</code>"</td> 3.2874 - <tr> 3.2875 - <td><dfn title="dom-CSSStyleDeclaration-color"><code>color</code></dfn></td> 3.2876 - <td>"<code>color</code>"</td> 3.2877 - <tr> 3.2878 - <td><dfn title="dom-CSSStyleDeclaration-content"><code>content</code></dfn></td> 3.2879 - <td>"<code>content</code>"</td> 3.2880 - <tr> 3.2881 - <td><dfn title="dom-CSSStyleDeclaration-counterIncrement"><code>counterIncrement</code></dfn></td> 3.2882 - <td>"<code>counter-increment</code>"</td> 3.2883 - <tr> 3.2884 - <td><dfn title="dom-CSSStyleDeclaration-counterReset"><code>counterReset</code></dfn></td> 3.2885 - <td>"<code>counter-reset</code>"</td> 3.2886 - <tr> 3.2887 - <td><dfn title="dom-CSSStyleDeclaration-cue"><code>cue</code></dfn></td> 3.2888 - <td>"<code>cue</code>"</td> 3.2889 - <tr> 3.2890 - <td><dfn title="dom-CSSStyleDeclaration-cueAfter"><code>cueAfter</code></dfn></td> 3.2891 - <td>"<code>cue-after</code>"</td> 3.2892 - <tr> 3.2893 - <td><dfn title="dom-CSSStyleDeclaration-cueBefore"><code>cueBefore</code></dfn></td> 3.2894 - <td>"<code>cue-before</code>"</td> 3.2895 - <tr> 3.2896 - <td><dfn title="dom-CSSStyleDeclaration-cursor"><code>cursor</code></dfn></td> 3.2897 - <td>"<code>cursor</code>"</td> 3.2898 - <tr> 3.2899 - <td><dfn title="dom-CSSStyleDeclaration-direction"><code>direction</code></dfn></td> 3.2900 - <td>"<code>direction</code>"</td> 3.2901 - <tr> 3.2902 - <td><dfn title="dom-CSSStyleDeclaration-display"><code>display</code></dfn></td> 3.2903 - <td>"<code>display</code>"</td> 3.2904 - <tr> 3.2905 - <td><dfn title="dom-CSSStyleDeclaration-elevation"><code>elevation</code></dfn></td> 3.2906 - <td>"<code>elevation</code>"</td> 3.2907 - <tr> 3.2908 - <td><dfn title="dom-CSSStyleDeclaration-emptyCells"><code>emptyCells</code></dfn></td> 3.2909 - <td>"<code>empty-cells</code>"</td> 3.2910 - <tr> 3.2911 - <td><dfn title="dom-CSSStyleDeclaration-cssFloat"><code>cssFloat</code></dfn></td> 3.2912 - <td>"<code>float</code>"</td> 3.2913 - <tr> 3.2914 - <td><dfn title="dom-CSSStyleDeclaration-font"><code>font</code></dfn></td> 3.2915 - <td>"<code>font</code>"</td> 3.2916 - <tr> 3.2917 - <td><dfn title="dom-CSSStyleDeclaration-fontFamily"><code>fontFamily</code></dfn></td> 3.2918 - <td>"<code>font-family</code>"</td> 3.2919 - <tr> 3.2920 - <td><dfn title="dom-CSSStyleDeclaration-fontSize"><code>fontSize</code></dfn></td> 3.2921 - <td>"<code>font-size</code>"</td> 3.2922 - <tr> 3.2923 - <td><dfn title="dom-CSSStyleDeclaration-fontSizeAdjust"><code>fontSizeAdjust</code></dfn></td> 3.2924 - <td>"<code>font-size-adjust</code>"</td> 3.2925 - <tr> 3.2926 - <td><dfn title="dom-CSSStyleDeclaration-fontStretch"><code>fontStretch</code></dfn></td> 3.2927 - <td>"<code>font-stretch</code>"</td> 3.2928 - <tr> 3.2929 - <td><dfn title="dom-CSSStyleDeclaration-fontStyle"><code>fontStyle</code></dfn></td> 3.2930 - <td>"<code>font-style</code>"</td> 3.2931 - <tr> 3.2932 - <td><dfn title="dom-CSSStyleDeclaration-fontVariant"><code>fontVariant</code></dfn></td> 3.2933 - <td>"<code>font-variant</code>"</td> 3.2934 - <tr> 3.2935 - <td><dfn title="dom-CSSStyleDeclaration-fontWeight"><code>fontWeight</code></dfn></td> 3.2936 - <td>"<code>font-weight</code>"</td> 3.2937 - <tr> 3.2938 - <td><dfn title="dom-CSSStyleDeclaration-height"><code>height</code></dfn></td> 3.2939 - <td>"<code>height</code>"</td> 3.2940 - <tr> 3.2941 - <td><dfn title="dom-CSSStyleDeclaration-left"><code>left</code></dfn></td> 3.2942 - <td>"<code>left</code>"</td> 3.2943 - <tr> 3.2944 - <td><dfn title="dom-CSSStyleDeclaration-letterSpacing"><code>letterSpacing</code></dfn></td> 3.2945 - <td>"<code>letter-spacing</code>"</td> 3.2946 - <tr> 3.2947 - <td><dfn title="dom-CSSStyleDeclaration-lineHeight"><code>lineHeight</code></dfn></td> 3.2948 - <td>"<code>line-height</code>"</td> 3.2949 - <tr> 3.2950 - <td><dfn title="dom-CSSStyleDeclaration-listStyle"><code>listStyle</code></dfn></td> 3.2951 - <td>"<code>list-style</code>"</td> 3.2952 - <tr> 3.2953 - <td><dfn title="dom-CSSStyleDeclaration-listStyleImage"><code>listStyleImage</code></dfn></td> 3.2954 - <td>"<code>list-style-image</code>"</td> 3.2955 - <tr> 3.2956 - <td><dfn title="dom-CSSStyleDeclaration-listStylePosition"><code>listStylePosition</code></dfn></td> 3.2957 - <td>"<code>list-style-position</code>"</td> 3.2958 - <tr> 3.2959 - <td><dfn title="dom-CSSStyleDeclaration-listStyleType"><code>listStyleType</code></dfn></td> 3.2960 - <td>"<code>list-style-type</code>"</td> 3.2961 - <tr> 3.2962 - <td><dfn title="dom-CSSStyleDeclaration-margin"><code>margin</code></dfn></td> 3.2963 - <td>"<code>margin</code>"</td> 3.2964 - <tr> 3.2965 - <td><dfn title="dom-CSSStyleDeclaration-marginTop"><code>marginTop</code></dfn></td> 3.2966 - <td>"<code>margin-top</code>"</td> 3.2967 - <tr> 3.2968 - <td><dfn title="dom-CSSStyleDeclaration-marginRight"><code>marginRight</code></dfn></td> 3.2969 - <td>"<code>margin-right</code>"</td> 3.2970 - <tr> 3.2971 - <td><dfn title="dom-CSSStyleDeclaration-marginBottom"><code>marginBottom</code></dfn></td> 3.2972 - <td>"<code>margin-bottom</code>"</td> 3.2973 - <tr> 3.2974 - <td><dfn title="dom-CSSStyleDeclaration-marginLeft"><code>marginLeft</code></dfn></td> 3.2975 - <td>"<code>margin-left</code>"</td> 3.2976 - <tr> 3.2977 - <td><dfn title="dom-CSSStyleDeclaration-markerOffset"><code>markerOffset</code></dfn></td> 3.2978 - <td>"<code>marker-offset</code>"</td> 3.2979 - <tr> 3.2980 - <td><dfn title="dom-CSSStyleDeclaration-marks"><code>marks</code></dfn></td> 3.2981 - <td>"<code>marks</code>"</td> 3.2982 - <tr> 3.2983 - <td><dfn title="dom-CSSStyleDeclaration-maxHeight"><code>maxHeight</code></dfn></td> 3.2984 - <td>"<code>max-height</code>"</td> 3.2985 - <tr> 3.2986 - <td><dfn title="dom-CSSStyleDeclaration-maxWidth"><code>maxWidth</code></dfn></td> 3.2987 - <td>"<code>max-width</code>"</td> 3.2988 - <tr> 3.2989 - <td><dfn title="dom-CSSStyleDeclaration-minHeight"><code>minHeight</code></dfn></td> 3.2990 - <td>"<code>min-height</code>"</td> 3.2991 - <tr> 3.2992 - <td><dfn title="dom-CSSStyleDeclaration-minWidth"><code>minWidth</code></dfn></td> 3.2993 - <td>"<code>min-width</code>"</td> 3.2994 - <tr> 3.2995 - <td><dfn title="dom-CSSStyleDeclaration-orphans"><code>orphans</code></dfn></td> 3.2996 - <td>"<code>orphans</code>"</td> 3.2997 - <tr> 3.2998 - <td><dfn title="dom-CSSStyleDeclaration-outline"><code>outline</code></dfn></td> 3.2999 - <td>"<code>outline</code>"</td> 3.3000 - <tr> 3.3001 - <td><dfn title="dom-CSSStyleDeclaration-outlineColor"><code>outlineColor</code></dfn></td> 3.3002 - <td>"<code>outline-color</code>"</td> 3.3003 - <tr> 3.3004 - <td><dfn title="dom-CSSStyleDeclaration-outlineStyle"><code>outlineStyle</code></dfn></td> 3.3005 - <td>"<code>outline-style</code>"</td> 3.3006 - <tr> 3.3007 - <td><dfn title="dom-CSSStyleDeclaration-outlineWidth"><code>outlineWidth</code></dfn></td> 3.3008 - <td>"<code>outline-width</code>"</td> 3.3009 - <tr> 3.3010 - <td><dfn title="dom-CSSStyleDeclaration-overflow"><code>overflow</code></dfn></td> 3.3011 - <td>"<code>overflow</code>"</td> 3.3012 - <tr> 3.3013 - <td><dfn title="dom-CSSStyleDeclaration-padding"><code>padding</code></dfn></td> 3.3014 - <td>"<code>padding</code>"</td> 3.3015 - <tr> 3.3016 - <td><dfn title="dom-CSSStyleDeclaration-paddingTop"><code>paddingTop</code></dfn></td> 3.3017 - <td>"<code>padding-top</code>"</td> 3.3018 - <tr> 3.3019 - <td><dfn title="dom-CSSStyleDeclaration-paddingRight"><code>paddingRight</code></dfn></td> 3.3020 - <td>"<code>padding-right</code>"</td> 3.3021 - <tr> 3.3022 - <td><dfn title="dom-CSSStyleDeclaration-paddingBottom"><code>paddingBottom</code></dfn></td> 3.3023 - <td>"<code>padding-bottom</code>"</td> 3.3024 - <tr> 3.3025 - <td><dfn title="dom-CSSStyleDeclaration-paddingLeft"><code>paddingLeft</code></dfn></td> 3.3026 - <td>"<code>padding-left</code>"</td> 3.3027 - <tr> 3.3028 - <td><dfn title="dom-CSSStyleDeclaration-page"><code>page</code></dfn></td> 3.3029 - <td>"<code>page</code>"</td> 3.3030 - <tr> 3.3031 - <td><dfn title="dom-CSSStyleDeclaration-pageBreakAfter"><code>pageBreakAfter</code></dfn></td> 3.3032 - <td>"<code>page-break-after</code>"</td> 3.3033 - <tr> 3.3034 - <td><dfn title="dom-CSSStyleDeclaration-pageBreakBefore"><code>pageBreakBefore</code></dfn></td> 3.3035 - <td>"<code>page-break-before</code>"</td> 3.3036 - <tr> 3.3037 - <td><dfn title="dom-CSSStyleDeclaration-pageBreakInside"><code>pageBreakInside</code></dfn></td> 3.3038 - <td>"<code>page-break-inside</code>"</td> 3.3039 - <tr> 3.3040 - <td><dfn title="dom-CSSStyleDeclaration-pause"><code>pause</code></dfn></td> 3.3041 - <td>"<code>pause</code>"</td> 3.3042 - <tr> 3.3043 - <td><dfn title="dom-CSSStyleDeclaration-pauseAfter"><code>pauseAfter</code></dfn></td> 3.3044 - <td>"<code>pause-after</code>"</td> 3.3045 - <tr> 3.3046 - <td><dfn title="dom-CSSStyleDeclaration-pauseBefore"><code>pauseBefore</code></dfn></td> 3.3047 - <td>"<code>pause-before</code>"</td> 3.3048 - <tr> 3.3049 - <td><dfn title="dom-CSSStyleDeclaration-pitch"><code>pitch</code></dfn></td> 3.3050 - <td>"<code>pitch</code>"</td> 3.3051 - <tr> 3.3052 - <td><dfn title="dom-CSSStyleDeclaration-pitchRange"><code>pitchRange</code></dfn></td> 3.3053 - <td>"<code>pitch-range</code>"</td> 3.3054 - <tr> 3.3055 - <td><dfn title="dom-CSSStyleDeclaration-playDuring"><code>playDuring</code></dfn></td> 3.3056 - <td>"<code>play-during</code>"</td> 3.3057 - <tr> 3.3058 - <td><dfn title="dom-CSSStyleDeclaration-position"><code>position</code></dfn></td> 3.3059 - <td>"<code>position</code>"</td> 3.3060 - <tr> 3.3061 - <td><dfn title="dom-CSSStyleDeclaration-quotes"><code>quotes</code></dfn></td> 3.3062 - <td>"<code>quotes</code>"</td> 3.3063 - <tr> 3.3064 - <td><dfn title="dom-CSSStyleDeclaration-richness"><code>richness</code></dfn></td> 3.3065 - <td>"<code>richness</code>"</td> 3.3066 - <tr> 3.3067 - <td><dfn title="dom-CSSStyleDeclaration-right"><code>right</code></dfn></td> 3.3068 - <td>"<code>right</code>"</td> 3.3069 - <tr> 3.3070 - <td><dfn title="dom-CSSStyleDeclaration-size"><code>size</code></dfn></td> 3.3071 - <td>"<code>size</code>"</td> 3.3072 - <tr> 3.3073 - <td><dfn title="dom-CSSStyleDeclaration-speak"><code>speak</code></dfn></td> 3.3074 - <td>"<code>speak</code>"</td> 3.3075 - <tr> 3.3076 - <td><dfn title="dom-CSSStyleDeclaration-speakHeader"><code>speakHeader</code></dfn></td> 3.3077 - <td>"<code>speak-header</code>"</td> 3.3078 - <tr> 3.3079 - <td><dfn title="dom-CSSStyleDeclaration-speakNumeral"><code>speakNumeral</code></dfn></td> 3.3080 - <td>"<code>speak-numeral</code>"</td> 3.3081 - <tr> 3.3082 - <td><dfn title="dom-CSSStyleDeclaration-speakPunctuation"><code>speakPunctuation</code></dfn></td> 3.3083 - <td>"<code>speak-punctuation</code>"</td> 3.3084 - <tr> 3.3085 - <td><dfn title="dom-CSSStyleDeclaration-speechRate"><code>speechRate</code></dfn></td> 3.3086 - <td>"<code>speech-rate</code>"</td> 3.3087 - <tr> 3.3088 - <td><dfn title="dom-CSSStyleDeclaration-stress"><code>stress</code></dfn></td> 3.3089 - <td>"<code>stress</code>"</td> 3.3090 - <tr> 3.3091 - <td><dfn title="dom-CSSStyleDeclaration-tableLayout"><code>tableLayout</code></dfn></td> 3.3092 - <td>"<code>table-layout</code>"</td> 3.3093 - <tr> 3.3094 - <td><dfn title="dom-CSSStyleDeclaration-textAlign"><code>textAlign</code></dfn></td> 3.3095 - <td>"<code>text-align</code>"</td> 3.3096 - <tr> 3.3097 - <td><dfn title="dom-CSSStyleDeclaration-textDecoration"><code>textDecoration</code></dfn></td> 3.3098 - <td>"<code>text-decoration</code>"</td> 3.3099 - <tr> 3.3100 - <td><dfn title="dom-CSSStyleDeclaration-textIndent"><code>textIndent</code></dfn></td> 3.3101 - <td>"<code>text-indent</code>"</td> 3.3102 - <tr> 3.3103 - <td><dfn title="dom-CSSStyleDeclaration-textShadow"><code>textShadow</code></dfn></td> 3.3104 - <td>"<code>text-shadow</code>"</td> 3.3105 - <tr> 3.3106 - <td><dfn title="dom-CSSStyleDeclaration-textTransform"><code>textTransform</code></dfn></td> 3.3107 - <td>"<code>text-transform</code>"</td> 3.3108 - <tr> 3.3109 - <td><dfn title="dom-CSSStyleDeclaration-top"><code>top</code></dfn></td> 3.3110 - <td>"<code>top</code>"</td> 3.3111 - <tr> 3.3112 - <td><dfn title="dom-CSSStyleDeclaration-unicodeBidi"><code>unicodeBidi</code></dfn></td> 3.3113 - <td>"<code>unicode-bidi</code>"</td> 3.3114 - <tr> 3.3115 - <td><dfn title="dom-CSSStyleDeclaration-verticalAlign"><code>verticalAlign</code></dfn></td> 3.3116 - <td>"<code>vertical-align</code>"</td> 3.3117 - <tr> 3.3118 - <td><dfn title="dom-CSSStyleDeclaration-visibility"><code>visibility</code></dfn></td> 3.3119 - <td>"<code>visibility</code>"</td> 3.3120 - <tr> 3.3121 - <td><dfn title="dom-CSSStyleDeclaration-voiceFamily"><code>voiceFamily</code></dfn></td> 3.3122 - <td>"<code>voice-family</code>"</td> 3.3123 - <tr> 3.3124 - <td><dfn title="dom-CSSStyleDeclaration-volume"><code>volume</code></dfn></td> 3.3125 - <td>"<code>volume</code>"</td> 3.3126 - <tr> 3.3127 - <td><dfn title="dom-CSSStyleDeclaration-whiteSpace"><code>whiteSpace</code></dfn></td> 3.3128 - <td>"<code>white-space</code>"</td> 3.3129 - <tr> 3.3130 - <td><dfn title="dom-CSSStyleDeclaration-widows"><code>widows</code></dfn></td> 3.3131 - <td>"<code>widows</code>"</td> 3.3132 - <tr> 3.3133 - <td><dfn title="dom-CSSStyleDeclaration-width"><code>width</code></dfn></td> 3.3134 - <td>"<code>width</code>"</td> 3.3135 - <tr> 3.3136 - <td><dfn title="dom-CSSStyleDeclaration-wordSpacing"><code>wordSpacing</code></dfn></td> 3.3137 - <td>"<code>word-spacing</code>"</td> 3.3138 - <tr> 3.3139 - <td><dfn title="dom-CSSStyleDeclaration-zIndex"><code>zIndex</code></dfn></td> 3.3140 - <td>"<code>z-index</code>"</td> 3.3141 - </table> 3.3142 + </th><th>CSS property 3.3143 + </th></tr></thead><tbody> 3.3144 +<!--CSSOM-DECLARATIONTABLE--> 3.3145 + </tbody></table> 3.3146 3.3147 <!-- 3.3148 <h4>CSS Properties</h4> 3.3149 @@ -2658,42 +1957,48 @@ 3.3150 following algorithm:</p> 3.3151 3.3152 <ol> 3.3153 - <li>Let <var title>r</var> be the CSS property to be 3.3154 + <li>Let <var>r</var> be the CSS property to be 3.3155 converted.</li> 3.3156 3.3157 <li>Uppercase the first character after every U+002D (<code>-</code>) in 3.3158 - <var title>r</var>.</li> 3.3159 - 3.3160 - <li>Remove every U+002D (<code>-</code>) in <var title>r</var>.</li> 3.3161 - 3.3162 - <li>Return <var title>r</var>.</li> 3.3163 + <var>r</var>.</li> 3.3164 + 3.3165 + <li>Remove every U+002D (<code>-</code>) in <var>r</var>.</li> 3.3166 + 3.3167 + <li>Return <var>r</var>.</li> 3.3168 </ol> 3.3169 3.3170 <p class="note">This means that 3.3171 - <code>-<var title>vendor</var>-<var title>property</var></code> 3.3172 + <code>-<var>vendor</var>-<var>property</var></code> 3.3173 becomes 3.3174 - <code><var title><strong>V</strong>endor</var><var title><strong>P</strong>roperty</var></code> 3.3175 + <code><var><strong>V</strong>endor</var><var><strong>P</strong>roperty</var></code> 3.3176 for instance.</p> 3.3177 --> 3.3178 3.3179 + <!-- ........................................................................................................................ --> 3.3180 + <!-- ........................................................................................................................ --> 3.3181 3.3182 <h3>CSS Values</h3> 3.3183 3.3184 + <!-- ........................................................................................................................ --> 3.3185 + 3.3186 <h4>Parsing CSS Values</h4> 3.3187 3.3188 <p>To <dfn id="parse-a-css-value">parse a CSS value</dfn> for a given 3.3189 - <var title>property</var> means to a parse the given value according to 3.3190 + <var>property</var> means to a parse the given value according to 3.3191 the definition of the property that is an 3.3192 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 3.3193 - <var title>property</var> in the CSS specification. If the given value 3.3194 + <span data-anolis-spec="dom">ASCII case-insensitive</span> match for 3.3195 + <var>property</var> in the CSS specification. If the given value 3.3196 is <span>ignored</span> return null. Otherwise return the CSS value for 3.3197 - the given <var title>property</var>.</p> 3.3198 - 3.3199 - <p class="note">"<code title>!important</code>" declarations are not 3.3200 + the given <var>property</var>.</p> 3.3201 + 3.3202 + <p class="note">"<code>!important</code>" declarations are not 3.3203 part of the property value space and will therefore cause 3.3204 <span>parse a CSS value</span> to return null.</p> 3.3205 3.3206 3.3207 + <!-- ........................................................................................................................ --> 3.3208 + 3.3209 <h4>Serializing CSS Values</h4> 3.3210 3.3211 <!-- based on http://damowmow.com/playground/canon.txt --> 3.3212 @@ -2749,14 +2054,14 @@ 3.3213 <dl class="switch"> 3.3214 <dt>keyword</dt> 3.3215 <dd><p>The keyword 3.3216 - <span data-anolis-spec=dom>converted to ASCII lowercase</span>.</p></dd> 3.3217 - 3.3218 - <dt><angle></dt> 3.3219 - <dd><p>The number of degrees serialized as per <number> followed by 3.3220 + <span data-anolis-spec="dom">converted to ASCII lowercase</span>.</p></dd> 3.3221 + 3.3222 + <dt><angle></dt> 3.3223 + <dd><p>The number of degrees serialized as per <number> followed by 3.3224 the literal string "<code>deg</code>".</p></dd> 3.3225 3.3226 - <dt><color></dt> 3.3227 - <dd><p class=XXX>preserve system colors, maybe color keywords...</p></dd> 3.3228 + <dt><color></dt> 3.3229 + <dd><p class="XXX">preserve system colors, maybe color keywords...</p></dd> 3.3230 <!-- 3.3231 <dt>It is a system color</dt> 3.3232 3.3233 @@ -2790,99 +2095,99 @@ 3.3234 <dd>The color is <code>rgba(0, 0, 0, 0)</code>.</dd> 3.3235 --> 3.3236 3.3237 - <dt><counter></dt> 3.3238 + <dt><counter></dt> 3.3239 <dd> 3.3240 <p>The concatenation of:</p> 3.3241 <ol> 3.3242 - <li><p>If <counter> has three CSS component values the string 3.3243 - "<code title>counters(</code>".</p></li> 3.3244 - <li><p>If <counter> has two CSS component values the string 3.3245 - "<code title>counter(</code>".</p></li> 3.3246 + <li><p>If <counter> has three CSS component values the string 3.3247 + "<code>counters(</code>".</p></li> 3.3248 + <li><p>If <counter> has two CSS component values the string 3.3249 + "<code>counter(</code>".</p></li> 3.3250 <li><p>The result of 3.3251 <span title="serialize a comma-separated list">serializing</span> the 3.3252 <span title="serialize a CSS component value">serialized</span> 3.3253 - CSS component values belonging to <counter> as list while omitting 3.3254 + CSS component values belonging to <counter> as list while omitting 3.3255 the last CSS component value if it is 'decimal'.</p></li> 3.3256 <li><p>"<code>)</code>" (U+0029).</p></li> 3.3257 </ol> 3.3258 </dd> 3.3259 3.3260 - <dt><frequency></dt> 3.3261 - <dd><p>The frequency in hertz serialized as per <number> followed by 3.3262 - the literal string "<code>hz</code>".</dd> 3.3263 - 3.3264 - <dt><identifier></dt> 3.3265 + <dt><frequency></dt> 3.3266 + <dd><p>The frequency in hertz serialized as per <number> followed by 3.3267 + the literal string "<code>hz</code>".</p></dd> 3.3268 + 3.3269 + <dt><identifier></dt> 3.3270 <dd><p>The identifier 3.3271 <span title="serialize an identifier">escaped</span>.</p></dd> 3.3272 3.3273 - <dt><integer></dt> 3.3274 + <dt><integer></dt> 3.3275 <dd><p>A base-ten integer using digits 0-9 (U+0030 to U+0039) in the 3.3276 shortest form possible, preceded by "<code>-</code>" (U+002D) if it is 3.3277 negative.</p></dd> 3.3278 3.3279 - <dt><length></dt> 3.3280 + <dt><length></dt> 3.3281 <dd> 3.3282 <p>A length of zero is represented by the literal string 3.3283 "<code>0px</code>".</p> 3.3284 3.3285 <p>Absolute lengths: the number of millimeters serialized as per 3.3286 - <number> followed by the literal string "<code>mm</code>". 3.3287 - <span class=XXX>Rumor has it absolute lengths will become relative 3.3288 - lengths. Centimeters would be compatible with <resolution>...</p> 3.3289 - 3.3290 - <p>Relative lengths: the <number> component serialized as per 3.3291 - <number> followed by the unit in its canonical form as defined in its 3.3292 + <number> followed by the literal string "<code>mm</code>". 3.3293 + <span class="XXX">Rumor has it absolute lengths will become relative 3.3294 + lengths. Centimeters would be compatible with <resolution>...</span></p> 3.3295 + 3.3296 + <p>Relative lengths: the <number> component serialized as per 3.3297 + <number> followed by the unit in its canonical form as defined in its 3.3298 respective specification.</p> 3.3299 </dd> 3.3300 3.3301 - <dt><number></dt> 3.3302 - <dd><p class=XXX>Browsers seem to use ToString(), but that might give a 3.3303 + <dt><number></dt> 3.3304 + <dd><p class="XXX">Browsers seem to use ToString(), but that might give a 3.3305 significand which according to some is teh evil (and also currently does 3.3306 not parse correctly).</p></dd> 3.3307 3.3308 - <dt><percentage></dt> 3.3309 - <dd><p>The <number> component serialized as per <number> followed 3.3310 + <dt><percentage></dt> 3.3311 + <dd><p>The <number> component serialized as per <number> followed 3.3312 by the literal string "<code>%</code>" (U+0025).</p></dd> 3.3313 3.3314 - <dt><resolution></dt> 3.3315 + <dt><resolution></dt> 3.3316 <dd><p>The resolution in dots per centimeter serialized as per 3.3317 - <number> followed by the literal string "<code>dpcm</code>".</dd> 3.3318 - 3.3319 - <dt><shape></dt> 3.3320 - <dd><p>The string "<code title>rect(</code>", followed by the result 3.3321 + <number> followed by the literal string "<code>dpcm</code>".</p></dd> 3.3322 + 3.3323 + <dt><shape></dt> 3.3324 + <dd><p>The string "<code>rect(</code>", followed by the result 3.3325 of <span title="serialize a comma-separated list">serializing</span> the 3.3326 <span title="serialize a CSS component value">serialized</span> 3.3327 - CSS component values belonging to <shape> as list, followed by 3.3328 + CSS component values belonging to <shape> as list, followed by 3.3329 "<code>)</code>" (U+0029).</p></dd> 3.3330 3.3331 - <dt><string></dt> 3.3332 - <dt><family-name></dt> 3.3333 - <dt><specific-voice></dt> 3.3334 + <dt><string></dt> 3.3335 + <dt><family-name></dt> 3.3336 + <dt><specific-voice></dt> 3.3337 <dd><p>The string 3.3338 <span title="serialize a string">string escaped</span>.</p></dd> 3.3339 3.3340 - <dt><time></dt> 3.3341 - <dd><p>The time in seconds serialized as per <number> followed by 3.3342 - the literal string "<code>s</code>".</dd> 3.3343 - 3.3344 - <dt><uri></dt> 3.3345 - <dd><p>The <span data-anolis-spec=html>absolute URL</span> 3.3346 + <dt><time></dt> 3.3347 + <dd><p>The time in seconds serialized as per <number> followed by 3.3348 + the literal string "<code>s</code>".</p></dd> 3.3349 + 3.3350 + <dt><uri></dt> 3.3351 + <dd><p>The <span data-anolis-spec="html">absolute URL</span> 3.3352 <span title="serialize a URL">URL escaped</span>.</p></dd> 3.3353 </dl> 3.3354 3.3355 <p> 3.3356 - <absolute-size>, 3.3357 - <border-width>, 3.3358 - <border-style>, 3.3359 - <bottom>, 3.3360 - <generic-family>, 3.3361 - <generic-voice>, 3.3362 - <left>, 3.3363 - <margin-width>, 3.3364 - <padding-width>, 3.3365 - <relative-size>, 3.3366 - <right>, and 3.3367 - <top>, 3.3368 + <absolute-size>, 3.3369 + <border-width>, 3.3370 + <border-style>, 3.3371 + <bottom>, 3.3372 + <generic-family>, 3.3373 + <generic-voice>, 3.3374 + <left>, 3.3375 + <margin-width>, 3.3376 + <padding-width>, 3.3377 + <relative-size>, 3.3378 + <right>, and 3.3379 + <top>, 3.3380 are considered macros by this specification. They all represent instances 3.3381 of components outlined above.</p> 3.3382 3.3383 @@ -2900,96 +2205,66 @@ 3.3384 <div class="example"> 3.3385 <table> 3.3386 <thead> 3.3387 - <tr><th>Before<th>After 3.3388 - <tbody> 3.3389 - <tr><td><code>background: none</code><td><code>background: rgba(0, 0, 0, 0)</code> 3.3390 - <tr><td><code>outline: none</code><td><code>outline: invert</code> 3.3391 - <tr><td><code>border: none</code><td><code>border: medium</code> 3.3392 - <tr><td><code>list-style: none</code><td><code>list-style: disc</code> 3.3393 - <tr><td><code>margin: 0 1px 1px 1px</code><td><code>margin: 0px 1px 1px</code> 3.3394 - <tr><td><code>azimuth: behind left</code><td><code>azimuth: 220deg</code> 3.3395 - <tr><td><code>font-family: a, 'b"', serif</code><td><code>font-family: "a", "b\"", serif</code> 3.3396 - <tr><td><code>content: url('h)i') '\[\]'</code><td><code>content: url("h)i") "[]"</code> 3.3397 - <tr><td><code>azimuth: leftwards</code><td><code>azimuth: leftwards</code> 3.3398 - <tr><td><code>color: rgb(18, 52, 86)</code><td><code>color: #123456</code> 3.3399 - <tr><td><code>color: rgba(000001, 0, 0, 1)</code><td><code>color: #000000</code> 3.3400 - </table> 3.3401 + <tr><th>Before</th><th>After 3.3402 + </th></tr></thead><tbody> 3.3403 + <tr><td><code>background: none</code></td><td><code>background: rgba(0, 0, 0, 0)</code> 3.3404 + </td></tr><tr><td><code>outline: none</code></td><td><code>outline: invert</code> 3.3405 + </td></tr><tr><td><code>border: none</code></td><td><code>border: medium</code> 3.3406 + </td></tr><tr><td><code>list-style: none</code></td><td><code>list-style: disc</code> 3.3407 + </td></tr><tr><td><code>margin: 0 1px 1px 1px</code></td><td><code>margin: 0px 1px 1px</code> 3.3408 + </td></tr><tr><td><code>azimuth: behind left</code></td><td><code>azimuth: 220deg</code> 3.3409 + </td></tr><tr><td><code>font-family: a, 'b"', serif</code></td><td><code>font-family: "a", "b\"", serif</code> 3.3410 + </td></tr><tr><td><code>content: url('h)i') '\[\]'</code></td><td><code>content: url("h)i") "[]"</code> 3.3411 + </td></tr><tr><td><code>azimuth: leftwards</code></td><td><code>azimuth: leftwards</code> 3.3412 + </td></tr><tr><td><code>color: rgb(18, 52, 86)</code></td><td><code>color: #123456</code> 3.3413 + </td></tr><tr><td><code>color: rgba(000001, 0, 0, 1)</code></td><td><code>color: #000000</code> 3.3414 + </td></tr></tbody></table> 3.3415 3.3416 <p class="XXX">Some of these need to be updated per the new rules.</p> 3.3417 </div> 3.3418 3.3419 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.3420 + 3.3421 <h2>DOM Access to CSS Declaration Blocks</h2> 3.3422 3.3423 + <!-- ........................................................................................................................ --> 3.3424 + <!-- ........................................................................................................................ --> 3.3425 + 3.3426 <h3>The <code>ElementCSSInlineStyle</code> Interface</h3> 3.3427 3.3428 - <pre class="idl">[NoInterfaceObject] interface <dfn>ElementCSSInlineStyle</dfn> { 3.3429 - readonly attribute <span>CSSStyleDeclaration</span> <span>style</span>; 3.3430 -};</pre> 3.3431 - 3.3432 - <p class="XXX">...</p> 3.3433 - 3.3434 - <!-- XXX 3.3435 - how does this interact with the markup attribute 3.3436 - --> 3.3437 - 3.3438 - 3.3439 - 3.3440 - <h3>Extensions to the <code title>Window</code> Interface</h3> 3.3441 - 3.3442 - <pre class="idl">partial interface <span data-anolis-spec=html>Window</span> { 3.3443 - <span>CSSStyleDeclaration</span> <span title="dom-Window-getComputedStyle">getComputedStyle</span>(<span data-anolis-spec=dom>Element</span> <var title>elt</var>); 3.3444 - <span>CSSStyleDeclaration</span> <span title="dom-Window-getComputedStyle">getComputedStyle</span>(<span data-anolis-spec=dom>Element</span> <var title>elt</var>, DOMString <var title>pseudoElt</var>); 3.3445 -};</pre> 3.3446 - 3.3447 - <p>The 3.3448 - <dfn id="dom-window-getcomputedstyle" title="dom-Window-getComputedStyle"><code>getComputedStyle(<var title>elt</var>, <var title>pseudoElt</var>)</code></dfn> 3.3449 - method must run these steps:</p> 3.3450 - 3.3451 - <ol> 3.3452 - <li><p>Let <var title>doc</var> be the 3.3453 - <code data-anolis-spec=dom>Document</code> 3.3454 - associated with the <code data-anolis-spec=html>Window</code> object on 3.3455 - which the method was invoked.</p></li> 3.3456 - 3.3457 - <li><p>Let <var title>obj</var> be <var title>elt</var>.</p></li> 3.3458 - 3.3459 - <li><p>If <var title>pseudoElt</var> is as an 3.3460 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 3.3461 - either "<code>:before</code>" or "<code>::before</code>" let 3.3462 - <var title>obj</var> be the '::before' pseudo-element of 3.3463 - <var title>elt</var>.</p></li> 3.3464 - 3.3465 - <li><p>If <var title>pseudoElt</var> is as an 3.3466 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 3.3467 - either "<code>:after</code>" or "<code>::after</code>" let 3.3468 - <var title>obj</var> be the '::after' pseudo-element of 3.3469 - <var title>elt</var>.</p></li> 3.3470 - 3.3471 - <li> 3.3472 - <p>Return a <span>CSS declaration block</span> with the 3.3473 - <span>CSS declaration block readonly flag</span> set and the 3.3474 - <span>CSS declaration block declarations</span> set to all properties 3.3475 - the user agent supports with as value the <span>resolved value</span> 3.3476 - computed for <var title>obj</var> using the style rules associated 3.3477 - with <var title>doc</var>.</p> 3.3478 - 3.3479 - <p class="note">This means that even if <var title>obj</var> is in a 3.3480 - different document (e.g. one fetched via <code>XMLHttpRequest</code>) it 3.3481 - will still use the style rules associated with the document that is 3.3482 - associated with the global object on which 3.3483 - <code title="dom-Window-getComputedStyle">getComputedStyle()</code> was 3.3484 - invoked to compute the <span>CSS declaration block</span>.</p> 3.3485 - </li> 3.3486 - 3.3487 - <!-- https://bugs.webkit.org/show_bug.cgi?id=14563 has reasons for why 3.3488 - this is slightly crazy --> 3.3489 - </ol> 3.3490 - 3.3491 - <p class="note">Because of historical IDL limitations the 3.3492 - <code title="dom-Window-getComputedStyle">getComputedStyle()</code> method 3.3493 - used to be on a separate interface, <code title>ViewCSS</code>.</p> 3.3494 - 3.3495 - 3.3496 + The <code>ElementCSSInlineStyle</code> interface is implemented by <code>Element</code> objects in order to provide access to inline style properties. 3.3497 +<pre class="idl"><span class="idlInterface" id="widl-def-ElementCSSInlineStyle">interface <span class="idlInterfaceID">ElementCSSInlineStyle</span> { 3.3498 +<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleDeclaration</a></span> <span class="idlAttrName"><a href="#widl-ElementCSSInlineStyle-style">style</a></span>;</span> 3.3499 +};</span></pre> 3.3500 +<dl class="attributes"> 3.3501 +<dt class="attribute"> 3.3502 +<code>style</code> of type <span class="idlAttrType"><a>CSSStyleDeclaration</a></span>, readonly</dt> 3.3503 +<dd> 3.3504 +The <code>style</code> attribute must return a mutable <code>CSSStyleDeclaration</code> object that represents the inline style properties of the associated <code>Element</code> instance.</dd> 3.3505 +</dl> 3.3506 + 3.3507 + 3.3508 + <!-- ........................................................................................................................ --> 3.3509 + <!-- ........................................................................................................................ --> 3.3510 + 3.3511 + <h3>Extensions to the <code>Window</code> Interface</h3> 3.3512 + 3.3513 + 3.3514 +<pre class="idl"><span class="idlInterface" id="widl-def-Window">partial interface <span class="idlInterfaceID">Window</span> { 3.3515 +<span class="idlMethod"> <span class="idlMethType"><a>CSSStyleDeclaration</a></span> <span class="idlMethName"><a href="#widl-Window-getComputedStyle-CSSStyleDeclaration-Element-elt">getComputedStyle</a></span> (<span class="idlParam"><span class="idlParamType"><a>Element</a></span> <span class="idlParamName">elt</span></span>);</span> 3.3516 +<span class="idlMethod"> <span class="idlMethType"><a>CSSStyleDeclaration</a></span> <span class="idlMethName"><a href="#widl-Window-getComputedStyle-CSSStyleDeclaration-Element-elt-DOMString-pseudoElt">getComputedStyle</a></span> (<span class="idlParam"><span class="idlParamType"><a>Element</a></span> <span class="idlParamName">elt</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">pseudoElt</span></span>);</span> 3.3517 +};</span></pre> 3.3518 +<dl class="methods"> 3.3519 +<dt class="method"> 3.3520 +<code>getComputedStyle</code> (<span class="idlParam"><span class="idlParamType"><a>Element</a></span></span>), returns <span class="idlMethType"><a>CSSStyleDeclaration</a></span></dt> 3.3521 +<dt class="method"> 3.3522 +<code>getComputedStyle</code> (<span class="idlParam"><span class="idlParamType"><a>Element</a></span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span></span>), returns <span class="idlMethType"><a>CSSStyleDeclaration</a></span></dt> 3.3523 +<dd> 3.3524 +<p>The <code>getComputedStyle</code> operation must run these steps:</p> <ol> <li><p>Let <var>doc</var> be the <code data-anolis-spec=dom>Document</code> associated with the <code data-anolis-spec=html>Window</code> object on which the method was invoked.</p></li> <li><p>Let <var>obj</var> be <var>elt</var>.</p></li> <li><p>If <var>pseudoElt</var> is as an <span data-anolis-spec=dom>ASCII case-insensitive</span> match for either '<code>:before</code>' or '<code>::before</code>' let <var>obj</var> be the '::before' pseudo-element of <var>elt</var>.</p></li> <li><p>If <var>pseudoElt</var> is as an <span data-anolis-spec=dom>ASCII case-insensitive</span> match for either '<code>:after</code>' or '<code>::after</code>' let <var>obj</var> be the '::after' pseudo-element of <var>elt</var>.</p></li> <li> <p>Return a <span>CSS declaration block</span> with the <span>CSS declaration block readonly flag</span> set and the <span>CSS declaration block declarations</span> set to all properties the user agent supports with as value the <span>resolved value</span> computed for <var>obj</var> using the style rules associated with <var>doc</var>.</p> <p class='note'>This means that even if <var>obj</var> is in a different document (e.g. one fetched via <code>XMLHttpRequest</code>) it will still use the style rules associated with the document that is associated with the global object on which <code title='dom-Window-getComputedStyle'>getComputedStyle()</code> was invoked to compute the <span>CSS declaration block</span>.</p> </li> </ol> <p class='note'>Because of historical IDL limitations the <code>getComputedStyle</code> operation used to be on a separate interface, <code>ViewCSS</code>.</p></dd> 3.3525 +</dl> 3.3526 + 3.3527 + 3.3528 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.3529 3.3530 <h2>Resolved Values</h2> 3.3531 3.3532 @@ -3057,12 +2332,14 @@ 3.3533 <dd><p>The <span>resolved value</span> is the computed value.</p></dd> 3.3534 </dl> 3.3535 3.3536 - 3.3537 - 3.3538 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.3539 3.3540 <h2 id="iana-considerations">IANA Considerations</h2> 3.3541 3.3542 - <h3><dfn title="http-default-style"><code>Default-Style</code></dfn></h5> 3.3543 + <!-- ........................................................................................................................ --> 3.3544 + <!-- ........................................................................................................................ --> 3.3545 + 3.3546 + <h3><dfn title="http-default-style"><code>Default-Style</code></dfn></h3> 3.3547 3.3548 <p>This section describes a header field for registration in the Permanent 3.3549 Message Header Field Registry. 3.3550 @@ -3083,23 +2360,30 @@ 3.3551 <dd>None.</dd> 3.3552 </dl> 3.3553 3.3554 - 3.3555 - 3.3556 - 3.3557 -<h2 class=no-num>References</h2> 3.3558 -<h3 class=no-num>Normative references</h3> 3.3559 -<div id=anolis-references-normative></div> 3.3560 - 3.3561 -<h3 class=no-num>Informative references</h3> 3.3562 -<div id=anolis-references-informative></div> 3.3563 - 3.3564 - 3.3565 - <h2 class="no-num" id="acknowledgments">Acknowledgments</h2> 3.3566 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.3567 + 3.3568 + <h2 class="no-num">References</h2> 3.3569 + 3.3570 + <!-- ........................................................................................................................ --> 3.3571 + <!-- ........................................................................................................................ --> 3.3572 + 3.3573 + <h3 class="no-num">Normative references</h3> 3.3574 + <div id="anolis-references-normative"></div> 3.3575 + 3.3576 + <!-- ........................................................................................................................ --> 3.3577 + <!-- ........................................................................................................................ --> 3.3578 + 3.3579 + <h3 class="no-num">Informative references</h3> 3.3580 + <div id="anolis-references-informative"></div> 3.3581 + 3.3582 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 3.3583 + 3.3584 + <h2 id="acknowledgments" class="no-num">Acknowledgments</h2> 3.3585 3.3586 <p>The editors would like to thank 3.3587 3.3588 Alexey Feldgendler, 3.3589 - Björn Höhrmann, 3.3590 + Björn Höhrmann, 3.3591 Brian Kardell, 3.3592 Christian Krebs, 3.3593 Daniel Glazman, 3.3594 @@ -3137,13 +2421,15 @@ 3.3595 3.3596 <style media="x"> invokes .sheet.media.mediaText = "x" 3.3597 3.3598 - <style title> does not "have" a title 3.3599 + <style> does not "have" a title 3.3600 3.3601 .cascadedStyle that returns less keywords than currentStyle, no inherit, 3.3602 etc. 3.3603 3.3604 Markup style: http://krijnhoetmer.nl/irc-logs/whatwg/20100204#l-529 3.3605 --> 3.3606 - </body> 3.3607 + 3.3608 + 3.3609 + 3.3610 +</body> 3.3611 </html> 3.3612 -
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/cssom/README Mon Jul 16 00:55:13 2012 -0600 4.3 @@ -0,0 +1,57 @@ 4.4 +SUMMARY 4.5 + 4.6 +The CSSOM specifications are in the process of being transitioned from a 4.7 +predominantly ANOLIS based processing tool to a combination of (1) a custom 4.8 +pre-processor tool that uses WebIDL.js and (2) ANOLIS as a post-processor. 4.9 +The goal of this change is to shift from using WebIDL embedded in HTML to HTML 4.10 +embedded in WebIDL for the purpose of defining the source IDL specification 4.11 +content. In the editors' opinion, this change permits better (automatic) 4.12 +verification of IDL correctness along with subsequent HTML correctness. 4.13 + 4.14 +More documentation on this custom tool will be provided before publishing a 4.15 +new WD of the CSSOM specifications. So please remain patient if you are 4.16 +looking for more details. 4.17 + 4.18 +Note that substantial changes to the custom tool (organization, processing, 4.19 +and syntax usage) are expected before concluding the above transition. 4.20 + 4.21 +NOTES FOR EDITORS 4.22 + 4.23 +1. At the current time, the pre-processor tool requires a modified version of 4.24 +WebIDL.js in order to support (1) string valued extended attributes and (2) 4.25 +extended attributes on typedefs and other extended attributes, e.g., 4.26 +Constructor. 4.27 + 4.28 +2. At the current time, due to use of the C pre-processor to aggregate IDL 4.29 +file definitions, the value of 'Documentation' extended attributes must not 4.30 +contain an unescaped NEWLINE, meaning that values composed of multiple lines 4.31 +must use C pre-processor style continuation lines, i.e., end in a backslash 4.32 +character. This requirement is temporary and expected to go away in the 4.33 +near future. 4.34 + 4.35 +TO DO 4.36 + 4.37 +1. IDL Pre-Processor Related 4.38 + 4.39 +* Enumerate constructors in a manner similar to attributes/operations. 4.40 +* Perform keyword substitution in constructor documentation. 4.41 +* Enumerate constant members. 4.42 +* Generate typedef and implements definitions. 4.43 +* Generate extended attributes, e.g., PutForwards, NoInterfaceObject, etc. 4.44 +* Generate setters, getters (not presently used in CSSOM IDL definitions). 4.45 +* Remove coded-in file names (e.g., cssom.json), accepting on command line. 4.46 + 4.47 +2. Content Related 4.48 + 4.49 +* Substitute correct W3C copyright notice. 4.50 +* Restore named properties (i.e., CSS2Properties) on CSSStyleDeclaration. 4.51 +* Reorganize content sections, reordering aggregating/dividing as needed. 4.52 +* Fill in implicit TBDs. 4.53 +* Address outstanding bugs. 4.54 + 4.55 +3. Miscellaneous 4.56 + 4.57 +* Push WebIDL.js patch to DAP; push editor's working version to github. 4.58 +* Ensure any necessary changes to HTML5 parser or ANOLIS are posted. 4.59 +* Document custom build tools/process. 4.60 +* Integrate child (IDL) and parent (Overview.html) makefiles.
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/cssom/cssom-generate.js Mon Jul 16 00:55:13 2012 -0600 5.3 @@ -0,0 +1,825 @@ 5.4 +(function() { 5.5 + var HTML5 = require('html5'), 5.6 + events = require('events'), 5.7 + util = require('util'), 5.8 + fs = require('fs'); 5.9 + var output = ''; 5.10 + var p = new HTML5.Parser(); 5.11 + var eol = '\n'; 5.12 + function needsEOL(ln,end) { 5.13 + if ( ( ln == 'html' ) && ! end ) { 5.14 + return eol; 5.15 + } else if ( ( ln == 'body' ) && end ) { 5.16 + return eol; 5.17 + } else { 5.18 + return ''; 5.19 + } 5.20 + } 5.21 + var ANOLIS_BOOLEAN_ATTRIBUTES = [ 5.22 + 'data-anolis-ref' 5.23 + ]; 5.24 + function isBooleanAttr(ln,n) { 5.25 + if ( ( HTML5.BOOLEAN_ATTRIBUTES [ ln ] || [] ).indexOf(n) != -1 ) { 5.26 + return true; 5.27 + } else if ( ANOLIS_BOOLEAN_ATTRIBUTES.indexOf(n) != -1 ) { 5.28 + return true; 5.29 + } else { 5.30 + return false; 5.31 + } 5.32 + } 5.33 + var rSub = new RegExp ( /^\{@([^\}]*)\}$/ ); 5.34 + function getSubstitutionComment(comment) { 5.35 + var m = rSub.exec ( comment ); 5.36 + if ( m && ( m.length > 1 ) ) { 5.37 + return m[1]; 5.38 + } else { 5.39 + return null; 5.40 + } 5.41 + } 5.42 + function isIDLComment(comment) { 5.43 + var c = getSubstitutionComment ( comment ); 5.44 + return c && ( c.search ( /^idl[a-zA-Z]*\([^\)]*\)$/ ) == 0 ); 5.45 + } 5.46 + var rIdl = new RegExp ( /^(idl[a-zA-Z]*)\(([^\)]*)\)$/ ); 5.47 + var rSep = new RegExp ( /\s*,\s*/ ); 5.48 + function processIDLComment(idl,comment) { 5.49 + var m = rIdl.exec ( getSubstitutionComment ( comment ) ); 5.50 + if ( m && ( m.length > 2 ) ) { 5.51 + return formatIDLComment ( idl, m[1], m[2].split(rSep) ); 5.52 + } else { 5.53 + return ''; 5.54 + } 5.55 + } 5.56 + function hasArg(args,arg,skip) { 5.57 + if ( skip === 'undefined' ) { 5.58 + skip = 0; 5.59 + } 5.60 + var n = 0; 5.61 + for ( var i in args ) { 5.62 + if ( n++ < skip ) { 5.63 + continue; 5.64 + } else { 5.65 + var a = args[i].split('='); 5.66 + if ( a[0] == arg ) { 5.67 + return true; 5.68 + } 5.69 + } 5.70 + } 5.71 + return false; 5.72 + } 5.73 + function getArgValue(args,arg,skip) { 5.74 + if ( skip === 'undefined' ) { 5.75 + skip = 0; 5.76 + } 5.77 + var n = 0; 5.78 + for ( var i in args ) { 5.79 + if ( n++ < skip ) { 5.80 + continue; 5.81 + } else { 5.82 + var a = args[i].split('='); 5.83 + if ( a[0] == arg ) { 5.84 + return ( a.length > 1 ) ? a[1] : ''; 5.85 + } 5.86 + } 5.87 + } 5.88 + return ''; 5.89 + } 5.90 + function formatIDLComment(idl,method,args) { 5.91 + if ( method == 'idl' ) { 5.92 + return formatIDL ( idl, args ); 5.93 + } else if ( method == 'idlDef' ) { 5.94 + return formatIDLDef ( idl, args ); 5.95 + } else if ( method == 'idlDoc' ) { 5.96 + return formatIDLDoc ( idl, args ); 5.97 + } else if ( method == 'idlDocMembers' ) { 5.98 + return formatIDLDocMembers ( idl, args ); 5.99 + } else if ( method == 'idlDocConstructors' ) { 5.100 + return formatIDLDocConstructors ( idl, args ); 5.101 + } else { 5.102 + return ''; 5.103 + } 5.104 + } 5.105 + function formatIDL(idl,args) { 5.106 + var s = ''; 5.107 + s += formatIDLDoc ( idl, args ); 5.108 + s += formatIDLDef ( idl, args ); 5.109 + s += formatIDLDocMembers ( idl, args ); 5.110 + s += formatIDLDocConstructors ( idl, args ); 5.111 + return s; 5.112 + } 5.113 + function formatIDLDef(idl,args) { 5.114 + var n = args[0]; 5.115 + for ( var i in idl ) { 5.116 + var d = idl[i]; 5.117 + if ( !! d.name && ( d.name == n ) ) { 5.118 + return formatIDLDefinition ( d, args ); 5.119 + } else if ( !! d.target && ( d.target == n ) ) { 5.120 + return formatIDLDefinition ( d, args ); 5.121 + } 5.122 + } 5.123 + return ''; 5.124 + } 5.125 + function formatIDLDefinition(def,args) { 5.126 + var t = def.type; 5.127 + if ( t == 'interface' ) { 5.128 + return formatIDLInterface ( def, false, args ); 5.129 + } else if ( t == 'partialinterface' ) { 5.130 + return formatIDLInterface ( def, true, args ); 5.131 + } else if ( t == 'typedef' ) { 5.132 + return formatIDLTypedef ( def, args ); 5.133 + } else if ( t == 'implements' ) { 5.134 + return formatIDLImplements ( def, args ); 5.135 + } else { 5.136 + return '[[TBD - ' + t + ']]'; 5.137 + } 5.138 + } 5.139 + function formatIDLInterface(def,partial,args) { 5.140 + var n = def.name; 5.141 + var x = def.inheritance; 5.142 + var s = ''; 5.143 + s += eol; 5.144 + s += eltStart ( 'pre', [ newAttr ( 'class', 'idl' ) ], false ); 5.145 + s += eltStart ( 'span', [ newAttr ( 'class', 'idlInterface' ), newAttr ( 'id', generateIDLDefinitionID ( def ) ) ], false ); 5.146 + if ( partial ) { 5.147 + s += 'partial' + ' '; 5.148 + } 5.149 + s += 'interface' + ' '; 5.150 + s += eltStart ( 'span', [ newAttr ( 'class', 'idlInterfaceID' ) ], false ); 5.151 + s += n; 5.152 + s += eltEnd ( 'span', false ); 5.153 + if ( x ) { 5.154 + // TBD 5.155 + } 5.156 + s += ' ' + '{' + eol; 5.157 + for ( var i in def.members ) { 5.158 + var m = def.members [ i ]; 5.159 + var f = formatIDLMember ( def, m, args ); 5.160 + if ( f != '' ) { 5.161 + s += f + '\n'; 5.162 + } 5.163 + } 5.164 + s += '};'; 5.165 + s += eltEnd ( 'span', false ); 5.166 + s += eltEnd ( 'pre', true ); 5.167 + return s; 5.168 + } 5.169 + function formatIDLMember(def, mem, args) { 5.170 + if ( mem.type == 'attribute' ) { 5.171 + return formatIDLAttrMember ( def, mem, args ); 5.172 + } else if ( mem.type == 'operation' ) { 5.173 + return formatIDLOperMember ( def, mem, args ); 5.174 + } else { 5.175 + return ''; 5.176 + } 5.177 + } 5.178 + function formatIDLAttrMember(def, mem, args) { 5.179 + var n = mem.name; 5.180 + var s = ''; 5.181 + s += eltStart ( 'span', [ newAttr ( 'class', 'idlAttribute' ) ], false ); 5.182 + s += ' '; 5.183 + if ( mem.stringifier ) { 5.184 + s += ' stringifier'; 5.185 + } 5.186 + if ( mem.readonly ) { 5.187 + s += ' readonly'; 5.188 + } 5.189 + s += ' '; 5.190 + s += 'attribute'; 5.191 + s += ' '; 5.192 + s += formatIDLAttrType ( def, mem, mem.idlType, false, args ); 5.193 + s += ' '; 5.194 + s += eltStart ( 'span', [ newAttr ( 'class', 'idlAttrName' ) ], false ); 5.195 + s += eltStart ( 'a', [ newAttr ( 'href', generateIDLAttrIDRef ( def, mem ) ) ], false ); 5.196 + s += n; 5.197 + s += eltEnd ( 'a', false ); 5.198 + s += eltEnd ( 'span', false ); 5.199 + s += ';'; 5.200 + s += eltEnd ( 'span', false ); 5.201 + return s; 5.202 + } 5.203 + function generateIDRef ( id ) { 5.204 + return '#' + id; 5.205 + } 5.206 + var IDL_ID_PREFIX = 'widl'; 5.207 + function generateIDLDefinitionID(def) { 5.208 + return IDL_ID_PREFIX + '-def-' + def.name; 5.209 + } 5.210 + function generateIDLMemberID(def, mem) { 5.211 + if ( mem.type == 'attribute' ) { 5.212 + return generateIDLAttrID ( def, mem ); 5.213 + } else if ( mem.type == 'operation' ) { 5.214 + return generateIDLOperID ( def, mem ); 5.215 + } else { 5.216 + return ''; 5.217 + } 5.218 + } 5.219 + function generateIDLAttrID(def, mem) { 5.220 + return IDL_ID_PREFIX + '-' + def.name + '-' + mem.name; 5.221 + } 5.222 + function generateIDLAttrIDRef(def, mem) { 5.223 + return generateIDRef ( generateIDLAttrID ( def, mem ) ); 5.224 + } 5.225 + function formatIDLAttrType(def, mem, type, verbose, args) { 5.226 + return formatIDLType ( def, mem, type, 'idlAttrType', verbose, args ); 5.227 + } 5.228 + function formatIDLOperMember(def, mem, args) { 5.229 + var n = mem.name; 5.230 + var s = ''; 5.231 + s += eltStart ( 'span', [ newAttr ( 'class', 'idlMethod' ) ], false ); 5.232 + s += ' '; 5.233 + s += formatIDLOperType ( def, mem, mem.idlType, false, args ); 5.234 + s += ' '; 5.235 + s += eltStart ( 'span', [ newAttr ( 'class', 'idlMethName' ) ], false ); 5.236 + s += eltStart ( 'a', [ newAttr ( 'href', generateIDLOperIDRef ( def, mem ) ) ], false ); 5.237 + s += n; 5.238 + s += eltEnd ( 'a', false ); 5.239 + s += eltEnd ( 'span', false ); 5.240 + s += ' '; 5.241 + s += '('; 5.242 + for ( var i in mem.arguments ) { 5.243 + var p = mem.arguments [ i ]; 5.244 + if ( i > 0 ) { 5.245 + s += ', '; 5.246 + } 5.247 + s += formatIDLOperParam ( def, mem, p, i, false, args ); 5.248 + } 5.249 + s += ')'; 5.250 + s += ';'; 5.251 + s += eltEnd ( 'span', false ); 5.252 + return s; 5.253 + } 5.254 + function formatIDLOperSignature(def, mem, includeReturnType, args) { 5.255 + var s = ''; 5.256 + s += ' '; 5.257 + s += '('; 5.258 + for ( var i in mem.arguments ) { 5.259 + var p = mem.arguments [ i ]; 5.260 + if ( i > 0 ) { 5.261 + s += ', '; 5.262 + } 5.263 + s += formatIDLOperParam ( def, mem, p, i, true, args ); 5.264 + } 5.265 + s += ')'; 5.266 + if ( !! includeReturnType ) { 5.267 + s += ', returns '; 5.268 + s += formatIDLOperType ( def, mem, mem.idlType, false, args ); 5.269 + } 5.270 + return s; 5.271 + } 5.272 + function generateIDLOperID(def, mem) { 5.273 + var s = ''; 5.274 + s += IDL_ID_PREFIX; 5.275 + s += '-'; 5.276 + s += def.name; 5.277 + s += '-'; 5.278 + s += mem.name; 5.279 + if ( ( mem.idlType != 'void' ) || ( mem.arguments.length > 0 ) ) { 5.280 + s += '-'; 5.281 + s += generateIDLOperTypeID ( def, mem, mem.idlType ); 5.282 + } 5.283 + for ( var i in mem.arguments ) { 5.284 + var p = mem.arguments [ i ]; 5.285 + s += '-'; 5.286 + s += generateIDLOperParamID ( def, mem, p ); 5.287 + } 5.288 + return s; 5.289 + } 5.290 + function generateIDLOperIDRef(def, mem) { 5.291 + return '#' + generateIDLOperID ( def, mem ); 5.292 + } 5.293 + function formatIDLOperType(def, mem, type, verbose, args) { 5.294 + return formatIDLType ( def, mem, type, 'idlMethType', verbose, args ); 5.295 + } 5.296 + function generateIDLOperTypeID(def, mem, type) { 5.297 + return generateIDLTypeID ( def, mem, type ); 5.298 + } 5.299 + function formatIDLOperParam(def, mem, param, index, isSignature, args) { 5.300 + var s = ''; 5.301 + s += eltStart ( 'span', [ newAttr ( 'class', 'idlParam' ) ], false ); 5.302 + if ( !! param.optional ) { 5.303 + s += 'optional '; 5.304 + } 5.305 + s += formatIDLParamType ( def, mem, param.type, false, args ); 5.306 + if ( ! isSignature ) { 5.307 + s += ' '; 5.308 + s += eltStart ( 'span', [ newAttr ( 'class', 'idlParamName' ) ], false ); 5.309 + s += param.name; 5.310 + s += eltEnd ( 'span', false ); 5.311 + } 5.312 + s += eltEnd ( 'span', false ); 5.313 + return s; 5.314 + } 5.315 + function generateIDLOperParamID(def, mem, param) { 5.316 + var s = ''; 5.317 + s += generateIDLTypeID ( def, mem, param.type ); 5.318 + s += '-'; 5.319 + s += param.name; 5.320 + return s; 5.321 + } 5.322 + function formatIDLParamType(def, mem, type, verbose, args) { 5.323 + return formatIDLType ( def, mem, type, 'idlParamType', verbose, args ); 5.324 + } 5.325 + function formatIDLType(def, mem, type, cssClass, verbose, args) { 5.326 + var s = ''; 5.327 + if ( !! verbose ) { 5.328 + s += ' of type '; 5.329 + } 5.330 + if ( !! cssClass ) { 5.331 + s += eltStart ( 'span', [ newAttr ( 'class', cssClass ) ], false ); 5.332 + } 5.333 + s += eltStart ( 'a', [], false ); 5.334 + s += type.idlType || type; 5.335 + s += eltEnd ( 'a', false ); 5.336 + if ( ! verbose && !! type.nullable ) { 5.337 + s += '?'; 5.338 + } 5.339 + if ( !! cssClass ) { 5.340 + s += eltEnd ( 'span', false ); 5.341 + } 5.342 + if ( !! verbose ) { 5.343 + if ( !! mem.readonly ) { 5.344 + s += ', readonly'; 5.345 + } 5.346 + if ( !! mem.nullable ) { 5.347 + s += ', nullable'; 5.348 + } 5.349 + } 5.350 + return s; 5.351 + } 5.352 + function generateIDLTypeID(def, mem, type) { 5.353 + return hyphenateForID ( type.idlType || type ); 5.354 + } 5.355 + function hyphenateForID(token) { 5.356 + var t = token; 5.357 + t = t.replace ( / /g, '-' ); 5.358 + t = t.replace ( /_/g, '-' ); 5.359 + return t; 5.360 + } 5.361 + function formatIDLTypedef(def,partial,args) { 5.362 + var s = ''; 5.363 + s += eol; 5.364 + s += eltStart ( 'pre', [ newAttr ( 'class', 'idl' ) ], false ); 5.365 + s += '[[TBD - TYPEDEF]]\n'; 5.366 + s += eltEnd ( 'pre', true ); 5.367 + return s; 5.368 + } 5.369 + function formatIDLImplements(def,partial,args) { 5.370 + var s = ''; 5.371 + s += eol; 5.372 + s += eltStart ( 'pre', [ newAttr ( 'class', 'idl' ) ], false ); 5.373 + s += '[[TBD - IMPLEMENTS]]\n'; 5.374 + s += eltEnd ( 'pre', true ); 5.375 + return s; 5.376 + } 5.377 + function generateIDLOtherID(def, mem) { 5.378 + var s = ''; 5.379 + s += IDL_ID_PREFIX; 5.380 + s += '-'; 5.381 + s += def.name; 5.382 + if ( mem ) { 5.383 + s += '-'; 5.384 + s += mem.name; 5.385 + } 5.386 + return s; 5.387 + } 5.388 + function getIDLMemberID(def,mem,args) { 5.389 + if ( mem.type == 'attribute' ) { 5.390 + return generateIDLAttrID ( def, mem ); 5.391 + } else if ( mem.type == 'operation' ) { 5.392 + return generateIDLOperID ( def, mem ); 5.393 + } else { 5.394 + return generateIDLOtherID ( def, mem ); 5.395 + } 5.396 + } 5.397 + function getIDLMemberCSSClass(def,mem,args) { 5.398 + if ( mem.type == 'constant' ) { 5.399 + return 'idlConst'; 5.400 + } else if ( mem.type == 'attribute' ) { 5.401 + return 'idlAttr'; 5.402 + } else if ( mem.type == 'operation' ) { 5.403 + return 'idlMethod'; 5.404 + } else { 5.405 + return 'unknown'; 5.406 + } 5.407 + } 5.408 + function getIDLMemberTermCSSClass(def,mem,args) { 5.409 + if ( mem.type == 'constant' ) { 5.410 + return 'constant'; 5.411 + } else if ( mem.type == 'attribute' ) { 5.412 + return 'attribute'; 5.413 + } else if ( mem.type == 'operation' ) { 5.414 + return 'method'; 5.415 + } else { 5.416 + return 'unknown'; 5.417 + } 5.418 + } 5.419 + function getIDLMembersHeader(cssClass) { 5.420 + if ( cssClass == 'attributes' ) { 5.421 + return 'Attributes'; 5.422 + } else if ( cssClass == 'constants' ) { 5.423 + return 'Constants'; 5.424 + } else if ( cssClass == 'constructors' ) { 5.425 + return 'Constructors'; 5.426 + } else if ( cssClass == 'members' ) { 5.427 + return 'Members'; 5.428 + } else if ( cssClass == 'methods' ) { 5.429 + return 'Methods'; 5.430 + } else { 5.431 + return '[TBD] - Unmapped CSS Class - ' + cssClass; 5.432 + } 5.433 + } 5.434 + function wrap(s,en,getAttrs,newLine,def,mem,args) { 5.435 + var sNew = ''; 5.436 + sNew += eltStart ( en, getAttrs && getAttrs ( def, mem, args ), newLine ); 5.437 + sNew += s; 5.438 + sNew += eltEnd ( en, newLine ); 5.439 + return sNew; 5.440 + } 5.441 + function join(strings,sep) { 5.442 + var s = ''; 5.443 + for ( var i in strings ) { 5.444 + if ( sep && ( s.length > 0 ) ) { 5.445 + s += sep; 5.446 + } 5.447 + s += strings[i]; 5.448 + } 5.449 + return s; 5.450 + } 5.451 + var rKeyPattern = new RegExp ( /(\{@[^\}]*\})/ ); 5.452 + var rKey = new RegExp ( /\{@([^\}]*)\}/ ); 5.453 + function performKeywordSubs(s,subs) { 5.454 + var sa = s.split ( rKeyPattern ); 5.455 + for ( var i in sa ) { 5.456 + var p = sa[i]; 5.457 + var m = rKey.exec ( p ); 5.458 + if ( m && ( m.length > 1 ) ) { 5.459 + var k = m[1]; 5.460 + if ( subs && !! subs[k] ) { 5.461 + sa[i] = subs[k]; 5.462 + } 5.463 + } 5.464 + } 5.465 + return join ( sa ); 5.466 + } 5.467 + function formatIDLDoc(idl,args) { 5.468 + var n = args[0]; 5.469 + for ( var i in idl ) { 5.470 + var d = idl[i]; 5.471 + if ( !! d.name && ( d.name == n ) ) { 5.472 + return formatIDLDefinitionDoc ( d, args ); 5.473 + } else if ( !! d.target && ( d.target == n ) ) { 5.474 + return formatIDLDefinitionDoc ( d, args ); 5.475 + } 5.476 + } 5.477 + return ''; 5.478 + } 5.479 + function formatIDLDefinitionDoc(def,args) { 5.480 + for ( var i in def.extAttrs ) { 5.481 + var xa = def.extAttrs[i]; 5.482 + if ( !! xa.name && ( xa.name == 'Documentation' ) ) { 5.483 + return performKeywordSubs ( xa.value || '', collectIDLDefinitionKeywords ( def, args ) ); 5.484 + } 5.485 + } 5.486 + return ''; 5.487 + } 5.488 + function getIDLConstructorCount(def) { 5.489 + var nc = 0; 5.490 + for ( var i in def.extAttrs ) { 5.491 + var xa = def.extAttrs[i]; 5.492 + if ( xa.name == 'Constructor' ) { 5.493 + nc++; 5.494 + } 5.495 + } 5.496 + return nc; 5.497 + } 5.498 + function collectIDLDefinitionKeywords(def,args) { 5.499 + return { 5.500 + type: def.type, 5.501 + name: formatAsCode ( def.name ), 5.502 + link: formatIDLDefinitionNameAsLink ( def, args ), 5.503 + memberCount: !! def.members ? def.members.length : 0, 5.504 + constructorCount: getIDLConstructorCount ( def ) 5.505 + }; 5.506 + } 5.507 + function formatIDLDefinitionNameAsLink(def,args) { 5.508 + return formatAsLink ( def.name, 'idlType', generateIDRef ( generateIDLDefinitionID ( def, args ) ), args ); 5.509 + } 5.510 + function formatIDLDocMembers(idl,args) { 5.511 + var n = args[0]; 5.512 + for ( var i in idl ) { 5.513 + var d = idl[i]; 5.514 + if ( !! d.name && ( d.name == n ) ) { 5.515 + return formatIDLDefinitionDocMembers ( d, args ); 5.516 + } else if ( !! d.target && ( d.target == n ) ) { 5.517 + return formatIDLDefinitionDocMembers ( d, args ); 5.518 + } 5.519 + } 5.520 + return ''; 5.521 + } 5.522 + function formatIDLDefinitionDocMembers(def,args) { 5.523 + if ( hasArg ( args, 'uncollatedMembers' ) ) { 5.524 + return formatIDLDefinitionDocMembersUncollated ( def, args ); 5.525 + } else { 5.526 + return formatIDLDefinitionDocMembersCollated ( def, args ); 5.527 + } 5.528 + } 5.529 + function countConstMembers(def,args) { 5.530 + return countMembers ( 'constant', def, args ); 5.531 + } 5.532 + function countAttrMembers(def,args) { 5.533 + return countMembers ( 'attribute', def, args ); 5.534 + } 5.535 + function countOperMembers(def,args) { 5.536 + return countMembers ( 'operation', def, args ); 5.537 + } 5.538 + function countMembers(type,def,args) { 5.539 + var n = 0; 5.540 + for ( var i in def.members ) { 5.541 + var m = def.members[i]; 5.542 + if ( m.type == type ) { 5.543 + n++; 5.544 + } 5.545 + } 5.546 + return n; 5.547 + } 5.548 + function formatIDLDefinitionDocMembersCollated(def,args) { 5.549 + var s = ''; 5.550 + if ( countConstMembers ( def, args ) > 0 ) { 5.551 + s += formatIDLDefinitionDocConstMembers ( def, args ); 5.552 + } 5.553 + if ( countAttrMembers ( def, args ) > 0 ) { 5.554 + s += formatIDLDefinitionDocAttrMembers ( def, args ); 5.555 + } 5.556 + if ( countOperMembers ( def, args ) > 0 ) { 5.557 + s += formatIDLDefinitionDocOperMembers ( def, args ); 5.558 + } 5.559 + return s; 5.560 + } 5.561 + function formatIDLDefinitionDocMembersUncollated(def,args) { 5.562 + return formatIDLDefinitionDocAllMembers ( def, args ); 5.563 + } 5.564 + function formatIDLDefinitionDocConstMembers(def,args) { 5.565 + return formatIDLDefinitionDocMembersByType ( 'constant', def, args ); 5.566 + } 5.567 + function formatIDLDefinitionDocAttrMembers(def,args) { 5.568 + return formatIDLDefinitionDocMembersByType ( 'attribute', def, args ); 5.569 + } 5.570 + function formatIDLDefinitionDocOperMembers(def,args) { 5.571 + return formatIDLDefinitionDocMembersByType ( 'operation', def, args ); 5.572 + } 5.573 + function formatIDLDefinitionDocAllMembers(def,args) { 5.574 + return formatIDLDefinitionDocMembersByType ( null, def, args ); 5.575 + } 5.576 + function getIDLDefinitionListCSSClass(type) { 5.577 + if ( type == 'constant' ) { 5.578 + return 'constants'; 5.579 + } else if ( type == 'attribute' ) { 5.580 + return 'attributes'; 5.581 + } else if ( type == 'operation' ) { 5.582 + return 'methods'; 5.583 + } else if ( type == 'constant' ) { 5.584 + return 'constants'; 5.585 + } else { 5.586 + return 'members'; 5.587 + } 5.588 + } 5.589 + function formatIDLDefinitionDocMembersByType(type,def,args) { 5.590 + var s = ''; 5.591 + var c = getIDLDefinitionListCSSClass ( type ); 5.592 + s += formatIDLDefinitionDocMembersHeader ( type, def, args, c ); 5.593 + s += eltStart ( 'dl', [ newAttr ( 'class', c ) ], true ); 5.594 + for ( var i in def.members ) { 5.595 + var m = def.members[i]; 5.596 + if ( ! type || ( m.type == type ) ) { 5.597 + s += formatIDLMemberTerm ( def, m, args ); 5.598 + s += formatIDLMemberDefinition ( def, m, args ); 5.599 + } 5.600 + } 5.601 + s += eltEnd ( 'dl', true ); 5.602 + return s; 5.603 + } 5.604 + function formatIDLDefinitionDocMembersHeader(type,def,args,cssClass) { 5.605 + var s = ''; 5.606 + if ( hasArg ( args, 'level' ) ) { 5.607 + var level = parseInt ( getArgValue ( args, 'level' ) ) + 1; 5.608 + var heading = 'h' + level; 5.609 + s += eltStart ( heading, [ newAttr ( 'class', 'no-toc' ), newAttr ( 'id', generateIDLOtherID ( def ) + '-' + cssClass ) ], false ); 5.610 + s += getIDLMembersHeader ( cssClass ); 5.611 + s += eltEnd ( heading, true ); 5.612 + } 5.613 + return s; 5.614 + } 5.615 + function formatIDLMemberTerm(def,mem,args) { 5.616 + var getDTAttrs = function(def,mem,args) { 5.617 + return [ newAttr ( 'class', getIDLMemberTermCSSClass ( def, mem, args ), newAttr ( 'id', getIDLMemberID ( def, mem, args ) ) ) ]; 5.618 + }; 5.619 + return wrap ( formatIDLMemberTermContent ( def, mem, args ), 'dt', getDTAttrs, true, def, mem, args ); 5.620 + } 5.621 + function formatIDLMemberTermContent(def,mem,args) { 5.622 + var s = formatAsCode ( mem.name ); 5.623 + if ( mem.type == 'attribute' ) { 5.624 + s += formatIDLAttrType ( def, mem, mem.idlType, true, args ); 5.625 + } else if ( mem.type == 'operation' ) { 5.626 + s += formatIDLOperSignature ( def, mem, true, args ); 5.627 + } 5.628 + return s; 5.629 + } 5.630 + function wrapIDLMemberDD(s,def,mem,args) { 5.631 + return wrap ( s, 'dd', null, true, def, mem, args ); 5.632 + } 5.633 + function formatIDLMemberDefinition(def,mem,args) { 5.634 + for ( var i in mem.extAttrs ) { 5.635 + var xa = mem.extAttrs[i]; 5.636 + if ( !! xa.name && ( xa.name == 'Documentation' ) ) { 5.637 + return wrapIDLMemberDD ( performKeywordSubs ( xa.value || '', collectIDLMemberKeywords ( def, mem, args ) ), def, mem, args ); 5.638 + } 5.639 + } 5.640 + return ''; 5.641 + } 5.642 + function getIDLOperParamsSignature(mem,sep) { 5.643 + var s = ''; 5.644 + for ( var i in mem.arguments ) { 5.645 + var a = mem.arguments[i]; 5.646 + if ( sep && ( s.length > 0 ) ) { 5.647 + s += sep; 5.648 + } 5.649 + } 5.650 + return s; 5.651 + } 5.652 + function getIDLMemberSignature(mem) { 5.653 + if ( mem.type == 'operation' ) { 5.654 + return '(' + getIDLOperParamsSignature ( mem, ',' ) + ')'; 5.655 + } else { 5.656 + return ''; 5.657 + } 5.658 + } 5.659 + function collectIDLMemberKeywords(def,mem,args) { 5.660 + return { 5.661 + type: mem.type, 5.662 + name: formatAsCode ( mem.name ), 5.663 + link: formatIDLMemberNameAsLink ( def, mem, args ), 5.664 + signature: getIDLMemberSignature ( mem ) 5.665 + }; 5.666 + } 5.667 + function formatIDLMemberNameAsLink(def,mem,args) { 5.668 + return formatAsLink ( mem.name, getIDLMemberCSSClass ( def, mem, args ), generateIDRef ( generateIDLMemberID ( def, mem, args ) ), args ); 5.669 + } 5.670 + function formatIDLDocConstructors(idl,args) { 5.671 + var n = args[0]; 5.672 + for ( var i in idl ) { 5.673 + var d = idl[i]; 5.674 + if ( !! d.name && ( d.name == n ) ) { 5.675 + return formatIDLDefinitionDocConstructors ( d, args ); 5.676 + } else if ( !! d.target && ( d.target == n ) ) { 5.677 + return formatIDLDefinitionDocConstructors ( d, args ); 5.678 + } 5.679 + } 5.680 + return ''; 5.681 + } 5.682 + function formatIDLDefinitionDocConstructors(def,args) { 5.683 + var s = ''; 5.684 + for ( var i in def.extAttrs ) { 5.685 + var xa = def.extAttrs[i]; 5.686 + if ( !! xa.name && ( xa.name == 'Constructor' ) ) { 5.687 + s += formatIDLConstructorDoc ( def, xa, args ); 5.688 + } 5.689 + } 5.690 + return s; 5.691 + } 5.692 + function formatIDLConstructorDoc(def,cons,args) { 5.693 + for ( var i in cons.extAttrs ) { 5.694 + var xa = cons.extAttrs[i]; 5.695 + if ( !! xa.name && ( xa.name == 'Documentation' ) ) { 5.696 + return performKeywordSubs ( xa.value || '', collectIDLConstructorKeywords ( def, cons, args ) ); 5.697 + } 5.698 + } 5.699 + return ''; 5.700 + } 5.701 + function collectIDLConstructorKeywords(def,cons,args) { 5.702 + return {}; 5.703 + } 5.704 + function newAttr(n,v) { 5.705 + return { nodeName: n, nodeValue: v }; 5.706 + } 5.707 + function eltStartMaybeEmpty(ln,attrs,empty,newLine) { 5.708 + var s = '<' + ln; 5.709 + for ( var i in attrs ) { 5.710 + var a = attrs[i]; 5.711 + s += ' ' + formatAttr ( a, ln ); 5.712 + } 5.713 + if ( empty ) { 5.714 + s += '/'; 5.715 + } 5.716 + s += '>' + ( newLine ? eol : '' ); 5.717 + return s; 5.718 + } 5.719 + function eltEmpty(ln,attrs,newLine) { 5.720 + return eltStartMaybeEmpty(ln,attrs,true,newLine); 5.721 + } 5.722 + function eltStart(ln,attrs,newLine) { 5.723 + return eltStartMaybeEmpty(ln,attrs,false,newLine); 5.724 + } 5.725 + function eltEnd(ln,newLine) { 5.726 + var s = '</' + ln + '>' + ( newLine ? eol : '' ); 5.727 + return s; 5.728 + } 5.729 + function formatAsCode(s) { 5.730 + return wrap ( s, 'code' ); 5.731 + } 5.732 + function formatAsLink(inner,cssClass,href,args) { 5.733 + var s = ''; 5.734 + var aa = []; 5.735 + if ( !! cssClass ) { 5.736 + aa.push ( newAttr ( 'class', cssClass ) ); 5.737 + } 5.738 + if ( !! href ) { 5.739 + aa.push ( newAttr ( 'href', href ) ); 5.740 + } 5.741 + s += eltStart ( 'a', aa ); 5.742 + s += formatAsCode ( inner ); 5.743 + s += eltEnd ( 'a' ); 5.744 + return s; 5.745 + } 5.746 + var rQuote = new RegExp ( '[' + HTML5.SPACE_CHARACTERS_IN + '<=>\'\"' + ']' ); 5.747 + var alwaysQuote = true; 5.748 + function formatAttr(a,ln) { 5.749 + var n = a.nodeName; 5.750 + var v = a.nodeValue; 5.751 + var s = n; 5.752 + if ( ! isBooleanAttr ( ln, n ) ) { 5.753 + var quote = alwaysQuote || ( v.length == 0 ) || rQuote.test ( v ); 5.754 + s += '='; 5.755 + if ( quote ) { 5.756 + s += '"'; 5.757 + } 5.758 + v = v.replace ( /&/g, '&' ); 5.759 + v = v.replace ( /\"/g, '"' ); 5.760 + v = v.replace ( /</g, '<' ); 5.761 + v = v.replace ( />/g, '>' ); 5.762 + s += v; 5.763 + if ( quote ) { 5.764 + s += '"'; 5.765 + } 5.766 + } 5.767 + return s; 5.768 + } 5.769 + function formatChars(chars,ln) { 5.770 + var newChars = chars; 5.771 + newChars = newChars.replace ( /&/g, '&' ); 5.772 + newChars = newChars.replace ( /</g, '<' ); 5.773 + newChars = newChars.replace ( />/g, '>' ); 5.774 + return newChars; 5.775 + } 5.776 + var $ = { 5.777 + idl : null, 5.778 + output : '', 5.779 + ondata : function(data) { 5.780 + output += data; 5.781 + }, 5.782 + ontoken : function(token) { 5.783 + if ( token.type == 'Doctype' ) { 5.784 + $.ondata ( '<!DOCTYPE ' + token.name.toLowerCase() + '>' + eol ); 5.785 + } else if ( ( token.type == 'Characters' ) || ( token.type == 'SpaceCharacters' ) ) { 5.786 + $.ondata ( formatChars ( token.data ) ); 5.787 + } else if ( ( token.type == 'StartTag' ) || ( token.type == 'EmptyTag' ) ) { 5.788 + var ln = token.name.toLowerCase(); 5.789 + var attrs = []; 5.790 + for ( var i = 0, n = token.data.length; i < n; i++ ) { 5.791 + attrs.push(token.data.item(i)); 5.792 + } 5.793 + var attributes = ''; 5.794 + for ( var i in attrs ) { 5.795 + var a = attrs [ i ]; 5.796 + attributes += ' ' + formatAttr ( a, ln ); 5.797 + } 5.798 + $.ondata ( '<' + ln + attributes + ( ( token.type == 'EmptyTag' ) ? '/' : '' ) + '>' + needsEOL ( ln, false ) ); 5.799 + } else if ( token.type == 'EndTag' ) { 5.800 + var ln = token.name.toLowerCase(); 5.801 + $.ondata ( '</' + ln + '>' + needsEOL ( ln, true ) ); 5.802 + } else if ( token.type == 'Comment' ) { 5.803 + if ( isIDLComment ( token.data ) ) { 5.804 + $.ondata ( processIDLComment ( idl, token.data ) ); 5.805 + } else { 5.806 + $.ondata ( '<!--' + token.data + '-->' ); 5.807 + } 5.808 + } else { 5.809 + } 5.810 + }, 5.811 + onend : function() { 5.812 + new HTML5.TreeWalker ( p.tree.document, $.ontoken ); 5.813 + util.puts ( output ); 5.814 + }, 5.815 + run : function(argv) { 5.816 + try { 5.817 + var sIdl = fs.readFileSync ( './idl/cssom.json', 'utf8' ); 5.818 + idl = JSON.parse ( sIdl ); 5.819 + var sDoc = fs.createReadStream ( 'cssom-source' ); 5.820 + p.on ( 'end', $.onend ); 5.821 + p.parse ( sDoc ); 5.822 + } catch ( e ) { 5.823 + util.puts ( util.inspect ( e ) ); 5.824 + } 5.825 + } 5.826 + }; 5.827 + $.run ( process.argv ); 5.828 +})(); 5.829 \ No newline at end of file
6.1 --- a/cssom/cssom-source Fri Jul 13 15:10:13 2012 -0700 6.2 +++ b/cssom/cssom-source Mon Jul 16 00:55:13 2012 -0600 6.3 @@ -3,31 +3,20 @@ 6.4 <head> 6.5 <meta charset=utf-8> 6.6 <title>CSS Object Model (CSSOM)</title> 6.7 - <style type="text/css"> 6.8 - pre.idl { border:solid thin; background:#eee; color:#000; padding:0.5em } 6.9 - pre.idl :link, pre.idl :visited { color:inherit; background:transparent } 6.10 - dfn { font-weight:bold; font-style:normal } 6.11 - .example { margin-left:1em; padding-left:1em; border-left:double; color:#222; background:#fcfcfc } 6.12 - .example table code { color:inherit } 6.13 - td, th { padding:.1em } 6.14 - .note { margin-left:2em; color:green; font-style:italic; font-weight:bold } 6.15 - p.note::before { content:"Note: " } 6.16 - .XXX { padding:.5em; border:solid red } 6.17 - p.XXX::before { content:"Issue: " } 6.18 - dl.switch { padding-left:2em } 6.19 - dl.switch > dt { text-indent:-1.5em } 6.20 - dl.switch > dt:before { content:'\21AA'; padding:0 0.5em 0 0; display:inline-block; width:1em; text-align:right; line-height:0.5em } 6.21 - code { color:orangered } 6.22 - code :link, code :visited { color:inherit } 6.23 - </style> 6.24 + <link rel="stylesheet" href="cssom.css"> 6.25 <link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS]"> 6.26 </head> 6.27 <body class="draft"> 6.28 <div class="head"> 6.29 <!--logo--> 6.30 6.31 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.32 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.33 + 6.34 <h1 id="cssom">CSS Object Model (CSSOM)</h1> 6.35 6.36 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.37 + 6.38 <h2 class="no-num no-toc" id="w3c-doctype">[LONGSTATUS] [DATE: 3 August 2002]</h2> 6.39 6.40 <dl> 6.41 @@ -37,9 +26,9 @@ 6.42 <dd class=publish><a href="[VERSION]">[VERSION]</a></dd> 6.43 6.44 <dt class=dontpublish>Participate:</dt> 6.45 - <dd class=dontpublish><a href="mailto:www-style@w3.org?subject==%5Bcssom%5D%20">www-style@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-style/">archives</a>) 6.46 - <dd class=dontpublish><a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=CSS&component=CSSOM">File a bug</a> 6.47 - <dd class=dontpublish><a href="http://wiki.whatwg.org/wiki/IRC">IRC: #css on Freenode</a> 6.48 + <dd class=dontpublish><a href="mailto:www-style@w3.org?subject==%5Bcssom%5D%20">www-style@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-style/">archives</a>)</dd> 6.49 + <dd class=dontpublish><a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=CSS&component=CSSOM">File a bug</a></dd> 6.50 + <dd class=dontpublish><a href="http://wiki.whatwg.org/wiki/IRC">IRC: #css on Freenode</a></dd> 6.51 6.52 <dt class=publish>Latest Version:</dt> 6.53 <dd class=publish><a href="[LATEST]">[LATEST]</a></dd> 6.54 @@ -55,7 +44,7 @@ 6.55 <dd><a href="http://www.w3.org/wiki/User:Gadams">Glenn Adams</a> 6.56 (<a href="http://www.cox.com/">Cox Communications, Inc.</a>) 6.57 <<a href="mailto:glenn.adams@cox.com">glenn.adams@cox.com</a>></dd> 6.58 - <dd><a href="">Shane Stephens</a> 6.59 + <dd><a>Shane Stephens</a> 6.60 (<a href="http://www.google.com/">Google, Inc.</a>) 6.61 <<a href="mailto:shans@google.com">shans@google.com</a>></dd> 6.62 6.63 @@ -77,11 +66,15 @@ 6.64 6.65 <hr class="top"> 6.66 6.67 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.68 + 6.69 <h2 class="no-num no-toc" id="abstract">Abstract</h2> 6.70 6.71 <p>CSSOM defines APIs (including generic parsing and serialization rules) 6.72 for Media Queries, Selectors, and of course CSS itself.</p> 6.73 6.74 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.75 + 6.76 <h2 class="no-num no-toc" id="sotd">Status of this Document</h2> 6.77 6.78 <p><em>This section describes the status of this document at the time of 6.79 @@ -117,14 +110,21 @@ 6.80 obsoleted by other documents at any time. It is inappropriate to cite this 6.81 document as other than work in progress.</p> 6.82 6.83 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.84 + 6.85 <h2 class="no-num no-toc" id="toc">Table of Contents</h2> 6.86 6.87 <!--toc--> 6.88 6.89 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.90 + 6.91 <h2 id="introduction">Introduction</h2> 6.92 6.93 <p class="XXX">...</p> 6.94 6.95 + <!-- ........................................................................................................................ --> 6.96 + <!-- ........................................................................................................................ --> 6.97 + 6.98 <h3 id="history">History</h3> 6.99 6.100 <p>Several interfaces from DOM Level 2 Style 6.101 @@ -134,65 +134,69 @@ 6.102 <code>DOMImplementationCSS</code> and <code>CSSCharsetRule</code> have 6.103 been removed as well as they were not deemed necessary.</p> 6.104 6.105 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.106 6.107 <h2>Conformance</h2> 6.108 6.109 -<p>All diagrams, examples, and notes in this specification are 6.110 -non-normative, as are all sections explicitly marked non-normative. 6.111 -Everything else in this specification is normative. 6.112 - 6.113 -<p>The key words "MUST", "MUST NOT", "REQUIRED", <!--"SHALL", "SHALL 6.114 -NOT",--> "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 6.115 -"OPTIONAL" in the normative parts of this document are to be 6.116 -interpreted as described in RFC2119. For readability, these words do 6.117 -not appear in all uppercase letters in this specification. 6.118 -<span data-anolis-ref>RFC2119</span> 6.119 - 6.120 -<p>Requirements phrased in the imperative as part of algorithms 6.121 -(such as "strip any leading space characters" or "return false and 6.122 -terminate these steps") are to be interpreted with the meaning of the 6.123 -key word ("must", "should", "may", etc) used in introducing the 6.124 -algorithm. 6.125 - 6.126 -<p>Conformance requirements phrased as algorithms or specific steps 6.127 -may be implemented in any manner, so long as the end result is 6.128 -equivalent. (In particular, the algorithms defined in this 6.129 -specification are intended to be easy to follow, and not intended to 6.130 -be performant.) 6.131 - 6.132 -<p id="hardwareLimitations">User agents may impose 6.133 -implementation-specific limits on otherwise unconstrained inputs, 6.134 -e.g. to prevent denial of service attacks, to guard against running 6.135 -out of memory, or to work around platform-specific limitations. 6.136 - 6.137 -<p>When a method or an attribute is said to call another method or attribute, the user agent must invoke its internal API for that attribute or method so that e.g. the author can't change the behavior by overriding attributes or methods with custom properties or functions in ECMAScript. 6.138 - 6.139 -<p>Unless otherwise stated, string comparisons are done in a 6.140 -<span data-anolis-spec=dom>case-sensitive</span> manner. 6.141 - 6.142 - 6.143 -<h2 id="terminology">Terminology</h2> 6.144 - 6.145 -<p>Terminology used in this specification is from 6.146 -<cite>DOM4</cite>, 6.147 -<cite>HTML</cite>, 6.148 -<cite>Associating Style Sheets with XML documents</cite> 6.149 -and 6.150 -<cite>XML</cite> 6.151 -<span data-anolis-ref>DOM</span> 6.152 -<span data-anolis-ref>HTML</span> 6.153 -<span data-anolis-ref>XMLSS</span> 6.154 -<span data-anolis-ref>XML</span> 6.155 - 6.156 -<p class="XXX"><dfn>supported styling language</dfn> 6.157 - 6.158 -<p>When this specification talks about object 6.159 -<code title><var>A</var></code> where <code title><var>A</var></code> is actually an interface, it generally means an object implementing interface 6.160 -<code title><var>A</var></code>.</p> 6.161 - 6.162 -<p>The term <dfn id="whitespace">whitespace</dfn> is used as defined in CSS. 6.163 -<!--XXX <a href="#ref-css">[CSS]</a>--></p> 6.164 - 6.165 + <p>All diagrams, examples, and notes in this specification are 6.166 + non-normative, as are all sections explicitly marked non-normative. 6.167 + Everything else in this specification is normative. 6.168 + 6.169 + <p>The key words "MUST", "MUST NOT", "REQUIRED", <!--"SHALL", "SHALL 6.170 + NOT",--> "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 6.171 + "OPTIONAL" in the normative parts of this document are to be 6.172 + interpreted as described in RFC2119. For readability, these words do 6.173 + not appear in all uppercase letters in this specification. 6.174 + <span data-anolis-ref>RFC2119</span> 6.175 + 6.176 + <p>Requirements phrased in the imperative as part of algorithms 6.177 + (such as "strip any leading space characters" or "return false and 6.178 + terminate these steps") are to be interpreted with the meaning of the 6.179 + key word ("must", "should", "may", etc) used in introducing the 6.180 + algorithm. 6.181 + 6.182 + <p>Conformance requirements phrased as algorithms or specific steps 6.183 + may be implemented in any manner, so long as the end result is 6.184 + equivalent. (In particular, the algorithms defined in this 6.185 + specification are intended to be easy to follow, and not intended to 6.186 + be performant.) 6.187 + 6.188 + <p id="hardwareLimitations">User agents may impose 6.189 + implementation-specific limits on otherwise unconstrained inputs, 6.190 + e.g. to prevent denial of service attacks, to guard against running 6.191 + out of memory, or to work around platform-specific limitations. 6.192 + 6.193 + <p>When a method or an attribute is said to call another method or attribute, the user agent must invoke its internal API for that attribute or method so that e.g. the author can't change the behavior by overriding attributes or methods with custom properties or functions in ECMAScript. 6.194 + 6.195 + <p>Unless otherwise stated, string comparisons are done in a 6.196 + <span data-anolis-spec=dom>case-sensitive</span> manner. 6.197 + 6.198 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.199 + 6.200 + <h2 id="terminology">Terminology</h2> 6.201 + 6.202 + <p>Terminology used in this specification is from 6.203 + <cite>DOM4</cite>, 6.204 + <cite>HTML</cite>, 6.205 + <cite>Associating Style Sheets with XML documents</cite> 6.206 + and 6.207 + <cite>XML</cite> 6.208 + <span data-anolis-ref>DOM</span> 6.209 + <span data-anolis-ref>HTML</span> 6.210 + <span data-anolis-ref>XMLSS</span> 6.211 + <span data-anolis-ref>XML</span> 6.212 + 6.213 + <p class="XXX"><dfn>supported styling language</dfn> 6.214 + 6.215 + <p>When this specification talks about object 6.216 + <code><var>A</var></code> where <code><var>A</var></code> is actually an interface, it generally means an object implementing interface 6.217 + <code><var>A</var></code>.</p> 6.218 + 6.219 + <p>The term <dfn id="whitespace">whitespace</dfn> is used as defined in CSS. 6.220 + <!--XXX <a href="#ref-css">[CSS]</a>--></p> 6.221 + 6.222 + <!-- ........................................................................................................................ --> 6.223 + <!-- ........................................................................................................................ --> 6.224 6.225 <h3>Common Serializing Idioms</h3> 6.226 6.227 @@ -211,10 +215,10 @@ 6.228 <ul> 6.229 <li>If the character is in the range U+0000 to U+001F or U+007F to 6.230 U+009F, the character 6.231 - <span title="serialize a character as code point">escaped as code point</span>. 6.232 + <span title="serialize a character as code point">escaped as code point</span>.</li> 6.233 <li>If the character is the first character and is in the range 0-9 6.234 (U+0030 to U+0039), the character 6.235 - <span title="serialize a character as code point">escaped as code point</span>. 6.236 + <span title="serialize a character as code point">escaped as code point</span>.</li> 6.237 <li>If the character is the second character and is in the range 0-9 6.238 (U+0030 to U+0039) and the first character is a "<code>-</code>" 6.239 (U+002D), the character 6.240 @@ -239,7 +243,7 @@ 6.241 <ul> 6.242 <li>If the character is in the range U+0000 to U+001F or U+007F to 6.243 U+009F, the character 6.244 - <span title="serialize a character as code point">escaped as code point</span>. 6.245 + <span title="serialize a character as code point">escaped as code point</span>.</li> 6.246 <li>If the character is '<code>"</code>' (U+0022) or '<code>\</code>' 6.247 (U+005C), the <span title="serialize a character">escaped</span> character.</li> 6.248 <li>Otherwise, the character itself.</li> 6.249 @@ -249,7 +253,7 @@ 6.250 are always serialized with '<code>"</code>' (U+0022).</p> 6.251 6.252 <p>To <dfn>serialize a URL</dfn> means to create a string represented by 6.253 - "<code title>url(</code>", followed by the 6.254 + "<code>url(</code>", followed by the 6.255 <span title="serialize a string">string escaped</span> value of the given 6.256 string, followed by "<code>)</code>".</p> 6.257 6.258 @@ -260,6 +264,7 @@ 6.259 <p>To <dfn>serialize a whitespace-separated list</dfn> concatenate all 6.260 items of the list in list order while separating them a space (U+0020).</p> 6.261 6.262 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.263 6.264 <h2>Media Queries</h2> 6.265 6.266 @@ -269,27 +274,31 @@ 6.267 6.268 <!-- XXX ref --> 6.269 6.270 + <!-- ........................................................................................................................ --> 6.271 + <!-- ........................................................................................................................ --> 6.272 + 6.273 <h3>Parsing Media Queries</h3> 6.274 6.275 <p>To 6.276 <dfn id="parse-a-media-query-list">parse a media query list</dfn> for a 6.277 - given string <var title>s</var> into a media query list is defined in 6.278 + given string <var>s</var> into a media query list is defined in 6.279 the Media Queries specification. Return the list of one or more media 6.280 queries that the algorithm defined there gives.</p> <!-- XXX ref --> 6.281 6.282 <p class="note">A media query that ends up being "ignored" will turn 6.283 - into "<code title>not all</code>".</p> 6.284 + into "<code>not all</code>".</p> 6.285 6.286 <p>To 6.287 <dfn id="parse-a-media-query">parse a media query</dfn> for a given string 6.288 - <var title>s</var> means to follow the 6.289 + <var>s</var> means to follow the 6.290 <span>parse a media query list</span> steps and return null if more 6.291 than one media query is returned or a media query if a 6.292 single media query is returned.</p> 6.293 6.294 <p class="note">Again, a media query that ends up being "ignored" will 6.295 - turn into "<code title>not all</code>".</p> 6.296 - 6.297 + turn into "<code>not all</code>".</p> 6.298 + 6.299 + <!-- ........................................................................................................................ --> 6.300 6.301 <h3>Serializing Media Queries</h3> 6.302 6.303 @@ -310,25 +319,25 @@ 6.304 6.305 <p>To 6.306 <dfn id="serialize-a-media-query">serialize a media query</dfn> let 6.307 - <var title>s</var> be the empty string, run the steps below, and 6.308 - finally return <var title>s</var>:</p> 6.309 + <var>s</var> be the empty string, run the steps below, and 6.310 + finally return <var>s</var>:</p> 6.311 6.312 <ol> 6.313 <li><p>If the media query is negated append "<code>not</code>", followed 6.314 - by a space (U+0020), to <var title>s</var>.</p></li> 6.315 - 6.316 - <li><p>Let <var title>type</var> be the media type of the media query, 6.317 + by a space (U+0020), to <var>s</var>.</p></li> 6.318 + 6.319 + <li><p>Let <var>type</var> be the media type of the media query, 6.320 <span title="serialize an identifier">escaped</span> and 6.321 <span data-anolis-spec=dom>converted to ASCII lowercase</span>.</p></li> 6.322 6.323 <li><p>If the media query does not contain media features append 6.324 - <var title>type</var>, to <var title>s</var>, 6.325 - then return <var title>s</var> and terminate this algorithm.</p></li> 6.326 - 6.327 - <li><p>If <var title>type</var> is not "<code>all</code>" or if the 6.328 - media query is negated append <var title>type</var>, followed by a 6.329 + <var>type</var>, to <var>s</var>, 6.330 + then return <var>s</var> and terminate this algorithm.</p></li> 6.331 + 6.332 + <li><p>If <var>type</var> is not "<code>all</code>" or if the 6.333 + media query is negated append <var>type</var>, followed by a 6.334 space (U+0020), followed by "<code>and</code>", followed by a space 6.335 - (U+0020), to <var title>s</var>.</p></li> 6.336 + (U+0020), to <var>s</var>.</p></li> 6.337 6.338 <li><p>Sort the media features in lexicographical order.</p></li> 6.339 6.340 @@ -338,19 +347,19 @@ 6.341 <ol> 6.342 <li>Append a "<code>(</code>" (U+0028), followed by the media feature 6.343 name, <span data-anolis-spec=dom>converted to ASCII lowercase</span>, 6.344 - to <var title>s</var>.</p></li> 6.345 + to <var>s</var>.</p></li> 6.346 6.347 <li><p>If a value is given append a "<code>:</code>" (U+003A), followed 6.348 by a space (U+0020), followed by the 6.349 <span title="serialize a media feature value">serialized media feature value</span>, 6.350 - to <var title>s</var>.</p> 6.351 + to <var>s</var>.</p></li> 6.352 6.353 <li><p>Append a "<code>)</code>" (U+0029) to 6.354 - <var title>s</var>.</p></li> 6.355 + <var>s</var>.</p></li> 6.356 6.357 <li><p>If this is not the last media feature append a space (U+0020), 6.358 followed by "<code>and</code>", followed by a space (U+0020), to 6.359 - <var title>s</var>.</p></li> 6.360 + <var>s</var>.</p></li> 6.361 </ol> 6.362 </li> 6.363 </ol> 6.364 @@ -373,6 +382,8 @@ 6.365 </div> 6.366 6.367 6.368 + <!-- ........................................................................................................................ --> 6.369 + 6.370 <h4>Serializing Media Feature Values</h4> 6.371 6.372 <p class="XXX">This should probably be done in terms of mapping it to 6.373 @@ -380,7 +391,7 @@ 6.374 values after all.</p> 6.375 6.376 <p>To <dfn id="serialize-a-media-feature-value">serialize a media feature value</dfn> 6.377 - named <var title>v</var> locate <var title>v</var> in the first 6.378 + named <var>v</var> locate <var>v</var> in the first 6.379 column of the table below and use the serialization format described in 6.380 the second column:</p> 6.381 6.382 @@ -389,171 +400,74 @@ 6.383 <th>Media Feature 6.384 <th>Serialization 6.385 <tr> 6.386 - <td><code title>width</code> 6.387 + <td><code>width</code> 6.388 <td>... 6.389 <tr> 6.390 - <td><code title>height</code> 6.391 + <td><code>height</code> 6.392 <td>... 6.393 <tr> 6.394 - <td><code title>device-width</code> 6.395 + <td><code>device-width</code> 6.396 <td>... 6.397 <tr> 6.398 - <td><code title>device-height</code> 6.399 + <td><code>device-height</code> 6.400 <td>... 6.401 <tr> 6.402 - <td><code title>orientation</code> 6.403 + <td><code>orientation</code> 6.404 <td> 6.405 - <p>If the value is `<code title>portrait</code>`: "<code title>portrait</code>".</p> 6.406 - <p>If the value is `<code title>landscape</code>`: "<code title>landscape</code>".</p> 6.407 + <p>If the value is `<code>portrait</code>`: "<code>portrait</code>".</p> 6.408 + <p>If the value is `<code>landscape</code>`: "<code>landscape</code>".</p> 6.409 <tr> 6.410 - <td><code title>aspect-ratio</code> 6.411 + <td><code>aspect-ratio</code> 6.412 <td>... 6.413 <tr> 6.414 - <td><code title>device-aspect-ratio</code> 6.415 + <td><code>device-aspect-ratio</code> 6.416 <td>... 6.417 <tr> 6.418 - <td><code title>color</code> 6.419 + <td><code>color</code> 6.420 <td>... 6.421 <tr> 6.422 - <td><code title>color-index</code> 6.423 + <td><code>color-index</code> 6.424 <td>... 6.425 <tr> 6.426 - <td><code title>monochrome</code> 6.427 + <td><code>monochrome</code> 6.428 <td>... 6.429 <tr> 6.430 - <td><code title>resolution</code> 6.431 + <td><code>resolution</code> 6.432 <td>... 6.433 <tr> 6.434 - <td><code title>scan</code> 6.435 + <td><code>scan</code> 6.436 <td> 6.437 - <p>If the value is `<code title>progressive</code>`: "<code title>progressive</code>".</p> 6.438 - <p>If the value is `<code title>interlace</code>`: "<code title>interlace</code>".</p> 6.439 + <p>If the value is `<code>progressive</code>`: "<code>progressive</code>".</p> 6.440 + <p>If the value is `<code>interlace</code>`: "<code>interlace</code>".</p> 6.441 <tr> 6.442 - <td><code title>grid</code> 6.443 + <td><code>grid</code> 6.444 <td>... 6.445 </table> 6.446 6.447 <p>Other specifications can extend this table and vendor-prefixed media 6.448 features can have custom serialization formats as well.</p> 6.449 6.450 - 6.451 + <!-- ........................................................................................................................ --> 6.452 + <!-- ........................................................................................................................ --> 6.453 6.454 <h3>Comparing Media Queries</h3> 6.455 6.456 <p>To 6.457 <dfn id="compare-media-queries">compare media queries</dfn> 6.458 - <var title>m1</var> and <var title>m2</var> means to 6.459 + <var>m1</var> and <var>m2</var> means to 6.460 <span title="serialize a media query">serialize</span> them both and 6.461 return true if they are a 6.462 <span data-anolis-spec=dom>case-sensitive</span> match and false if they 6.463 are not.</p> 6.464 6.465 - 6.466 - 6.467 - <h3>The <code title>MediaList</code> Interface</h3> 6.468 - 6.469 - <p>An object that implements the <code>MediaList</code> interface has an 6.470 - associated <dfn>collection of media queries</dfn>.</p> 6.471 - 6.472 - <!-- http://dev.w3.org/2006/webapi/WebIDL/#idl-indexed-properties --> 6.473 - 6.474 - <pre class="idl">interface <dfn>MediaList</dfn> { 6.475 - stringifier attribute DOMString <span title="dom-MediaList-mediaText">mediaText</span>; 6.476 - readonly attribute unsigned long <span title="dom-MediaList-length">length</span>; 6.477 - getter DOMString <span title="dom-MediaList-item">item</span>(unsigned long <var title>index</var>); 6.478 - void <span title="dom-MediaList-appendMedium">appendMedium</span>(DOMString <var title>medium</var>); 6.479 - void <span title="dom-MediaList-deleteMedium">deleteMedium</span>(DOMString <var title>medium</var>); 6.480 -};</pre> 6.481 - 6.482 - <p>The 6.483 - <dfn title="dom-MediaList-mediaText"><code>mediaText</code></dfn> 6.484 - attribute must return a 6.485 - <span title="serialize a media query list">serialization</span> of 6.486 - the <span>collection of media queries</span>.</p> 6.487 - 6.488 - <p>Setting the <code title="dom-MediaList-mediaText">mediaText</code> 6.489 - attribute must run these steps: 6.490 - 6.491 - <ol> 6.492 - <li><p>Empty the <span>collection of media queries</span>.</p></li> 6.493 - 6.494 - <li><p>If the given value is the empty string terminate these 6.495 - steps.</p></li> 6.496 - 6.497 - <li><p>Append all the media queries as a result of 6.498 - <span title="parse a media query list">parsing</span> the given 6.499 - value to the <span>collection of media queries</span>.</p></li> 6.500 - </ol> 6.501 - 6.502 - <p>The 6.503 - <dfn title="dom-MediaList-length"><code>length</code></dfn> 6.504 - attribute must return the number of media queries in 6.505 - the <span>collection of media queries</span>.</p> 6.506 - 6.507 - <p>The 6.508 - <dfn title="dom-MediaList-item"><code>item(<var title>index</var>)</code></dfn> 6.509 - method must return the media query in the 6.510 - <span>collection of media queries</span> given by 6.511 - <var title>index</var>, or null, if <var title>index</var> is 6.512 - greater than or equal to the number of media queries in the 6.513 - <span>collection of media queries</span>.</p> 6.514 - <!-- XXX need consistency here WebIDL? list of media queries? --> 6.515 - 6.516 - <p>The 6.517 - <dfn title="dom-MediaList-appendmedium"><code>appendMedium(<var title>medium</var>)</code></dfn> 6.518 - method must run these steps:</p> 6.519 - 6.520 - <ol> 6.521 - <li><p>Let <var title>m</var> be the result of 6.522 - <span title="parse a media query">parsing</span> the given 6.523 - value.</p></li> 6.524 - 6.525 - <li><p>If <var title>m</var> is null terminate these steps.</p></li> 6.526 - 6.527 - <li><p>If <span title="compare media queries">comparing</span> 6.528 - <var title>m</var> with any of the media queries in the 6.529 - <span>collection of media queries</span> returns true terminate these 6.530 - steps.</p></li> 6.531 - 6.532 - <li><p>Append <var title>m</var> to the 6.533 - <span>collection of media queries</span>.</p></li> 6.534 - </ol> 6.535 - 6.536 - <p>The 6.537 - <dfn title="dom-MediaList-deletemedium"><code>deleteMedium(<var title>medium</var>)</code></dfn> 6.538 - method must run these steps:</p> 6.539 - 6.540 - <ol> 6.541 - <li><p>Let <var title>m</var> be the result of 6.542 - <span title="parse a media query">parsing</span> the given 6.543 - value.</p></li> 6.544 - 6.545 - <li><p>If <var title>m</var> is null terminate these steps.</p></li> 6.546 - 6.547 - <li><p>Remove any media query from the 6.548 - <span>collection of media queries</span> for which 6.549 - <span title="compare media queries">comparing</span> the media query with 6.550 - <var title>m</var> returns true.</p></li> 6.551 - </ol> 6.552 - 6.553 - 6.554 - <h3>Creating a <code title>MediaList</code> Object</h3> 6.555 - 6.556 - <p>To 6.557 - <dfn id="create-a-medialist-object">create a <code>MediaList</code> object</dfn> 6.558 - from a string <var title>s</var>, run these steps:</p> 6.559 - 6.560 - <ol> 6.561 - <li><p>Create a new <code>MediaList</code> object.</p></li> 6.562 - 6.563 - <li><p>Set its <span title="dom-MediaList-mediaText">mediaText</span> 6.564 - attribute to <var title>s</var>.</p></li> 6.565 - 6.566 - <li><p>Return the newly created <code>MediaList</code> object.</p></li> 6.567 - </ol> 6.568 - 6.569 - 6.570 - 6.571 + <!-- ........................................................................................................................ --> 6.572 + <!-- ........................................................................................................................ --> 6.573 + 6.574 + <h3>The <code>MediaList</code> Interface</h3> 6.575 + 6.576 + <!--{@idl(MediaList)}--> 6.577 + 6.578 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.579 6.580 <h2>Selectors</h2> 6.581 6.582 @@ -562,15 +476,20 @@ 6.583 6.584 <!-- XXX ref universal selector etc? some are in <span> some not --> 6.585 6.586 + <!-- ........................................................................................................................ --> 6.587 + <!-- ........................................................................................................................ --> 6.588 + 6.589 <h3>Parsing Selectors</h3> 6.590 6.591 <p>To 6.592 <dfn id="parse-a-group-of-selectors">parse a group of selectors</dfn> 6.593 - means to parse the value using the <code title>selectors_group</code> 6.594 + means to parse the value using the <code>selectors_group</code> 6.595 production defined in the Selectors specification and return either a 6.596 group of selectors if parsing did not fail or null if parsing did 6.597 fail.</p> <!-- XXX ref --> 6.598 6.599 + <!-- ........................................................................................................................ --> 6.600 + <!-- ........................................................................................................................ --> 6.601 6.602 <h3>Serializing Selectors</h3> 6.603 <!-- http://dump.testsuite.org/2009/cssom/serializing-selectors.htm --> 6.604 @@ -583,16 +502,16 @@ 6.605 group.</p> 6.606 6.607 <p>To <dfn id="serialize-a-selector">serialize a selector</dfn> let 6.608 - <var title>s</var> be the empty string, run the steps below for each 6.609 + <var>s</var> be the empty string, run the steps below for each 6.610 part of the chain of the selector, and finally return 6.611 - <var title>s</var>:</p> 6.612 + <var>s</var>:</p> 6.613 6.614 <ol> 6.615 <li><p>If there is only one <span>simple selector</span> in the 6.616 <span>sequence of simple selectors</span> which is a 6.617 <span>universal selector</span>, append the result of 6.618 <span title="serialize a simple selector">serializing</span> the 6.619 - <span>universal selector</span> to <var title>s</var>.</p></li> 6.620 + <span>universal selector</span> to <var>s</var>.</p></li> 6.621 6.622 <li><p>Otherwise, for each <span>simple selector</span> in the 6.623 <span>sequence of simple selectors</span> that is not a 6.624 @@ -602,7 +521,7 @@ 6.625 <span>default namespace</span> 6.626 <span title="serialize a simple selector">serialize</span> the 6.627 <span>simple selector</span> and append the result to 6.628 - <var title>s</var>.</p></li> 6.629 + <var>s</var>.</p></li> 6.630 6.631 <li><p>If this is not the last part of the chain of the selector append a 6.632 space (U+0020), followed by the combinator 6.633 @@ -610,18 +529,18 @@ 6.634 "<code>+</code>", or 6.635 "<code>~</code>" 6.636 as appropriate, followed by another space (U+0020) if the combinator was 6.637 - not whitespace, to <var title>s</var>.</p></li> 6.638 + not whitespace, to <var>s</var>.</p></li> 6.639 6.640 <li><p>If this is the last part of the chain of the selector and there is 6.641 a pseudo-element, append "<code>::</code>" followed by the name of the 6.642 - pseudo-class, to <var title>s</var>.</p></li> 6.643 + pseudo-class, to <var>s</var>.</p></li> 6.644 </ol> 6.645 6.646 6.647 <p>To 6.648 <dfn id="serialize-a-simple-selector">serialize a simple selector</dfn> 6.649 - let <var title>s</var> be the empty string, run the steps below, and 6.650 - finally return <var title>s</var>:</p> 6.651 + let <var>s</var> be the empty string, run the steps below, and 6.652 + finally return <var>s</var>:</p> 6.653 6.654 <dl class="switch"> 6.655 <dt>type selector</dt> 6.656 @@ -633,19 +552,19 @@ 6.657 null namespace (not in a namespace) append the 6.658 <span title="serialize an identifier">escaped</span> 6.659 <span>namespace prefix</span>, followed by a "<code>|</code>" (U+007C) 6.660 - to <var title>s</var>.</p></li> 6.661 + to <var>s</var>.</p></li> 6.662 6.663 <li><p>If the <span>namespace prefix</span> maps to a namespace that is 6.664 the null namespace (not in a namespace) append 6.665 - "<code>|</code>" (U+007C) to <var title>s</var>.</p></li> 6.666 + "<code>|</code>" (U+007C) to <var>s</var>.</p></li> 6.667 <!-- This includes |* --> 6.668 6.669 <li><p>If this is a type selector append the 6.670 <span title="serialize an identifier">escaped</span> element name to 6.671 - <var title>s</var>.</p> 6.672 + <var>s</var>.</p></li> 6.673 6.674 <li><p>If this is a universal selector append "<code>*</code>" (U+002A) 6.675 - to <var title>s</var>.</p></li> 6.676 + to <var>s</var>.</p></li> 6.677 </ol> 6.678 </dd> 6.679 6.680 @@ -653,21 +572,21 @@ 6.681 <dd> 6.682 <ol> 6.683 <li><p>Append "<code>[</code>" (U+005B) to 6.684 - <var title>s</var>.</p></li> 6.685 + <var>s</var>.</p></li> 6.686 6.687 <li><p>If the <span>namespace prefix</span> maps to a namespace that is 6.688 not the null namespace (not in a namespace) append the 6.689 <span title="serialize an identifier">escaped</span> 6.690 <span>namespace prefix</span>, followed by a "<code>|</code>" (U+007C) 6.691 - to <var title>s</var>.</p></li> 6.692 + to <var>s</var>.</p></li> 6.693 6.694 <li><p>If the <span>namespace prefix</span> maps to a namespace that is 6.695 the null namespace (not in a namespace) append 6.696 - "<code>|</code>" (U+007C) to <var title>s</var>.</p></li> 6.697 + "<code>|</code>" (U+007C) to <var>s</var>.</p></li> 6.698 <!-- This includes |* --> 6.699 6.700 <li><p>Append the <span title="serialize an identifier">escaped</span> 6.701 - attribute name to <var title>s</var>.</p></li> 6.702 + attribute name to <var>s</var>.</p></li> 6.703 6.704 <li><p>If there is an attribute value specified, append 6.705 "<code>=</code>", 6.706 @@ -678,92 +597,94 @@ 6.707 "<code>*=</code>" 6.708 as appropriate (depending on the type of attribute selector), followed 6.709 by the <span title="serialize a string">string escaped</span> 6.710 - attribute value, to <var title>s</var>.</p></li> 6.711 + attribute value, to <var>s</var>.</p></li> 6.712 6.713 <li><p>Append "<code>]</code>" (U+005D) to 6.714 - <var title>s</vaR>.</p></li> 6.715 + <var>s</vaR>.</p></li> 6.716 </ol> 6.717 </dd> 6.718 6.719 <dt>class selector</dt> 6.720 <dd><p>Append a "<code>.</code>" (U+002E), followed by the 6.721 <span title="serialize an identifier">escaped</span> class name to 6.722 - <var title>s</var>.</p></dd> 6.723 + <var>s</var>.</p></dd> 6.724 6.725 <dt>ID selector</dt> 6.726 <dd><p>Append a "<code>#</code>" (U+0023), followed by the 6.727 <span title="serialize an identifier">escaped</span> ID to 6.728 - <var title>s</var>.</p></dd> 6.729 + <var>s</var>.</p></dd> 6.730 6.731 <dt>pseudo-class</dt> 6.732 <dd> 6.733 <p>If the pseudo-class does not accept arguments append 6.734 "<code>:</code>" (U+003A), followed by the name of the pseudo-class, to 6.735 - <var title>s</var>.</p> 6.736 + <var>s</var>.</p> 6.737 6.738 <p>Otherwise, append "<code>:</code>" (U+003A), followed by the name of 6.739 the pseudo-class, followed by "<code>(</code>" (U+0028), followed by the 6.740 value of the pseudo-class argument determined as per below, followed by 6.741 - "<code>)</code>" (U+0029), to <var title>s</var>.</p> 6.742 + "<code>)</code>" (U+0029), to <var>s</var>.</p> 6.743 6.744 <dl class="switch"> 6.745 - <dt><code title>:lang()</code></dt> 6.746 + <dt><code>:lang()</code></dt> 6.747 <dd><p>The <span title="serialize an identifier">escaped</span> 6.748 value.</p></dd> 6.749 6.750 - <dt><code title>:nth-child()</code></dt> 6.751 - <dt><code title>:nth-last-child()</code></dt> 6.752 - <dt><code title>:nth-of-type()</code></dt> 6.753 - <dt><code title>:nth-last-of-type()</code></dt> 6.754 + <dt><code>:nth-child()</code></dt> 6.755 + <dt><code>:nth-last-child()</code></dt> 6.756 + <dt><code>:nth-of-type()</code></dt> 6.757 + <dt><code>:nth-last-of-type()</code></dt> 6.758 <dd> 6.759 <ol> 6.760 <li><p>If the value is odd let the value be 6.761 - "<code title>2n+1</code>".</p></li> 6.762 + "<code>2n+1</code>".</p></li> 6.763 6.764 <li><p>If the value is even let the value be 6.765 - "<code title>2n</code>".</p></li> 6.766 - 6.767 - <li><p>If <var title>a</var> is zero let the value be 6.768 - <var title>b</var> 6.769 + "<code>2n</code>".</p></li> 6.770 + 6.771 + <li><p>If <var>a</var> is zero let the value be 6.772 + <var>b</var> 6.773 <span title="serialize a CSS component value">serialized</span> as <integer>.</p></li> 6.774 6.775 - <li><p>If <var title>a</var> is one or minus one and 6.776 - <var title>b</var> is zero let the value be 6.777 - "<code title>n</code>" (U+006E).</p></li> 6.778 - 6.779 - <li><p>If <var title>a</var> is one or minus one let the value be 6.780 - "<code title>n</code>" (U+006E), followed by 6.781 - "<code>+</code>" (U+002B) if <var title>b</var> is positive, 6.782 - followed by <var title>b</var> 6.783 + <li><p>If <var>a</var> is one or minus one and 6.784 + <var>b</var> is zero let the value be 6.785 + "<code>n</code>" (U+006E).</p></li> 6.786 + 6.787 + <li><p>If <var>a</var> is one or minus one let the value be 6.788 + "<code>n</code>" (U+006E), followed by 6.789 + "<code>+</code>" (U+002B) if <var>b</var> is positive, 6.790 + followed by <var>b</var> 6.791 <span title="serialize a CSS component value">serialized</span> as <integer>.</p></li> 6.792 6.793 - <li><p>If <var title>b</var> is zero let the value be 6.794 - <var title>a</var> 6.795 + <li><p>If <var>b</var> is zero let the value be 6.796 + <var>a</var> 6.797 <span title="serialize a CSS component value">serialized</span> as <integer>, 6.798 - followed by "<code title>n</code>" (U+006E).</p></li> 6.799 + followed by "<code>n</code>" (U+006E).</p></li> 6.800 6.801 <li><p>Otherwise let the value be 6.802 - <var title>a</var> 6.803 + <var>a</var> 6.804 <span title="serialize a CSS component value">serialized</span> as <integer>, 6.805 - followed by "<code title>n</code>" (U+006E), followed by 6.806 - "<code>+</code>" (U+002B) if <var title>b</var> is positive, 6.807 - followed by <var title>b</var> 6.808 + followed by "<code>n</code>" (U+006E), followed by 6.809 + "<code>+</code>" (U+002B) if <var>b</var> is positive, 6.810 + followed by <var>b</var> 6.811 <span title="serialize a CSS component value">serialized</span> as <integer>.</p></li> 6.812 </ol> 6.813 </dd> 6.814 6.815 - <dt><code title>:not()</code></dt> 6.816 + <dt><code>:not()</code></dt> 6.817 <dd><p>The result of serializing the value using the rules for 6.818 <span title="serialize a group of selectors">serializing a group of selectors</span>.</p></dd> 6.819 </dl> 6.820 </dd> 6.821 </dl> 6.822 6.823 - 6.824 - 6.825 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.826 6.827 <h2>CSS</h2> 6.828 6.829 + <!-- ........................................................................................................................ --> 6.830 + <!-- ........................................................................................................................ --> 6.831 + 6.832 <h3>Style Sheet</h3> 6.833 6.834 <!-- XXX 6.835 @@ -818,7 +739,7 @@ 6.836 <p>In these examples the <span>style sheet title</span> ends up being 6.837 empty:</p> 6.838 6.839 - <pre><style title> body { background:papayawhip } </style></pre> 6.840 + <pre><style> body { background:papayawhip } </style></pre> 6.841 6.842 <pre><style> body { background:orange } </style></pre> 6.843 </div> 6.844 @@ -859,109 +780,20 @@ 6.845 6.846 <!-- same-origin restrictions --> 6.847 6.848 - 6.849 - <h4>The <code title>StyleSheet</code> Interface</h4> 6.850 - 6.851 - <p>The <code>StyleSheet</code> interface represents a base interface that 6.852 - has no meaning on its own.</p> 6.853 - 6.854 - <pre class="idl">interface <dfn id="stylesheet">StyleSheet</dfn> { 6.855 - readonly attribute DOMString <span title="dom-StyleSheet-type">type</span>; 6.856 - readonly attribute DOMString <span title="dom-StyleSheet-href">href</span>; 6.857 - readonly attribute Node <span title="dom-StyleSheet-ownerNode">ownerNode</span>; 6.858 - readonly attribute <span>StyleSheet</span> <span title="dom-StyleSheet-parentStyleSheet">parentStyleSheet</span>; 6.859 - readonly attribute DOMString <span title="dom-StyleSheet-title">title</span>; 6.860 - [PutForwards=<span title="dom-MediaList-mediaText">mediaText</span>] readonly attribute <span>MediaList</span> <span title="dom-StyleSheet-media">media</span>; 6.861 - attribute boolean <span title="dom-StyleSheet-disabled">disabled</span>; 6.862 -};</pre> 6.863 - 6.864 - <p>The 6.865 - <dfn title="dom-StyleSheet-type"><code>type</code></dfn> 6.866 - attribute must return the 6.867 - <span>style sheet type</span>.</p> 6.868 - 6.869 - <p>The 6.870 - <dfn title="dom-StyleSheet-href"><code>href</code></dfn> 6.871 - attribute must return the 6.872 - <span>style sheet location</span>.</p> 6.873 - 6.874 - <p>The 6.875 - <dfn title="dom-StyleSheet-ownerNode"><code>ownerNode</code></dfn> 6.876 - attribute must return the 6.877 - <span>style sheet owner node</span>.</p> 6.878 - 6.879 - <p>The 6.880 - <dfn title="dom-StyleSheet-parentStyleSheet"><code>parentStyleSheet</code></dfn> 6.881 - attribute must return the 6.882 - <span>style sheet parent</span>.</p> 6.883 - 6.884 - <p>The 6.885 - <dfn title="dom-StyleSheet-title"><code>title</code></dfn> 6.886 - attribute must return the 6.887 - <span>style sheet title</span>.</p> 6.888 - 6.889 - <p>The 6.890 - <dfn title="dom-StyleSheet-media"><code>media</code></dfn> 6.891 - attribute must return the 6.892 - <span>style sheet media</span>.</p> 6.893 - 6.894 - <p>The 6.895 - <dfn title="dom-StyleSheet-disabled"><code>disabled</code></dfn> 6.896 - attribute must return true if the <span>style sheet disabled flag</span> 6.897 - is set, or false otherwise. 6.898 - 6.899 - <p>Setting the <code title="dom-StyleSheet-disabled">disabled</code> 6.900 - attribute must set the <span>style sheet disabled flag</span> if the new 6.901 - value is true, or unset the <span>style sheet disabled flag</span> 6.902 - otherwise. 6.903 - 6.904 - 6.905 - <h4>The <code title>CSSStyleSheet</code> Interface</h4> 6.906 - 6.907 - <p>The <code>CSSStyleSheet</code> interface represents a 6.908 - <span>style sheet</span>.</p> 6.909 - 6.910 - <!-- 6.911 - IE exposes: 6.912 - owningElement, pages, id, type, href, disabled, cssText, readOnly, title, 6.913 - parentStyleSheet, imports, rules, media 6.914 - --> 6.915 - 6.916 - <pre class="idl">interface <dfn>CSSStyleSheet</dfn> : <span>StyleSheet</span> { 6.917 - readonly attribute <span>CSSRule</span> <span title="dom-CSSStyleSheet-ownerRule">ownerRule</span>; 6.918 - readonly attribute <span>CSSRuleList</span> <span title="dom-CSSStyleSheet-cssRules">cssRules</span>; 6.919 - unsigned long <span title="dom-CSSStyleSheet-insertRule">insertRule</span>(DOMString <var title>rule</var>, unsigned long <var title>index</var>); 6.920 - void <span title="dom-CSSStyleSheet-deleteRule">deleteRule</span>(unsigned long <var title>index</var>); 6.921 -};</pre> 6.922 - 6.923 - <p>The 6.924 - <dfn title="dom-CSSStyleSheet-ownerRule"><code>ownerRule</code></dfn> 6.925 - attribute must return the 6.926 - <span>style sheet owner CSS rule</span>.</p> 6.927 - 6.928 - <p>The 6.929 - <dfn title="dom-CSSStyleSheet-cssRules"><code>cssRules</code></dfn> 6.930 - attribute must return a <code>CSSRuleList</code> 6.931 - object representing the <span>style sheet CSS rules</span>.</p> 6.932 - 6.933 - <p class="note">CSS rules that were dropped during parsing can not be 6.934 - found using APIs described by this specification.</p> 6.935 - 6.936 - <p>The 6.937 - <dfn title="dom-CSSStyleSheet-insertRule"><code>insertRule(<var title>rule</var>, <var title>index</var>)</code></dfn> 6.938 - method must <span>insert a CSS rule</span> 6.939 - <var title>rule</var> the in CSS rule list returned by 6.940 - <code title="dom-CSSStyleSheet-cssRules">cssRules</code> at 6.941 - <var title>index</var>.</p> 6.942 - 6.943 - <p>The 6.944 - <dfn title="dom-CSSStyleSheet-deleteRule"><code>deleteRule(<var title>index</var>)</code></dfn> 6.945 - method must <span>remove a CSS rule</span> from the 6.946 - CSS rule list returned by 6.947 - <code title="dom-CSSStyleSheet-cssRules">cssRules</code> at 6.948 - <var title>index</var>.</p> 6.949 - 6.950 - 6.951 + <!-- ........................................................................................................................ --> 6.952 + 6.953 + <h4>The <code>StyleSheet</code> Interface</h4> 6.954 + 6.955 + <!--{@idl(StyleSheet)}--> 6.956 + 6.957 + <!-- ........................................................................................................................ --> 6.958 + 6.959 + <h4>The <code>CSSStyleSheet</code> Interface</h4> 6.960 + 6.961 + <!--{@idl(CSSStyleSheet)}--> 6.962 + 6.963 + <!-- ........................................................................................................................ --> 6.964 + <!-- ........................................................................................................................ --> 6.965 6.966 <h3>Style Sheet Collections</h3> 6.967 6.968 @@ -1024,7 +856,7 @@ 6.969 </ul> 6.970 </li> 6.971 6.972 - <li><p>Set the <span>style sheet disabled flag</span>. 6.973 + <li><p>Set the <span>style sheet disabled flag</span>.</li> 6.974 </ol> 6.975 6.976 <p>A <dfn id="persistent-style-sheet">persistent style sheet</dfn> is a 6.977 @@ -1046,31 +878,31 @@ 6.978 its <span>style sheet disabled flag</span> unset.</p> 6.979 6.980 <p>To <dfn id="enable-a-style-sheet-set">enable a style sheet set</dfn> 6.981 - with name <var title>name</var>, run these steps:</p> 6.982 + with name <var>name</var>, run these steps:</p> 6.983 6.984 <ol> 6.985 - <li><p>If <var title>name</var> is the empty string, set the 6.986 + <li><p>If <var>name</var> is the empty string, set the 6.987 <span>style sheet disabled flag</span> for each <span>style sheet</span> 6.988 - that is in a <span>style sheet set</span> and terminate these steps. 6.989 + that is in a <span>style sheet set</span> and terminate these steps.</li> 6.990 6.991 <li><p>Unset the <span>style sheet disabled flag</span> for each 6.992 <span>style sheet</span> in a <span>style sheet set</span> whose 6.993 <span>style sheet set name</span> is a 6.994 <span data-anolis-spec=dom>case-sensitive</span> match for 6.995 - <var title>name</var> and set it for all other 6.996 + <var>name</var> and set it for all other 6.997 <span title="style sheet">style sheets</span> in a 6.998 <span>style sheet set</span>.</p></li> 6.999 </ol> 6.1000 6.1001 <p>To <dfn id="select-a-style-sheet-set">select a style sheet set</dfn> 6.1002 - with name <var title>name</var>, run these steps:</p> 6.1003 + with name <var>name</var>, run these steps:</p> 6.1004 6.1005 <ol> 6.1006 <li><p><span>Enable a style sheet set</span> with name 6.1007 - <var title>name</var>.</p></li> 6.1008 + <var>name</var>.</p></li> 6.1009 6.1010 <li><p>Set <span>last style sheet set name</span> to 6.1011 - <var title>name</var>.</p></li> 6.1012 + <var>name</var>.</p></li> 6.1013 </ol> 6.1014 6.1015 <p>A <dfn id="last-style-sheet-set-name">last style sheet set name</dfn> 6.1016 @@ -1081,27 +913,27 @@ 6.1017 <p>A 6.1018 <dfn id="preferred-style-sheet-set-name">preferred style sheet set name</dfn> 6.1019 is a concept to determine which 6.1020 - <span style="style sheet">style sheets</span> need to have their 6.1021 + <span title="style sheet">style sheets</span> need to have their 6.1022 <span>style sheet disabled flag</span> unset. Initially its value 6.1023 is the empty string. 6.1024 6.1025 <p>To 6.1026 <dfn id="change-the-preferred-style-sheet-set-name">change the preferred style sheet set name</dfn> 6.1027 - with name <var title>name</var>, run these steps:</p> 6.1028 + with name <var>name</var>, run these steps:</p> 6.1029 6.1030 <ol> 6.1031 <li><p>Let the <span>preferred style sheet set name</span> be 6.1032 - <var title>current</var>.</p></li> 6.1033 + <var>current</var>.</p></li> 6.1034 6.1035 <li><p>Set <span>preferred style sheet set name</span> to 6.1036 - <var title>name</var>.</p></li> 6.1037 - 6.1038 - <li><p>If <var title>name</var> is not a 6.1039 + <var>name</var>.</p></li> 6.1040 + 6.1041 + <li><p>If <var>name</var> is not a 6.1042 <span data-anolis-spec=dom>case-sensitive</span> match for 6.1043 - <var title>current</var> and 6.1044 + <var>current</var> and 6.1045 <span>last style sheet set name</span> is null 6.1046 <span>enable a style sheet set</span> with name 6.1047 - <var title>new</var>.</p></li> 6.1048 + <var>new</var>.</p></li> 6.1049 </ol> 6.1050 6.1051 <!-- XXX ought to define "applied" 6.1052 @@ -1110,8 +942,9 @@ 6.1053 depends on disabled flag, alternate flag, media queries, sheesh 6.1054 --> 6.1055 6.1056 - 6.1057 - <h4>The HTTP <code title>Default-Style</code> Header</h4> 6.1058 + <!-- ........................................................................................................................ --> 6.1059 + 6.1060 + <h4>The HTTP <code>Default-Style</code> Header</h4> 6.1061 6.1062 <p>The HTTP <code title="http-default-style">Default-Style</code> header 6.1063 can be used to set the <span>preferred style sheet set name</span> 6.1064 @@ -1123,148 +956,19 @@ 6.1065 <span>change the preferred style sheet set name</span> with name being the 6.1066 value of the header.</p> 6.1067 6.1068 - 6.1069 - 6.1070 - 6.1071 - <h4>The <code title>StyleSheetList</code> Sequence</h4> 6.1072 - 6.1073 - <p>The sequence parameterized type represents an ordered collection of 6.1074 - <span title="style sheet">style sheets</span>.</p> 6.1075 - 6.1076 - <pre class="idl">typedef sequence<<span>StyleSheet</span>> <dfn>StyleSheetList</dfn>;</pre> 6.1077 - 6.1078 -<!-- 6.1079 - <pre class="idl">interface <dfn>StyleSheetList</dfn> { 6.1080 - readonly attribute unsigned long <span title="stylesheetlist-length">length</span>; 6.1081 - getter <span>StyleSheet</span> <span title="stylesheetlist-item">item</span>(unsigned long <var title>index</var>); 6.1082 -};</pre> 6.1083 - 6.1084 - <p>The 6.1085 - <dfn id="stylesheetlist-length" title="stylesheetlist-length"><code>length</code></dfn> 6.1086 - attribute, on getting, must return the number of 6.1087 - objects currently in the list.</p> 6.1088 - 6.1089 - <p>The 6.1090 - <dfn title="stylesheetlist-item"><code>item(<var title>index</var>)</code></dfn> 6.1091 - method, when invoked, must return the 6.1092 - <code>StyleSheet</code> object in the list given by <var title>index</var>, or 6.1093 - null, if <var title>index</var> is greater than or equal to the 6.1094 - number of items in the list.</p> 6.1095 ---> 6.1096 - 6.1097 - 6.1098 - <h4>Extensions to the <code title>Document</code> Interface</h4> 6.1099 - 6.1100 - <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=200930 (FIXED) --> 6.1101 - <pre class="idl">partial interface <span data-anolis-spec=dom>Document</span> { 6.1102 - readonly attribute <span>StyleSheetList</span> <span title="dom-Document-styleSheets">styleSheets</span>; 6.1103 - attribute DOMString? <span title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</span>; 6.1104 - readonly attribute DOMString? <span title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</span>; 6.1105 - readonly attribute DOMString? <span title="dom-Document-preferredStyleSheetSet">preferredStyleSheetSet</span>; 6.1106 - readonly attribute DOMStringList <span title="dom-Document-styleSheetSets">styleSheetSets</span>; 6.1107 - void <span title="dom-Document-enableStyleSheetsForSet">enableStyleSheetsForSet</span>(DOMString? <var title>name</var>); 6.1108 -};</pre> 6.1109 - 6.1110 - <p>The 6.1111 - <dfn id="dom-document-stylesheets" title="dom-Document-styleSheets"><code>styleSheets</code></dfn> 6.1112 - attribute must return a <code>StyleSheetList</code> 6.1113 - sequence representing the <span>document style sheets</span>.</p> 6.1114 - 6.1115 - <p class="note">Because of historical IDL limitations the 6.1116 - <code title="dom-Document-styleSheets">styleSheets</code> attribute used 6.1117 - to be on a separate interface, <code title>DocumentStyle</code>.</p> 6.1118 - 6.1119 - <p>The 6.1120 - <dfn id="dom-document-selectedStyleSheetSet" title="dom-Document-selectedStyleSheetSet"><code>selectedStyleSheetSet</code></dfn> 6.1121 - attribute, on getting, must run these steps:</p> 6.1122 - 6.1123 - <ol> 6.1124 - <li><p>If there is a single <span>enabled style sheet set</span> and no 6.1125 - other <span>document style sheets</span> with a non-empty 6.1126 - <span>style sheet title</span> have the 6.1127 - <span>style sheet disabled flag</span> unset, return the 6.1128 - <span>style sheet set name</span> of the 6.1129 - <span>enabled style sheet set</span> and terminate these steps. 6.1130 - 6.1131 - <li><p>Otherwise, if <span title="style sheet">style sheets</span> from 6.1132 - different <span title="style sheet set">style sheet sets</span> have 6.1133 - their <span>style sheet disabled flag</span> unset, return 6.1134 - null and terminate these steps. 6.1135 - 6.1136 - <li> 6.1137 - <p>Otherwise, return the empty string.</p> 6.1138 - 6.1139 - <p class="note">At this point either all 6.1140 - <span title="style sheet">style sheets</span> with a non-empty 6.1141 - <span>style sheet title</span> have the 6.1142 - <span>style sheet disabled flag</span> set, or there are no such 6.1143 - <span title="style sheet">style sheets</span>.</p> 6.1144 - </li> 6.1145 - </ol> 6.1146 - 6.1147 - <p>On setting the 6.1148 - <code title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code> 6.1149 - attribute these steps must be run:</p> 6.1150 - 6.1151 - <ol> 6.1152 - <li><p>If the value is null terminate this set of steps.</p></li> 6.1153 - 6.1154 - <li><p>Otherwise, <span>select a style sheet set</span> with as name the 6.1155 - value passed.</p></li> 6.1156 - </ol> 6.1157 - 6.1158 - <p>From the DOM's perspective, all views have the same 6.1159 - <code title="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code>. 6.1160 - If a user agent supports multiple views with different selected 6.1161 - alternative style sheets, then this attribute (and the 6.1162 - <code>StyleSheet</code> interface's 6.1163 - <code title="dom-StyleSheet-disabled">disabled</code> attribute) 6.1164 - must return and set the value for the default 6.1165 - view.</p> 6.1166 - <!-- XXX clean up once we get rid of views --> 6.1167 - 6.1168 - <p>The 6.1169 - <dfn id="dom-document-lastStyleSheetSet" title="dom-Document-lastStyleSheetSet"><code>lastStyleSheetSet</code></dfn> 6.1170 - attribute must return the 6.1171 - <span>last style sheet set name</span>.</p> 6.1172 - 6.1173 - <p class="note">This attribute is initially null.</p> 6.1174 - 6.1175 - <p>The 6.1176 - <dfn id="dom-document-preferredStyleSheetSet" title="dom-Document-preferredStyleSheetSet"><code>preferredStyleSheetSet</code></dfn> 6.1177 - attribute must return the 6.1178 - <span>preferred style sheet set name</span>.</p> 6.1179 - 6.1180 - <p class="note">Unlike 6.1181 - <code title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code>, 6.1182 - this attribute is initially the empty string.</p> <!-- XXX change? --> 6.1183 - 6.1184 - <p>The 6.1185 - <dfn id="dom-document-styleSheetSets" title="dom-Document-styleSheetSets"><code>styleSheetSets</code></dfn> 6.1186 - attribute must return a list of the 6.1187 - <span title="style sheet set name">style sheet set names</span> of the 6.1188 - <span title="style sheet set">style sheet sets</span>, in order of the 6.1189 - <span>document style sheets</span>.</p> 6.1190 - 6.1191 - <p>The 6.1192 - <dfn id="dom-document-enablestylesheetsforset" title="dom-Document-enableStyleSheetsForSet"><code>enableStyleSheetsForSet(<var title>name</var>)</code></dfn> 6.1193 - method must, when invoked, run these steps:</p> 6.1194 - 6.1195 - <ol> 6.1196 - <li><p>If <var title>name</var> is null terminate these 6.1197 - steps.</p></li> 6.1198 - 6.1199 - <li><p><span>Enable a style sheet set</span> with name 6.1200 - <var title>name</var>.</p></li> 6.1201 - </ol> 6.1202 - 6.1203 - <p class="note"><span title="Style sheet">Style sheets</span> with an 6.1204 - empty <span>style sheet title</span> are never affected by this method. 6.1205 - This method does not change the values of the 6.1206 - <code title="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code> or 6.1207 - <code title="dom-Document-preferredStyleSheetSet">preferredStyleSheetSet</code> 6.1208 - attributes.</p> 6.1209 - 6.1210 + <!-- ........................................................................................................................ --> 6.1211 + 6.1212 + <h4>The <code>StyleSheetList</code> Sequence</h4> 6.1213 + 6.1214 + <!--{@idl(StyleSheetList)}--> 6.1215 + 6.1216 + <!-- ........................................................................................................................ --> 6.1217 + 6.1218 + <h4>Extensions to the <code>Document</code> Interface</h4> 6.1219 + 6.1220 + <!--{@idl(Document)}--> 6.1221 + 6.1222 + <!-- ........................................................................................................................ --> 6.1223 6.1224 <h4>Interaction with the User Interface</h4> 6.1225 6.1226 @@ -1312,6 +1016,8 @@ 6.1227 <!-- XXX this UI section suggests we may want to introduce a few more 6.1228 idioms --> 6.1229 6.1230 + <!-- ........................................................................................................................ --> 6.1231 + 6.1232 <h4>Examples</h4> 6.1233 6.1234 <div class="example"> 6.1235 @@ -1368,8 +1074,8 @@ 6.1236 are not.</p> 6.1237 </div> 6.1238 6.1239 - 6.1240 - 6.1241 + <!-- ........................................................................................................................ --> 6.1242 + <!-- ........................................................................................................................ --> 6.1243 6.1244 <h3>Style Sheet Association</h3> 6.1245 6.1246 @@ -1380,7 +1086,7 @@ 6.1247 and HTTP <code title="http-link">Link</code> headers when the link 6.1248 relation type is an 6.1249 <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 6.1250 - "<code title>stylesheet</code>" since nobody else was interested in 6.1251 + "<code>stylesheet</code>" since nobody else was interested in 6.1252 defining this.</p> 6.1253 6.1254 <p class=note>The editor is in good hope that HTML and SVG will define the 6.1255 @@ -1388,21 +1094,11 @@ 6.1256 this specification, in due course.</p> 6.1257 6.1258 6.1259 - <h4>The <code title>LinkStyle</code> Interface</h4> 6.1260 - 6.1261 - <p>The <dfn id="associated-style-sheet">associated style sheet</dfn> of a 6.1262 - node is the <span>style sheet</span> in the list of 6.1263 - <span>document style sheets</span> of which the 6.1264 - <span>style sheet owner node</span> 6.1265 - implements the <code>LinkStyle</code> interface.</p> 6.1266 - 6.1267 - <pre class="idl">[NoInterfaceObject] interface <dfn>LinkStyle</dfn> { 6.1268 - readonly attribute <span>StyleSheet</span> <span title="dom-linkstyle-sheet">sheet</span>; 6.1269 -};</pre> 6.1270 - 6.1271 - <p>The <dfn title="dom-LinkStyle-sheet"><code>sheet</code></dfn> attribute 6.1272 - must return the <span>associated style sheet</span> for the node, or null, 6.1273 - if there is no <span>associated style sheet</span>.</p> 6.1274 + <!-- ........................................................................................................................ --> 6.1275 + 6.1276 + <h4>The <code>LinkStyle</code> Interface</h4> 6.1277 + 6.1278 + <!--{@idl(LinkStyle)}--> 6.1279 6.1280 <div class="example"> 6.1281 <p>In the following HTML snippet the first HTML <code>style</code> 6.1282 @@ -1419,7 +1115,7 @@ 6.1283 <p class="note">Whether or not the node refers to a style sheet is defined 6.1284 by the specification that defines the semantics of said node.</p> 6.1285 6.1286 - 6.1287 + <!-- ........................................................................................................................ --> 6.1288 6.1289 <h4>Requirements on specifications</h4> 6.1290 6.1291 @@ -1432,38 +1128,44 @@ 6.1292 6.1293 6.1294 6.1295 + <!-- ........................................................................................................................ --> 6.1296 + 6.1297 <h4>Requirements on User Agents Implementing the 6.1298 - <span title><code>xml-stylesheet</code> processing instruction</span></h4> 6.1299 + <span><code>xml-stylesheet</code> processing instruction</span></h4> 6.1300 6.1301 <!-- XXX load/error events, reparse --> 6.1302 6.1303 + <!--{@idl(ProcessingInstruction)}--> 6.1304 + 6.1305 + <!-- 6.1306 <pre class="idl"><span data-anolis-spec=dom>ProcessingInstruction</span> implements <span>LinkStyle</span>;</pre> 6.1307 + --> 6.1308 6.1309 <p>For each 6.1310 <span data-anolis-spec=xmlss><code>xml-stylesheet</code> processing instruction</span> 6.1311 that is not part of the 6.1312 <span data-anolis-spec=xml>document type declaration</span> and has an 6.1313 - <code title>href</code> 6.1314 + <code>href</code> 6.1315 <span data-anolis-spec=xmlss>pseudo-attribute</span> these steps must 6.1316 (unless otherwise stated) be run:</p> 6.1317 6.1318 <ol> 6.1319 - <li><p>Let <var title>title</var> be the value of the 6.1320 - <code title>title</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> or the empty string if the 6.1321 - <code title>title</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> is not specified.</p></li> 6.1322 - 6.1323 - <li><p>If there is an <code title>alternate</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> 6.1324 + <li><p>Let <var>title</var> be the value of the 6.1325 + <code>title</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> or the empty string if the 6.1326 + <code>title</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> is not specified.</p></li> 6.1327 + 6.1328 + <li><p>If there is an <code>alternate</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> 6.1329 whose value is a <span data-anolis-spec=dom>case-sensitive</span> match 6.1330 - for "<code title>yes</code>" and <var title>title</var> is the 6.1331 + for "<code>yes</code>" and <var>title</var> is the 6.1332 empty string terminate these steps.</p></li> 6.1333 6.1334 - <li><p>If there is a <code title>type</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> whose 6.1335 + <li><p>If there is a <code>type</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> whose 6.1336 value is not a <span>supported styling language</span> the user agent 6.1337 may terminate these steps.</p></li> 6.1338 6.1339 <li><p><span data-anolis-spec=html title="Resolve a URL">Resolve</span> 6.1340 the <span data-anolis-spec=html>URL</span> specified by the 6.1341 - <code title>href</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> and then 6.1342 + <code>href</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> and then 6.1343 <span data-anolis-spec=html>fetch</span> it.</p></li> 6.1344 6.1345 <li> 6.1346 @@ -1473,7 +1175,7 @@ 6.1347 <span data-anolis-spec=html>Content-Type metadata</span> of 6.1348 the resource is not a <span>supported styling language</span> change the 6.1349 <span data-anolis-spec=html>Content-Type metadata</span> of the resource 6.1350 - to <code title>text/css</code>.</p> 6.1351 + to <code>text/css</code>.</p> 6.1352 6.1353 <p class="note">This step might never actually happen, but is included 6.1354 here in case other specifications change, to keep things consistent.</p> 6.1355 @@ -1500,14 +1202,14 @@ 6.1356 <dd><p>null</p></dd> 6.1357 6.1358 <dt><span>style sheet media</span></dt> 6.1359 - <dd><p>The value of the <code title>media</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> 6.1360 + <dd><p>The value of the <code>media</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> 6.1361 if any, or the empty string otherwise.</p></dd> 6.1362 6.1363 <dt><span>style sheet title</span></dt> 6.1364 - <dd><p><var title>title</var></p></dd> 6.1365 + <dd><p><var>title</var></p></dd> 6.1366 6.1367 <dt><span>style sheet alternate flag</span></dt> 6.1368 - <dd><p>Set if the <code title>alternate</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> 6.1369 + <dd><p>Set if the <code>alternate</code> <span data-anolis-spec=xmlss>pseudo-attribute</span> 6.1370 value is a <span data-anolis-spec=dom>case-sensitive</span> match for 6.1371 "<code>yes</code>", or unset otherwise. 6.1372 </dl> 6.1373 @@ -1516,8 +1218,10 @@ 6.1374 6.1375 6.1376 6.1377 + <!-- ........................................................................................................................ --> 6.1378 + 6.1379 <h4>Requirements on User Agents Implementing the HTTP 6.1380 - <code title>Link</code> Header</h4> 6.1381 + <code>Link</code> Header</h4> 6.1382 6.1383 <!-- XXX ref, one day --> 6.1384 6.1385 @@ -1526,17 +1230,17 @@ 6.1386 <p>For each HTTP <code title="http-link">Link</code> header of which one 6.1387 of the link relation types is an 6.1388 <span data-anolis-spec=dom>ASCII case-insensitive</span> match 6.1389 - for "<code title>stylesheet</code>" these steps 6.1390 + for "<code>stylesheet</code>" these steps 6.1391 must be run:</p> 6.1392 6.1393 <ol> 6.1394 - <li><p>Let <var title>title</var> be the value of the first of all the 6.1395 - <code title>title</code> and <code title>title*</code> parameters. 6.1396 + <li><p>Let <var>title</var> be the value of the first of all the 6.1397 + <code>title</code> and <code>title*</code> parameters. 6.1398 If there are no such parameters it is the empty string.</p></li> 6.1399 6.1400 <li><p>If one of the (other) link relation types is an 6.1401 <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 6.1402 - "<code title>alternate</code>" and <var title>title</var> is the 6.1403 + "<code>alternate</code>" and <var>title</var> is the 6.1404 empty string terminate these steps.</p></li> 6.1405 6.1406 <li><p><span data-anolis-spec=html title="Resolve a URL">Resolve</span> 6.1407 @@ -1548,7 +1252,7 @@ 6.1408 and the <span data-anolis-spec=html>Content-Type metadata</span> of 6.1409 the resource is not a <span>supported styling language</span> change the 6.1410 <span data-anolis-spec=html>Content-Type metadata</span> of the resource 6.1411 - to <code title>text/css</code>.</p></li> 6.1412 + to <code>text/css</code>.</p></li> 6.1413 6.1414 <li><p>If the resource is not in a 6.1415 <span>supported styling language</span> terminate these steps.</p></li> 6.1416 @@ -1574,21 +1278,23 @@ 6.1417 <dd><p>null</p></dd> 6.1418 6.1419 <dt><span>style sheet media</span></dt> 6.1420 - <dd><p>The value of the first <code title>media</code> parameter.</p></dd> 6.1421 + <dd><p>The value of the first <code>media</code> parameter.</p></dd> 6.1422 <!-- XXX register media parameter? bah --> 6.1423 6.1424 <dt><span>style sheet title</span></dt> 6.1425 - <dd><p><var title>title</var></p></dd> 6.1426 + <dd><p><var>title</var></p></dd> 6.1427 6.1428 <dt><span>style sheet alternate flag</span></dt> 6.1429 <dd><p>Set if one of the specified link relation type for this HTTP 6.1430 <code title="http-link">Link</code> header is an 6.1431 <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 6.1432 - "<code title>alternate</code>", or false otherwise. 6.1433 + "<code>alternate</code>", or false otherwise. 6.1434 </dl> 6.1435 </li> 6.1436 </ol> 6.1437 6.1438 + <!-- ........................................................................................................................ --> 6.1439 + <!-- ........................................................................................................................ --> 6.1440 6.1441 <h3>CSS Rules</h3> 6.1442 6.1443 @@ -1637,337 +1343,98 @@ 6.1444 attribute, followed the character "<code>;</code>" (U+003B).</p></dd> 6.1445 </dl> 6.1446 6.1447 - <p>To <dfn>insert a CSS rule</dfn> <var title>rule</var> into a 6.1448 - CSS rule list <var title>list</var> at location 6.1449 - <var title>index</var> follow these steps:</p> 6.1450 + <p>To <dfn>insert a CSS rule</dfn> <var>rule</var> into a 6.1451 + CSS rule list <var>list</var> at location 6.1452 + <var>index</var> follow these steps:</p> 6.1453 6.1454 <ol> 6.1455 - <li><p>If <var title>index</var> is negative or greater than the 6.1456 - length of the <var title>list</var>, 6.1457 + <li><p>If <var>index</var> is negative or greater than the 6.1458 + length of the <var>list</var>, 6.1459 <span data-anolis-spec=dom title=concept-throw>throw</span> an 6.1460 "<code data-anolis-spec=dom>IndexSizeError</code>" exception and 6.1461 - terminate these steps. 6.1462 + terminate these steps.</li> 6.1463 6.1464 <li><p><span title="Parse a CSS rule">Parse</span> 6.1465 - <var title>rule</var>.</p></li> 6.1466 + <var>rule</var>.</p></li> 6.1467 6.1468 <li><p>If parsing failed terminate these steps.</p></li> 6.1469 6.1470 <li><p>If the new object can not be inserted within the 6.1471 - <var title>list</var> at the given <var title>index</var> due to 6.1472 + <var>list</var> at the given <var>index</var> due to 6.1473 limitations of the CSS specification, 6.1474 <span data-anolis-spec=dom title=concept-throw>throw</span> an 6.1475 "<code data-anolis-spec=dom>HierarchyRequestError</code>" exception and 6.1476 - terminate these steps. 6.1477 - 6.1478 - <li><p>Insert the new object at the given <var title>index</var> 6.1479 - within the <var title>list</var>.</p></li> 6.1480 + terminate these steps.</li> 6.1481 + 6.1482 + <li><p>Insert the new object at the given <var>index</var> 6.1483 + within the <var>list</var>.</p></li> 6.1484 </ol> 6.1485 6.1486 <p>To <dfn>remove a CSS rule</dfn> from CSS rule list 6.1487 - <var title>list</var> at location <var title>index</var> follow 6.1488 + <var>list</var> at location <var>index</var> follow 6.1489 these steps:</p> 6.1490 6.1491 <ol> 6.1492 - <li><p>If <var title>index</var> is negative or greater than the 6.1493 - length of the <var title>list</var> 6.1494 + <li><p>If <var>index</var> is negative or greater than the 6.1495 + length of the <var>list</var> 6.1496 <span data-anolis-spec=dom title=concept-throw>throw</span> an 6.1497 "<code data-anolis-spec=dom>IndexSizeError</code>" exception and terminate these steps.</p></li> 6.1498 6.1499 - <li><p>Remove the object at <var title>index</var> from 6.1500 - <var title>list</var>.</p></li> 6.1501 + <li><p>Remove the object at <var>index</var> from 6.1502 + <var>list</var>.</p></li> 6.1503 </ol> 6.1504 6.1505 6.1506 - <h4>The <code title>CSSRuleList</code> Sequence</h4> 6.1507 - 6.1508 - <p>The <code>CSSRuleList</code> object represents an ordered collection of 6.1509 - CSS rules.</p> 6.1510 - 6.1511 - <pre class="idl">typedef sequence<<span>CSSRule</span>> <dfn>CSSRuleList</dfn>;</pre> 6.1512 - 6.1513 - 6.1514 - <h4>The <code title>CSSRule</code> Interface</h4> 6.1515 - 6.1516 - <p>The <code>CSSRule</code> interface is a base interface. Each unique 6.1517 - CSS rule has its own interface which inherits from this one.</p> 6.1518 - 6.1519 - <pre class="idl">interface <dfn>CSSRule</dfn> { 6.1520 - // Types 6.1521 - const unsigned short <span title="dom-CSSRule-STYLE_RULE">STYLE_RULE</span> = 1; 6.1522 - const unsigned short <span title="dom-CSSRule-IMPORT_RULE">IMPORT_RULE</span> = 3; 6.1523 - const unsigned short <span title="dom-CSSRule-MEDIA_RULE">MEDIA_RULE</span> = 4; 6.1524 - const unsigned short <span title="dom-CSSRule-FONT_FACE_RULE">FONT_FACE_RULE</span> = 5; 6.1525 - const unsigned short <span title="dom-CSSRule-PAGE_RULE">PAGE_RULE</span> = 6; 6.1526 - const unsigned short <span title="dom-CSSRule-NAMESPACE_RULE">NAMESPACE_RULE</span> = 10; 6.1527 - readonly attribute unsigned short <span title="dom-CSSRule-type">type</span>; 6.1528 - 6.1529 - // Parsing and serialization 6.1530 - attribute DOMString <span title="dom-CSSRule-cssText">cssText</span>; 6.1531 - 6.1532 - // Context 6.1533 - readonly attribute <span>CSSRule</span> <span title="dom-CSSRule-parentRule">parentRule</span>; 6.1534 - readonly attribute <span>CSSStyleSheet</span> <span title="dom-CSSRule-parentStyleSheet">parentStyleSheet</span>; 6.1535 -};</pre> 6.1536 - 6.1537 - 6.1538 - <p>The 6.1539 - <dfn id="dom-cssrule-type" title="dom-CSSRule-type"><code>type</code></dfn> 6.1540 - attribute must return the <span>CSS rule</span> type, 6.1541 - as follows:</p> 6.1542 - 6.1543 - <dl class="switch"> 6.1544 - <dt><dfn id="dom-cssrule-style_rule" title="dom-CSSRule-STYLE_RULE"><code>STYLE_RULE</code></dfn> (numeric value 1)</dt> 6.1545 - <dd>The object is a <code>CSSStyleRule</code>.</dd> 6.1546 - <dt><dfn id="dom-cssrule-import_rule" title="dom-CSSRule-IMPORT_RULE"><code>IMPORT_RULE</code></dfn> (numeric value 3)</dt> 6.1547 - <dd>The object is a <code>CSSImportRule</code>.</dd> 6.1548 - <dt><dfn id="dom-cssrule-media_rule" title="dom-CSSRule-MEDIA_RULE"><code>MEDIA_RULE</code></dfn> (numeric value 4)</dt> 6.1549 - <dd>The object is a <code>CSSMediaRule</code>.</dd> 6.1550 - <dt><dfn id="dom-cssrule-font_face_rule" title="dom-CSSRule-FONT_FACE_RULE"><code>FONT_FACE_RULE</code></dfn> (numeric value 5)</dt> 6.1551 - <dd>The object is a <code>CSSFontFaceRule</code>.</dd> 6.1552 - <dt><dfn id="dom-cssrule-page_rule" title="dom-CSSRule-PAGE_RULE"><code>PAGE_RULE</code></dfn> (numeric value 6)</dt> 6.1553 - <dd>The object is a <code>CSSPageRule</code>.</dd> 6.1554 - <dt><dfn id="dom-cssrule-namespace_rule" title="dom-CSSRule-NAMESPACE_RULE"><code>NAMESPACE_RULE</code></dfn> (numeric value 10)</dt> 6.1555 - <dd>The object is a <code>CSSNamespaceRule</code>.</dd> 6.1556 - </dl> 6.1557 - 6.1558 - <p class="note">Constants with values 0 and 2 have been obsoleted by this 6.1559 - specification. They might be re-allocated in the future. 6.1560 - 6.1561 - <p class="note">Constants for new and proprietary features are coordinated 6.1562 - on the 6.1563 - <a href="http://wiki.csswg.org/spec/cssom-constants">CSSOM Constants</a> 6.1564 - wiki page. 6.1565 - 6.1566 - <p>The 6.1567 - <dfn id="dom-cssrule-csstext" title="dom-CSSRule-cssText"><code>cssText</code></dfn> 6.1568 - attribute, on getting, must return a 6.1569 - <span title="serialize a CSS rule">serialization</span> of the 6.1570 - <span>CSS rule</span>.</p> 6.1571 - 6.1572 - <p>On setting the <code title="dom-CSSRule-cssText">cssText</code> 6.1573 - attribute these steps must be run:</p> 6.1574 - 6.1575 - <ol> 6.1576 - <li><p><span title="Parse a CSS rule">Parse</span> the value.</p></li> 6.1577 - 6.1578 - <li><p>If parsing failed terminate this algorithm.</p></li> 6.1579 - 6.1580 - <li><p>If the <code title="dom-CSSRule-type">type</code> of the new 6.1581 - object does not match the <code title="dom-CSSRule-type">type</code> of 6.1582 - the current object 6.1583 - <span data-anolis-spec=dom title=concept-throw>throw</span> an 6.1584 - "<code data-anolis-spec=dom>InvalidModificationError</code>" exception. 6.1585 - 6.1586 - <li><p>Replace the current object with the new object.</p></li> 6.1587 - </ol> 6.1588 - 6.1589 - 6.1590 - <p>The 6.1591 - <dfn id="dom-cssrule-parentrule" title="dom-CSSRule-parentRule"><code>parentRule</code></dfn> 6.1592 - attribute must return the nearest enclosing rule of the 6.1593 - current rule or null, if there is no enclosing rule.</p> 6.1594 - 6.1595 - <p class="note">E.g. <code title>@media</code> can enclose a rule.</p> 6.1596 - 6.1597 - <p>The 6.1598 - <dfn id="dom-cssrule-parentstylesheet" title="dom-CSSRule-parentStyleSheet"><code>parentStyleSheet</code></dfn> 6.1599 - attribute must return the <code>CSSStyleSheet</code> 6.1600 - object that contains the the current rule.</p> 6.1601 - 6.1602 - 6.1603 - 6.1604 - <h4>CSS Style Rule (Rule Set)</h4> 6.1605 - 6.1606 - <p>The <code>CSSStyleRule</code> object represents a rule set.</p> 6.1607 - <!-- XXX ref --> 6.1608 - 6.1609 - <pre class="idl">interface <dfn>CSSStyleRule</dfn> : <span>CSSRule</span> { 6.1610 - attribute DOMString <span title="dom-CSSStyleRule-selectorText">selectorText</span>; 6.1611 - readonly attribute <span>CSSStyleDeclaration</span> <span title="dom-CSSStyleRule-style">style</span>; 6.1612 -};</pre> 6.1613 - 6.1614 - <p>The 6.1615 - <dfn id="dom-cssstylerule-selectortext" title="dom-CSSStyleRule-selectorText"><code>selectorText</code></dfn> 6.1616 - attribute, on getting, must return the result of 6.1617 - <span title="serialize a group of selectors">serializing</span> the 6.1618 - associated <span>group of selectors</span>.</p> 6.1619 - 6.1620 - <p>On setting the 6.1621 - <code title="dom-CSSStyleRule-selectorText">selectorText</code> attribute 6.1622 - these steps must be run:</p> 6.1623 - 6.1624 - <ol> 6.1625 - <li><p>Run the <span>parse a group of selectors</span> algorithm on the 6.1626 - given value.</p></li> 6.1627 - 6.1628 - <li><p>If the algorithm returns a non-null value replace the associated 6.1629 - <span>group of selectors</span> with the returned value.</p></li> 6.1630 - 6.1631 - <li><p>Otherwise, if the algorithm returns a null value, do 6.1632 - nothing.</p></li> 6.1633 - </ol> 6.1634 - 6.1635 - <p>The 6.1636 - <dfn id="dom-cssstylerule-style" title="dom-CSSStyleRule-style"><code>style</code></dfn> 6.1637 - attribute must return a 6.1638 - <code>CSSStyleDeclaration</code> object for the rule set.</p> 6.1639 - 6.1640 - 6.1641 - <h4>CSS <code title>@import</code> Rule</h4> 6.1642 - 6.1643 - <p>The <code>CSSImportRule</code> object represents an 6.1644 - <code>@import</code> rule.</p> 6.1645 - 6.1646 - <pre class="idl">interface <dfn>CSSImportRule</dfn> : <span>CSSRule</span> { 6.1647 - readonly attribute DOMString <span title="dom-CSSImportRule-href">href</span>; 6.1648 - [PutForwards=<span title="dom-MediaList-mediaText">mediaText</span>] readonly attribute <span>MediaList</span> <span title="dom-CSSImportRule-media">media</span>; 6.1649 - readonly attribute <span>CSSStyleSheet</span> <span title="dom-CSSImportRule-styleSheet">styleSheet</span>; 6.1650 -};</pre> 6.1651 - 6.1652 - <p>The 6.1653 - <dfn id="dom-cssimportrule-href" title="dom-CSSImportRule-href"><code>href</code></dfn> 6.1654 - attribute must return the <span>URL</span> specified 6.1655 - by the <code>@import</code> rule.</p> 6.1656 - 6.1657 - <p class="note">To get the resolved <span>URL</span> use the 6.1658 - <code title="dom-StyleSheet-href">href</code> attribute of the associated 6.1659 - <span>style sheet</span>.</p> 6.1660 - 6.1661 - <p>The 6.1662 - <dfn id="dom-cssimportrule-media" title="dom-CSSImportRule-media"><code>media</code></dfn> 6.1663 - attribute must return the value of the 6.1664 - <code title="dom-StyleSheet-media">media</code> attribute of the 6.1665 - associated <span>style sheet</span>.</p> 6.1666 - 6.1667 - <p>The 6.1668 - <dfn id="dom-cssimportrule-stylesheet" title="dom-CSSImportRule-stylesheet"><code>styleSheet</code></dfn> 6.1669 - attribute must return the associated 6.1670 - <span>style sheet</span>.</p> 6.1671 - 6.1672 - <p class="note">If loading of the style sheet fails its 6.1673 - <code title="dom-CSSStyleSheet-cssRules">cssRules</code> list is simply 6.1674 - empty. I.e. an <code>@import</code> rule always has an associated 6.1675 - <span>style sheet</span>.</p> 6.1676 - 6.1677 - 6.1678 - <h4>CSS <code title>@media</code> Rule</h4> 6.1679 - 6.1680 - <p>The <code>CSSMediaRule</code> object represents an 6.1681 - <code title>@media</code> rule.</p> 6.1682 - 6.1683 - <pre class="idl">interface <dfn>CSSMediaRule</dfn> : <span>CSSRule</span> { 6.1684 - [PutForwards=<span title="dom-MediaList-mediaText">mediaText</span>] readonly attribute <span>MediaList</span> <span title="dom-CSSMediaRule-media">media</span>; 6.1685 - readonly attribute <span>CSSRuleList</span> <span title="dom-CSSMediaRule-cssRules">cssRules</span>; 6.1686 - unsigned long <span title="dom-CSSMediaRule-insertRule">insertRule</span>(DOMString <var title>rule</var>, in unsigned long <var title>index</var>); 6.1687 - void <span title="dom-CSSMediaRule-deleteRule">deleteRule</span>(unsigned long <var title>index</var>); 6.1688 -};</pre> 6.1689 - 6.1690 - <p>The 6.1691 - <dfn id="dom-cssmediarule-media" title="dom-CSSMediaRule-media"><code>media</code></dfn> 6.1692 - attribute must return a 6.1693 - <code>MediaList</code> object for the list of media queries specified 6.1694 - with the <code title>@media</code> rule.</p> 6.1695 - 6.1696 - <p>The 6.1697 - <dfn id="dom-cssmediarule-cssrules" title="dom-CSSMediaRule-cssRules"><code>cssRules</code></dfn> 6.1698 - attribute must return a 6.1699 - <code>CSSRuleList</code> object for the list of CSS rules specified with the 6.1700 - <code title>@media</code> rule.</p> 6.1701 - 6.1702 - <p>The 6.1703 - <dfn id="dom-cssmediarule-insertrule" title="dom-CSSMediaRule-insertRule"><code>insertRule(<var title>rule</var>, 6.1704 - <var title>index</var>)</code></dfn> method must 6.1705 - <span>insert a CSS rule</span> <var title>rule</var> into the 6.1706 - CSS rule list returned by 6.1707 - <code title="dom-CSSMediaRule-cssRules">cssRules</code> at 6.1708 - <var title>index</var>.</p> 6.1709 - 6.1710 - <p>The 6.1711 - <dfn id="dom-cssmediarule-deleterule" title="dom-CSSMediaRule-deleteRule"><code>deleteRule(<var title>index</var>)</code></dfn> 6.1712 - method must <span>remove a CSS rule</span> from the 6.1713 - CSS rule list returned by 6.1714 - <code title="dom-CSSMediaRule-cssRules">cssRules</code> at 6.1715 - <var title>index</var>.</p> 6.1716 - 6.1717 - 6.1718 - <h4>CSS <code title>@font-face</code> Rule</h4> 6.1719 - 6.1720 - <p>The <code>CSSFontFaceRule</code> object represents an 6.1721 - <code>@font-face</code> rule.</p> 6.1722 - 6.1723 - <pre class="idl">interface <dfn>CSSFontFaceRule</dfn> : <span>CSSRule</span> { 6.1724 - readonly attribute <span>CSSStyleDeclaration</span> <span title="dom-CSSFontFaceRule-style">style</span>; 6.1725 -};</pre> 6.1726 - 6.1727 - <p>The 6.1728 - <dfn id="dom-cssfontfacerule-style" title="dom-CSSFontFaceRule-style"><code>style</code></dfn> 6.1729 - attribute must return a <code>CSSStyleDeclaration</code> 6.1730 - block that contains the property declarations specified within the 6.1731 - <code>@font-face</code> rule.</p> 6.1732 - 6.1733 - 6.1734 - <h4>CSS <code title>@page</code> Rule</h4> 6.1735 - 6.1736 - <p class="XXX">Need to define the rules for 6.1737 - <dfn id="parse-a-css-page-selector">parse a CSS page selector</dfn> and 6.1738 - <dfn id="serialize-a-css-page-selector">serialize a CSS page selector</dfn>.</p> 6.1739 - 6.1740 - <p>The <code>CSSPageRule</code> object represents an <code>@page</code> 6.1741 - rule.</p> 6.1742 - 6.1743 - <pre class="idl">interface <dfn>CSSPageRule</dfn> : <span>CSSRule</span> { 6.1744 - attribute DOMString <span title="dom-CSSPageRule-selectorText">selectorText</span>; 6.1745 - readonly attribute <span>CSSStyleDeclaration</span> <span title="dom-CSSPageRule-style">style</span>; 6.1746 -};</pre> 6.1747 - 6.1748 - <p>The 6.1749 - <dfn id="dom-csspagerule-selectortext" title="dom-CSSPageRule-selectorText"><code>selectorText</code></dfn> 6.1750 - attribute, on getting, must return the result of 6.1751 - <span title="serialize a CSS page selector">serializing</span> the 6.1752 - associated <span>CSS page selector</span>.</p> 6.1753 - 6.1754 - <p>On setting the 6.1755 - <code title="dom-CSSPageRule-selectorText">selectorText</code> attribute 6.1756 - these steps must be run:</p> 6.1757 - 6.1758 - <ol> 6.1759 - <li><p>Run the <span>parse a CSS page selector</span> algorithm on the 6.1760 - given value.</p></li> 6.1761 - 6.1762 - <li><p>If the algorithm returns a non-null value replace the associated 6.1763 - <span>CSS page selector</span> with the returned value.</p></li> 6.1764 - 6.1765 - <li><p>Otherwise, if the algorithm returns a null value, do 6.1766 - nothing.</p></li> 6.1767 - </ol> 6.1768 - 6.1769 - <p>The 6.1770 - <dfn id="dom-csspagerule-style" title="dom-CSSPageRule-style"><code>style</code></dfn> 6.1771 - attribute must return a 6.1772 - <code>CSSStyleDeclaration</code> for the <code>@page</code> rule.</p> 6.1773 - 6.1774 - 6.1775 - <h4>CSS <code title>@namespace</code> Rule</h4> 6.1776 - 6.1777 - <p>The <code>CSSNamespaceRule</code> object represents an 6.1778 - <code>@namespace</code> rule.</p> 6.1779 - 6.1780 - <pre class="idl">interface <dfn>CSSNamespaceRule</dfn> : <span>CSSRule</span> { 6.1781 - readonly attribute DOMString <span title="dom-CSSNamespaceRule-namespaceURI">namespaceURI</span>; 6.1782 - readonly attribute DOMString? <span title="dom-CSSNamespaceRule-prefix">prefix</span>; 6.1783 -};</pre> 6.1784 - 6.1785 - <p>The 6.1786 - <dfn id="dom-cssnamespacerule-namespaceuri" title="dom-CSSNamespaceRule-namespaceURI"><code>namespaceURI</code></dfn> 6.1787 - attribute must return the namespace of 6.1788 - the <code>@namespace</code> rule.</p> 6.1789 - 6.1790 - <p>The 6.1791 - <dfn id="dom-cssnamespacerule-prefix" title="dom-CSSNamespaceRule-prefix"><code>prefix</code></dfn> 6.1792 - attribute must return the prefix of the 6.1793 - <code>@namespace</code> rule or the empty string if there is no prefix.</p> 6.1794 - 6.1795 + <!-- ........................................................................................................................ --> 6.1796 + 6.1797 + <h4>The <code>CSSRuleList</code> Sequence</h4> 6.1798 + 6.1799 + <!--{@idl(CSSRuleList)}--> 6.1800 + 6.1801 + <!-- ........................................................................................................................ --> 6.1802 + 6.1803 + <h4>The <code>CSSRule</code> Interface</h4> 6.1804 + 6.1805 + <!--{@idl(CSSRule)}--> 6.1806 + 6.1807 + <!-- ........................................................................................................................ --> 6.1808 + 6.1809 + <h4>The <code>CSSStyleRule</code> Interface</h4> 6.1810 + 6.1811 + <!--{@idl(CSSStyleRule)}--> 6.1812 + 6.1813 + <!-- ........................................................................................................................ --> 6.1814 + 6.1815 + <h4>The <code>CSSImportRule</code> Interface</h4> 6.1816 + 6.1817 + <!--{@idl(CSSImportRule)}--> 6.1818 + 6.1819 + <!-- ........................................................................................................................ --> 6.1820 + 6.1821 + <h4>The <code>CSSMediaRule</code> Interface</h4> 6.1822 + 6.1823 + <!--{@idl(CSSMediaRule)}--> 6.1824 + 6.1825 + <!-- ........................................................................................................................ --> 6.1826 + 6.1827 + <h4>The <code>CSSFontFaceRule</code> Interface</h4> 6.1828 + 6.1829 + <!--{@idl(CSSFontFaceRule)}--> 6.1830 + 6.1831 + <!-- ........................................................................................................................ --> 6.1832 + 6.1833 + <h4>The <code>CSSPageRule</code> Interface</h4> 6.1834 + 6.1835 + <!--{@idl(CSSPageRule)}--> 6.1836 + 6.1837 + <!-- ........................................................................................................................ --> 6.1838 + 6.1839 + <h4>The <code>CSSNamespaceRule</code> Interface</h4> 6.1840 + 6.1841 + <!--{@idl(CSSNamespaceRule)}--> 6.1842 + 6.1843 + <!-- ........................................................................................................................ --> 6.1844 + <!-- ........................................................................................................................ --> 6.1845 6.1846 <h3>CSS Declaration Blocks</h3> 6.1847 6.1848 @@ -2001,24 +1468,29 @@ 6.1849 6.1850 6.1851 6.1852 - <h4>The <code title>CSSStyleDeclaration</code> Interface</h4> 6.1853 - 6.1854 + <!-- ........................................................................................................................ --> 6.1855 + 6.1856 + <h4>The <code>CSSStyleDeclaration</code> Interface</h4> 6.1857 + 6.1858 + <!--{@idl(CSSStyleDeclaration)}--> 6.1859 + 6.1860 + <!-- 6.1861 <pre class="idl">interface <dfn>CSSStyleDeclaration</dfn> { 6.1862 attribute DOMString <span title="dom-CSSStyleDeclaration-cssText">cssText</span>; 6.1863 6.1864 readonly attribute unsigned long <span title="dom-CSSStyleDeclaration-length">length</span>; 6.1865 - DOMString <span title="dom-CSSStyleDeclaration-item">item</span>(unsigned long <var title>index</var>); 6.1866 - 6.1867 - DOMString <span title="dom-CSSStyleDeclaration-getPropertyValue">getPropertyValue</span>(DOMString <var title>property</var>); 6.1868 - DOMString <span title="dom-CSSStyleDeclaration-getPropertyPriority">getPropertyPriority</span>(DOMString <var title>property</var>); 6.1869 - void <span title="dom-CSSStyleDeclaration-setProperty">setProperty</span>(DOMString <var title>property</var>, DOMString <var title>value</var>, optional DOMString <var title>priority</var>); 6.1870 - DOMString <span title="dom-CSSStyleDeclaration-removeProperty">removeProperty</span>(DOMString <var title>property</var>); 6.1871 + DOMString <span title="dom-CSSStyleDeclaration-item">item</span>(unsigned long <var>index</var>); 6.1872 + 6.1873 + DOMString <span title="dom-CSSStyleDeclaration-getPropertyValue">getPropertyValue</span>(DOMString <var>property</var>); 6.1874 + DOMString <span title="dom-CSSStyleDeclaration-getPropertyPriority">getPropertyPriority</span>(DOMString <var>property</var>); 6.1875 + void <span title="dom-CSSStyleDeclaration-setProperty">setProperty</span>(DOMString <var>property</var>, DOMString <var>value</var>, optional DOMString <var>priority</var>); 6.1876 + DOMString <span title="dom-CSSStyleDeclaration-removeProperty">removeProperty</span>(DOMString <var>property</var>); 6.1877 6.1878 readonly attribute <span>CSSRule</span> <span title="dom-CSSStyleDeclaration-parentRule">parentRule</span>; 6.1879 6.1880 // CSS Properties 6.1881 -<!--CSSOM-DECLARATIONIDL--> 6.1882 };</pre> 6.1883 + --> 6.1884 6.1885 <p>The 6.1886 <dfn title="dom-CSSStyleDeclaration-cssText"><code>cssText</code></dfn> 6.1887 @@ -2026,15 +1498,15 @@ 6.1888 <span title="serialize a CSS declaration block">serializing</span> the 6.1889 <span>CSS declaration block declarations</span>.</p> 6.1890 6.1891 - <p>Setting the <code title>cssText</code> attribute must run these steps: 6.1892 + <p>Setting the <code>cssText</code> attribute must run these steps: 6.1893 6.1894 <ol> 6.1895 <li><p>If the <span>CSS declaration block readonly flag</span> is set, 6.1896 <span data-anolis-spec=dom title=concept-throw>throw</span> a 6.1897 "<code data-anolis-spec=dom>NoModificationAllowedError</code>" exception 6.1898 - and terminate these steps. 6.1899 - 6.1900 - <li><p>Empty the <span>CSS declaration block declarations</span>. 6.1901 + and terminate these steps.</li> 6.1902 + 6.1903 + <li><p>Empty the <span>CSS declaration block declarations</span>.</li> 6.1904 6.1905 <li><p><span title="Parse a CSS declaration block">Parse</span> the given 6.1906 value and, if the return value is not null, insert it into the 6.1907 @@ -2049,7 +1521,7 @@ 6.1908 the <span>collection of CSS declarations</span>.</p> 6.1909 6.1910 <p>The 6.1911 - <dfn title="dom-CSSStyleDeclaration-item"><code>item(<var title>index</var>)</code></dfn> 6.1912 + <dfn title="dom-CSSStyleDeclaration-item"><code>item(<var>index</var>)</code></dfn> 6.1913 method must <span class="XXX">...</span>.</p> 6.1914 <!-- returns the name of property at position index. --> 6.1915 6.1916 @@ -2062,14 +1534,14 @@ 6.1917 6.1918 <p>The 6.1919 <dfn title="dom-CSSStyleDeclaration-getPropertyPriority"><code>getPropertyPriority(<var>property</var>)</code></dfn> 6.1920 - method, when invoked, if <var title>property</var> is an 6.1921 + method, when invoked, if <var>property</var> is an 6.1922 <span data-anolis-spec=dom>ASCII case-insensitive</span> match for a 6.1923 property that has a priority user agents must return the canonical 6.1924 priority of that property as given in the syntax definition. Otherwise, 6.1925 the empty string must be returned.</p> 6.1926 6.1927 <p class="example">E.g. for <code>background-color:lime !IMPORTANT</code> 6.1928 - the return value would be "<code title>important</code>".</p> 6.1929 + the return value would be "<code>important</code>".</p> 6.1930 6.1931 6.1932 <p>The 6.1933 @@ -2080,36 +1552,36 @@ 6.1934 <li><p>If the <span>CSS declaration block readonly flag</span> is set, 6.1935 <span data-anolis-spec=dom title=concept-throw>throw</span> an 6.1936 "<code data-anolis-spec=dom>NoModificationAllowedError</code>" and 6.1937 - terminate these steps. 6.1938 - 6.1939 - <li><p>If <var title>property</var> is not an 6.1940 + terminate these steps.</li> 6.1941 + 6.1942 + <li><p>If <var>property</var> is not an 6.1943 <span data-anolis-spec=dom>ASCII case-insensitive</span> match for a 6.1944 supported property, terminate this algorithm.</p></li> 6.1945 6.1946 - <li><p>If <var title>value</var> is the empty string, invoke 6.1947 + <li><p>If <var>value</var> is the empty string, invoke 6.1948 <code title="dom-CSSStyleDeclaration-removeProperty">removeProperty()</code> 6.1949 - with <var title>property</var> as argument and terminate this 6.1950 + with <var>property</var> as argument and terminate this 6.1951 algorithm.</p></li> 6.1952 6.1953 - <li><p>If the <var title>priority</var> argument has been omitted let 6.1954 - <var title>priority</var> be the empty string.</p></li> 6.1955 - 6.1956 - <li><p>If <var title>priority</var> is neither a valid priority nor 6.1957 + <li><p>If the <var>priority</var> argument has been omitted let 6.1958 + <var>priority</var> be the empty string.</p></li> 6.1959 + 6.1960 + <li><p>If <var>priority</var> is neither a valid priority nor 6.1961 the empty string terminate this algorithm.</p></li> 6.1962 <!-- define valid priority somehow --> 6.1963 6.1964 <li> 6.1965 <p>If <span title="parse a CSS value">parsing the 6.1966 - <var title>value</var></span> returns null terminate this algorithm. 6.1967 - 6.1968 - <p class="note"><var title>value</var> can not include 6.1969 - "<code title>!important</code>".</p> 6.1970 + <var>value</var></span> returns null terminate this algorithm. 6.1971 + 6.1972 + <p class="note"><var>value</var> can not include 6.1973 + "<code>!important</code>".</p> 6.1974 </li> 6.1975 6.1976 - <li><p>Finally, set <var title>property</var> to <var title>value</var> 6.1977 - with priority <var title>priority</var> when <var title>priority</var> 6.1978 + <li><p>Finally, set <var>property</var> to <var>value</var> 6.1979 + with priority <var>priority</var> when <var>priority</var> 6.1980 is not the empty string. Otherwise set 6.1981 - <var title>property</var> to <var title>value</var>.</p></li> 6.1982 + <var>property</var> to <var>value</var>.</p></li> 6.1983 </ol> 6.1984 6.1985 <p>The 6.1986 @@ -2120,12 +1592,12 @@ 6.1987 <li><p>If the <span>CSS declaration block readonly flag</span> is set, 6.1988 <span data-anolis-spec=dom title=concept-throw>throw</span> a 6.1989 "<code data-anolis-spec=dom>NoModificationAllowedError</code>" and 6.1990 - terminate these steps. 6.1991 - 6.1992 - <li><p>If <var title>property</var> is an 6.1993 + terminate these steps.</li> 6.1994 + 6.1995 + <li><p>If <var>property</var> is an 6.1996 <span data-anolis-spec=dom>ASCII case-insensitive</span> match for a 6.1997 property of a declaration in the 6.1998 - <span>collection of CSS declarations</span> remove the declaration.</p> 6.1999 + <span>collection of CSS declarations</span> remove the declaration.</p></li> 6.2000 </ol> 6.2001 6.2002 6.2003 @@ -2172,42 +1644,48 @@ 6.2004 following algorithm:</p> 6.2005 6.2006 <ol> 6.2007 - <li>Let <var title>r</var> be the CSS property to be 6.2008 + <li>Let <var>r</var> be the CSS property to be 6.2009 converted.</li> 6.2010 6.2011 <li>Uppercase the first character after every U+002D (<code>-</code>) in 6.2012 - <var title>r</var>.</li> 6.2013 - 6.2014 - <li>Remove every U+002D (<code>-</code>) in <var title>r</var>.</li> 6.2015 - 6.2016 - <li>Return <var title>r</var>.</li> 6.2017 + <var>r</var>.</li> 6.2018 + 6.2019 + <li>Remove every U+002D (<code>-</code>) in <var>r</var>.</li> 6.2020 + 6.2021 + <li>Return <var>r</var>.</li> 6.2022 </ol> 6.2023 6.2024 <p class="note">This means that 6.2025 - <code>-<var title>vendor</var>-<var title>property</var></code> 6.2026 + <code>-<var>vendor</var>-<var>property</var></code> 6.2027 becomes 6.2028 - <code><var title><strong>V</strong>endor</var><var title><strong>P</strong>roperty</var></code> 6.2029 + <code><var><strong>V</strong>endor</var><var><strong>P</strong>roperty</var></code> 6.2030 for instance.</p> 6.2031 --> 6.2032 6.2033 + <!-- ........................................................................................................................ --> 6.2034 + <!-- ........................................................................................................................ --> 6.2035 6.2036 <h3>CSS Values</h3> 6.2037 6.2038 + <!-- ........................................................................................................................ --> 6.2039 + 6.2040 <h4>Parsing CSS Values</h4> 6.2041 6.2042 <p>To <dfn id="parse-a-css-value">parse a CSS value</dfn> for a given 6.2043 - <var title>property</var> means to a parse the given value according to 6.2044 + <var>property</var> means to a parse the given value according to 6.2045 the definition of the property that is an 6.2046 <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 6.2047 - <var title>property</var> in the CSS specification. If the given value 6.2048 + <var>property</var> in the CSS specification. If the given value 6.2049 is <span>ignored</span> return null. Otherwise return the CSS value for 6.2050 - the given <var title>property</var>.</p> 6.2051 - 6.2052 - <p class="note">"<code title>!important</code>" declarations are not 6.2053 + the given <var>property</var>.</p> 6.2054 + 6.2055 + <p class="note">"<code>!important</code>" declarations are not 6.2056 part of the property value space and will therefore cause 6.2057 <span>parse a CSS value</span> to return null.</p> 6.2058 6.2059 6.2060 + <!-- ........................................................................................................................ --> 6.2061 + 6.2062 <h4>Serializing CSS Values</h4> 6.2063 6.2064 <!-- based on http://damowmow.com/playground/canon.txt --> 6.2065 @@ -2309,9 +1787,9 @@ 6.2066 <p>The concatenation of:</p> 6.2067 <ol> 6.2068 <li><p>If <counter> has three CSS component values the string 6.2069 - "<code title>counters(</code>".</p></li> 6.2070 + "<code>counters(</code>".</p></li> 6.2071 <li><p>If <counter> has two CSS component values the string 6.2072 - "<code title>counter(</code>".</p></li> 6.2073 + "<code>counter(</code>".</p></li> 6.2074 <li><p>The result of 6.2075 <span title="serialize a comma-separated list">serializing</span> the 6.2076 <span title="serialize a CSS component value">serialized</span> 6.2077 @@ -2363,7 +1841,7 @@ 6.2078 <number> followed by the literal string "<code>dpcm</code>".</dd> 6.2079 6.2080 <dt><shape></dt> 6.2081 - <dd><p>The string "<code title>rect(</code>", followed by the result 6.2082 + <dd><p>The string "<code>rect(</code>", followed by the result 6.2083 of <span title="serialize a comma-separated list">serializing</span> the 6.2084 <span title="serialize a CSS component value">serialized</span> 6.2085 CSS component values belonging to <shape> as list, followed by 6.2086 @@ -2432,78 +1910,25 @@ 6.2087 <p class="XXX">Some of these need to be updated per the new rules.</p> 6.2088 </div> 6.2089 6.2090 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.2091 + 6.2092 <h2>DOM Access to CSS Declaration Blocks</h2> 6.2093 6.2094 + <!-- ........................................................................................................................ --> 6.2095 + <!-- ........................................................................................................................ --> 6.2096 + 6.2097 <h3>The <code>ElementCSSInlineStyle</code> Interface</h3> 6.2098 6.2099 - <pre class="idl">[NoInterfaceObject] interface <dfn>ElementCSSInlineStyle</dfn> { 6.2100 - readonly attribute <span>CSSStyleDeclaration</span> <span>style</span>; 6.2101 -};</pre> 6.2102 - 6.2103 - <p class="XXX">...</p> 6.2104 - 6.2105 - <!-- XXX 6.2106 - how does this interact with the markup attribute 6.2107 - --> 6.2108 - 6.2109 - 6.2110 - 6.2111 - <h3>Extensions to the <code title>Window</code> Interface</h3> 6.2112 - 6.2113 - <pre class="idl">partial interface <span data-anolis-spec=html>Window</span> { 6.2114 - <span>CSSStyleDeclaration</span> <span title="dom-Window-getComputedStyle">getComputedStyle</span>(<span data-anolis-spec=dom>Element</span> <var title>elt</var>); 6.2115 - <span>CSSStyleDeclaration</span> <span title="dom-Window-getComputedStyle">getComputedStyle</span>(<span data-anolis-spec=dom>Element</span> <var title>elt</var>, DOMString <var title>pseudoElt</var>); 6.2116 -};</pre> 6.2117 - 6.2118 - <p>The 6.2119 - <dfn id="dom-window-getcomputedstyle" title="dom-Window-getComputedStyle"><code>getComputedStyle(<var title>elt</var>, <var title>pseudoElt</var>)</code></dfn> 6.2120 - method must run these steps:</p> 6.2121 - 6.2122 - <ol> 6.2123 - <li><p>Let <var title>doc</var> be the 6.2124 - <code data-anolis-spec=dom>Document</code> 6.2125 - associated with the <code data-anolis-spec=html>Window</code> object on 6.2126 - which the method was invoked.</p></li> 6.2127 - 6.2128 - <li><p>Let <var title>obj</var> be <var title>elt</var>.</p></li> 6.2129 - 6.2130 - <li><p>If <var title>pseudoElt</var> is as an 6.2131 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 6.2132 - either "<code>:before</code>" or "<code>::before</code>" let 6.2133 - <var title>obj</var> be the '::before' pseudo-element of 6.2134 - <var title>elt</var>.</p></li> 6.2135 - 6.2136 - <li><p>If <var title>pseudoElt</var> is as an 6.2137 - <span data-anolis-spec=dom>ASCII case-insensitive</span> match for 6.2138 - either "<code>:after</code>" or "<code>::after</code>" let 6.2139 - <var title>obj</var> be the '::after' pseudo-element of 6.2140 - <var title>elt</var>.</p></li> 6.2141 - 6.2142 - <li> 6.2143 - <p>Return a <span>CSS declaration block</span> with the 6.2144 - <span>CSS declaration block readonly flag</span> set and the 6.2145 - <span>CSS declaration block declarations</span> set to all properties 6.2146 - the user agent supports with as value the <span>resolved value</span> 6.2147 - computed for <var title>obj</var> using the style rules associated 6.2148 - with <var title>doc</var>.</p> 6.2149 - 6.2150 - <p class="note">This means that even if <var title>obj</var> is in a 6.2151 - different document (e.g. one fetched via <code>XMLHttpRequest</code>) it 6.2152 - will still use the style rules associated with the document that is 6.2153 - associated with the global object on which 6.2154 - <code title="dom-Window-getComputedStyle">getComputedStyle()</code> was 6.2155 - invoked to compute the <span>CSS declaration block</span>.</p> 6.2156 - </li> 6.2157 - 6.2158 - <!-- https://bugs.webkit.org/show_bug.cgi?id=14563 has reasons for why 6.2159 - this is slightly crazy --> 6.2160 - </ol> 6.2161 - 6.2162 - <p class="note">Because of historical IDL limitations the 6.2163 - <code title="dom-Window-getComputedStyle">getComputedStyle()</code> method 6.2164 - used to be on a separate interface, <code title>ViewCSS</code>.</p> 6.2165 - 6.2166 - 6.2167 + <!--{@idl(ElementCSSInlineStyle)}--> 6.2168 + 6.2169 + <!-- ........................................................................................................................ --> 6.2170 + <!-- ........................................................................................................................ --> 6.2171 + 6.2172 + <h3>Extensions to the <code>Window</code> Interface</h3> 6.2173 + 6.2174 + <!--{@idl(Window)}--> 6.2175 + 6.2176 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.2177 6.2178 <h2>Resolved Values</h2> 6.2179 6.2180 @@ -2571,12 +1996,14 @@ 6.2181 <dd><p>The <span>resolved value</span> is the computed value.</p></dd> 6.2182 </dl> 6.2183 6.2184 - 6.2185 - 6.2186 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.2187 6.2188 <h2 id="iana-considerations">IANA Considerations</h2> 6.2189 6.2190 - <h3><dfn title="http-default-style"><code>Default-Style</code></dfn></h5> 6.2191 + <!-- ........................................................................................................................ --> 6.2192 + <!-- ........................................................................................................................ --> 6.2193 + 6.2194 + <h3><dfn title="http-default-style"><code>Default-Style</code></dfn></h3> 6.2195 6.2196 <p>This section describes a header field for registration in the Permanent 6.2197 Message Header Field Registry. 6.2198 @@ -2597,16 +2024,23 @@ 6.2199 <dd>None.</dd> 6.2200 </dl> 6.2201 6.2202 - 6.2203 - 6.2204 - 6.2205 -<h2 class=no-num>References</h2> 6.2206 -<h3 class=no-num>Normative references</h3> 6.2207 -<div id=anolis-references-normative></div> 6.2208 - 6.2209 -<h3 class=no-num>Informative references</h3> 6.2210 -<div id=anolis-references-informative></div> 6.2211 - 6.2212 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.2213 + 6.2214 + <h2 class=no-num>References</h2> 6.2215 + 6.2216 + <!-- ........................................................................................................................ --> 6.2217 + <!-- ........................................................................................................................ --> 6.2218 + 6.2219 + <h3 class=no-num>Normative references</h3> 6.2220 + <div id=anolis-references-normative></div> 6.2221 + 6.2222 + <!-- ........................................................................................................................ --> 6.2223 + <!-- ........................................................................................................................ --> 6.2224 + 6.2225 + <h3 class=no-num>Informative references</h3> 6.2226 + <div id=anolis-references-informative></div> 6.2227 + 6.2228 + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 6.2229 6.2230 <h2 class="no-num" id="acknowledgments">Acknowledgments</h2> 6.2231 6.2232 @@ -2651,7 +2085,7 @@ 6.2233 6.2234 <style media="x"> invokes .sheet.media.mediaText = "x" 6.2235 6.2236 - <style title> does not "have" a title 6.2237 + <style> does not "have" a title 6.2238 6.2239 .cascadedStyle that returns less keywords than currentStyle, no inherit, 6.2240 etc.
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/cssom/cssom.css Mon Jul 16 00:55:13 2012 -0600 7.3 @@ -0,0 +1,316 @@ 7.4 +/* --- OLD --- 7.5 +.example { margin-left:1em; padding-left:1em; border-left:double; color:#222; background:#fcfcfc } 7.6 +.example table code { color:inherit } 7.7 +td, th { padding:.1em } 7.8 +.note { margin-left:2em; color:green; font-style:italic; font-weight:bold } 7.9 +p.note::before { content:"Note: " } 7.10 +.XXX { padding:.5em; border:solid red } 7.11 +p.XXX::before { content:"Issue: " } 7.12 +dl.switch { padding-left:2em } 7.13 +dl.switch > dt { text-indent:-1.5em } 7.14 +dl.switch > dt:before { content:'\21AA'; padding:0 0.5em 0 0; display:inline-block; width:1em; text-align:right; line-height:0.5em } 7.15 +code { color:orangered } 7.16 +code :link, code :visited { color:inherit } 7.17 +*/ 7.18 + 7.19 +/* --- INLINES --- */ 7.20 +em.rfc2119 { 7.21 + text-transform: lowercase; 7.22 + font-variant: small-caps; 7.23 + font-style: normal; 7.24 + color: #900; 7.25 +} 7.26 + 7.27 +h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym, 7.28 +h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr { 7.29 + border: none; 7.30 +} 7.31 + 7.32 +dfn { 7.33 + font-weight: bold; 7.34 +} 7.35 + 7.36 +a.internalDFN { 7.37 + color: inherit; 7.38 + border-bottom: 1px solid #99c; 7.39 + text-decoration: none; 7.40 +} 7.41 + 7.42 +a.externalDFN { 7.43 + color: inherit; 7.44 + border-bottom: 1px dotted #ccc; 7.45 + text-decoration: none; 7.46 +} 7.47 + 7.48 +a.bibref { 7.49 + text-decoration: none; 7.50 +} 7.51 + 7.52 +code { 7.53 + color: #ff4500; 7.54 +} 7.55 + 7.56 + 7.57 +/* --- EXAMPLES --- */ 7.58 +pre.example { 7.59 + border-top: 1px solid #ff4500; 7.60 + border-bottom: 1px solid #ff4500; 7.61 + padding: 1em; 7.62 + margin-top: 1em; 7.63 +} 7.64 + 7.65 +pre.example::before { 7.66 + content: "Example"; 7.67 + display: block; 7.68 + width: 150px; 7.69 + background: #ff4500; 7.70 + color: #fff; 7.71 + font-family: initial; 7.72 + padding: 3px; 7.73 + font-weight: bold; 7.74 + margin: -1em 0 1em -1em; 7.75 +} 7.76 + 7.77 +/* --- EDITORIAL NOTES --- */ 7.78 +.issue { 7.79 + padding: 1em; 7.80 + margin: 1em 0em 0em; 7.81 + border: 1px solid #f00; 7.82 + background: #ffc; 7.83 +} 7.84 + 7.85 +.issue::before { 7.86 + content: "Issue"; 7.87 + display: block; 7.88 + width: 150px; 7.89 + margin: -1.5em 0 0.5em 0; 7.90 + font-weight: bold; 7.91 + border: 1px solid #f00; 7.92 + background: #fff; 7.93 + padding: 3px 1em; 7.94 +} 7.95 + 7.96 +.note { 7.97 + margin: 1em 0em 0em; 7.98 + padding: 1em; 7.99 + border: 2px solid #cff6d9; 7.100 + background: #e2fff0; 7.101 +} 7.102 + 7.103 +.note::before { 7.104 + content: "Note"; 7.105 + display: block; 7.106 + width: 150px; 7.107 + margin: -1.5em 0 0.5em 0; 7.108 + font-weight: bold; 7.109 + border: 1px solid #cff6d9; 7.110 + background: #fff; 7.111 + padding: 3px 1em; 7.112 +} 7.113 + 7.114 +/* --- WEB IDL --- */ 7.115 + 7.116 +pre.idl { 7.117 + border-top: 1px solid #90b8de; 7.118 + border-bottom: 1px solid #90b8de; 7.119 + padding: 1em; 7.120 + line-height: 120%; 7.121 +} 7.122 + 7.123 +pre.idl::before { 7.124 + content: "WebIDL"; 7.125 + display: block; 7.126 + width: 150px; 7.127 + background: #90b8de; 7.128 + color: #fff; 7.129 + font-family: initial; 7.130 + padding: 3px; 7.131 + font-weight: bold; 7.132 + margin: -1em 0 1em -1em; 7.133 +} 7.134 + 7.135 +.idlType { 7.136 + color: #ff4500; 7.137 + font-weight: bold; 7.138 + text-decoration: none; 7.139 +} 7.140 + 7.141 +/*.idlModule*/ 7.142 +/*.idlModuleID*/ 7.143 +/*.idlInterface*/ 7.144 +.idlInterfaceID, .idlDictionaryID { 7.145 + font-weight: bold; 7.146 + color: #005a9c; 7.147 +} 7.148 + 7.149 +.idlSuperclass { 7.150 + font-style: italic; 7.151 + color: #005a9c; 7.152 +} 7.153 + 7.154 +/*.idlAttribute*/ 7.155 +.idlAttrType, .idlFieldType, .idlMemberType { 7.156 + color: #005a9c; 7.157 +} 7.158 +.idlAttrName, .idlFieldName, .idlMemberName { 7.159 + color: #ff4500; 7.160 +} 7.161 +.idlAttrName a, .idlFieldName a, .idlMemberName a { 7.162 + color: #ff4500; 7.163 + border-bottom: 1px dotted #ff4500; 7.164 + text-decoration: none; 7.165 +} 7.166 + 7.167 +/*.idlMethod*/ 7.168 +.idlMethType { 7.169 + color: #005a9c; 7.170 +} 7.171 +.idlMethName { 7.172 + color: #ff4500; 7.173 +} 7.174 +.idlMethName a { 7.175 + color: #ff4500; 7.176 + border-bottom: 1px dotted #ff4500; 7.177 + text-decoration: none; 7.178 +} 7.179 + 7.180 +/*.idlParam*/ 7.181 +.idlParamType { 7.182 + color: #005a9c; 7.183 +} 7.184 +.idlParamName { 7.185 + font-style: italic; 7.186 +} 7.187 + 7.188 +.extAttr { 7.189 + color: #666; 7.190 +} 7.191 + 7.192 +/*.idlConst*/ 7.193 +.idlConstType { 7.194 + color: #005a9c; 7.195 +} 7.196 +.idlConstName { 7.197 + color: #ff4500; 7.198 +} 7.199 +.idlConstName a { 7.200 + color: #ff4500; 7.201 + border-bottom: 1px dotted #ff4500; 7.202 + text-decoration: none; 7.203 +} 7.204 + 7.205 +/*.idlException*/ 7.206 +.idlExceptionID { 7.207 + font-weight: bold; 7.208 + color: #c00; 7.209 +} 7.210 + 7.211 +.idlTypedefID, .idlTypedefType { 7.212 + color: #005a9c; 7.213 +} 7.214 + 7.215 +.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code { 7.216 + color: #c00; 7.217 + font-weight: normal; 7.218 +} 7.219 + 7.220 +.excName a { 7.221 + font-family: monospace; 7.222 +} 7.223 + 7.224 +.idlRaises a.idlType, .excName a.idlType { 7.225 + border-bottom: 1px dotted #c00; 7.226 +} 7.227 + 7.228 +.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse { 7.229 + width: 45px; 7.230 + text-align: center; 7.231 +} 7.232 +.excGetSetTrue, .prmNullTrue, .prmOptTrue { color: #0c0; } 7.233 +.excGetSetFalse, .prmNullFalse, .prmOptFalse { color: #c00; } 7.234 + 7.235 +.idlImplements a { 7.236 + font-weight: bold; 7.237 +} 7.238 + 7.239 +dl.members, dl.attributes, dl.methods, dl.constants, dl.fields, dl.dictionary-members { 7.240 + margin-left: 2em; 7.241 +} 7.242 + 7.243 +.members dt, .attributes dt, .methods dt, .constants dt, .fields dt, .dictionary-members dt { 7.244 + font-weight: normal; 7.245 +} 7.246 + 7.247 +.members dt code, .attributes dt code, .methods dt code, .constants dt code, .fields dt code, .dictionary-members dt code { 7.248 + font-weight: bold; 7.249 + color: #000; 7.250 + font-family: monospace; 7.251 +} 7.252 + 7.253 +.members dt.attribute code, .members dt.field code, .members dt.dictionary-member code, .attributes dt code, .fields dt code, .dictionary-members dt code { 7.254 + background: #ffffd2; 7.255 +} 7.256 + 7.257 +.attributes dt .idlAttrType code, .fields dt .idlFieldType code, .dictionary-members dt .idlMemberType code { 7.258 + color: #005a9c; 7.259 + background: transparent; 7.260 + font-family: inherit; 7.261 + font-weight: normal; 7.262 + font-style: italic; 7.263 +} 7.264 + 7.265 +.members dt.method code, .methods dt code { 7.266 + background: #d9e6f8; 7.267 +} 7.268 + 7.269 +.members dt.constant code, .constants dt code { 7.270 + background: #ddffd2; 7.271 +} 7.272 + 7.273 +.attributes dd, .methods dd, .constants dd, .fields dd, .dictionary-members dd { 7.274 + margin-bottom: 1em; 7.275 +} 7.276 + 7.277 +table.parameters, table.exceptions { 7.278 + border-spacing: 0; 7.279 + border-collapse: collapse; 7.280 + margin: 0.5em 0; 7.281 + width: 100%; 7.282 +} 7.283 +table.parameters { border-bottom: 1px solid #90b8de; } 7.284 +table.exceptions { border-bottom: 1px solid #deb890; } 7.285 + 7.286 +.parameters th, .exceptions th { 7.287 + color: #fff; 7.288 + padding: 3px 5px; 7.289 + text-align: left; 7.290 + font-family: initial; 7.291 + font-weight: normal; 7.292 + text-shadow: #666 1px 1px 0; 7.293 +} 7.294 +.parameters th { background: #90b8de; } 7.295 +.exceptions th { background: #deb890; } 7.296 + 7.297 +.parameters td, .exceptions td { 7.298 + padding: 3px 10px; 7.299 + border-top: 1px solid #ddd; 7.300 + vertical-align: top; 7.301 +} 7.302 + 7.303 +.parameters tr:first-child td, .exceptions tr:first-child td { 7.304 + border-top: none; 7.305 +} 7.306 + 7.307 +.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName { 7.308 + width: 100px; 7.309 +} 7.310 + 7.311 +.parameters td.prmType { 7.312 + width: 120px; 7.313 +} 7.314 + 7.315 +table.exceptions table { 7.316 + border-spacing: 0; 7.317 + border-collapse: collapse; 7.318 + width: 100%; 7.319 +}
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/cssom/idl/CSSFontFaceRule.idl Mon Jul 16 00:55:13 2012 -0600 8.3 @@ -0,0 +1,12 @@ 8.4 +[Documentation= 8.5 + "<p>The {@name} {@type} represents a <code>@font-face</code> rule.</p>" 8.6 +] 8.7 +interface CSSFontFaceRule : CSSRule { 8.8 + 8.9 + [Documentation= 8.10 + "<p>The {@name} {@type} must return a <code>CSSStyleDeclaration</code> block that contains the property\ 8.11 + declarations specified within the <code>@font-face</code> rule.</p>" 8.12 + ] 8.13 + readonly attribute CSSStyleDeclaration style; 8.14 + 8.15 +};
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/cssom/idl/CSSImportRule.idl Mon Jul 16 00:55:13 2012 -0600 9.3 @@ -0,0 +1,27 @@ 9.4 +[Documentation= 9.5 + "<p>The {@name} {@type} represents an <code>@import</code> rule.</p>" 9.6 +] 9.7 +interface CSSImportRule : CSSRule { 9.8 + 9.9 + [Documentation= 9.10 + "<p>The {@name} {@type} must return the <span>URL</span> specified by the <code>@import</code> rule.</p>\ 9.11 + <p class='note'>To get the resolved <span>URL</span> use the <code title='dom-StyleSheet-href'>href</code>\ 9.12 + attribute of the associated <span>style sheet</span>.</p>" 9.13 + ] 9.14 + readonly attribute DOMString href; 9.15 + 9.16 + [PutForwards=mediaText, 9.17 + Documentation= 9.18 + "<p>The {@name} {@type} must return the value of the <code title='dom-StyleSheet-media'>media</code>\ 9.19 + attribute of the associated <span>style sheet</span>.</p>" 9.20 + ] 9.21 + readonly attribute MediaList media; 9.22 + 9.23 + [Documentation= 9.24 + "<p>The {@name} {@type} must return the associated <span>style sheet</span>.</p>\ 9.25 + <p class='note'>If loading of the style sheet fails its <code title='dom-CSSStyleSheet-cssRules'>cssRules</code>\ 9.26 + list is simply empty, i.e., an <code>@import</code> rule always has an associated <span>style sheet</span>.</p>" 9.27 + ] 9.28 + readonly attribute CSSStyleSheet styleSheet; 9.29 + 9.30 +};
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/cssom/idl/CSSMediaRule.idl Mon Jul 16 00:55:13 2012 -0600 10.3 @@ -0,0 +1,31 @@ 10.4 +[Documentation= 10.5 + "<p>The {@name} {@type} represents a <code>@media</code> rule.</p>" 10.6 +] 10.7 +interface CSSMediaRule : CSSRule { 10.8 + 10.9 + [PutForwards=mediaText, 10.10 + Documentation= 10.11 + "<p>The {@name} {@type} must return a <code>MediaList</code> object for the list of media queries specified\ 10.12 + with the <code>@media</code> rule.</p>" 10.13 + ] 10.14 + readonly attribute MediaList media; 10.15 + 10.16 + [Documentation= 10.17 + "<p>The {@name} {@type} must return a <code>CSSRuleList</code> object for the list of CSS rules specified\ 10.18 + with the <code>@media</code> rule.</p>" 10.19 + ] 10.20 + readonly attribute CSSRuleList cssRules; 10.21 + 10.22 + [Documentation= 10.23 + "<p>The {@name} {@type} must <span>insert a CSS rule</span> <var>rule</var> into the CSS rule list\ 10.24 + returned by <code title='dom-CSSMediaRule-cssRules'>cssRules</code> at <var>index</var>.</p>" 10.25 + ] 10.26 + unsigned long insertRule(DOMString rule, in unsigned long index); 10.27 + 10.28 + [Documentation= 10.29 + "<p>The {@name} {@type} must <span>remove a CSS rule</span> from the CSS rule list returned by\ 10.30 + <code title='dom-CSSMediaRule-cssRules'>cssRules</code> at <var>index</var>.</p>" 10.31 + ] 10.32 + void deleteRule(unsigned long index); 10.33 + 10.34 +};
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 11.2 +++ b/cssom/idl/CSSNamespaceRule.idl Mon Jul 16 00:55:13 2012 -0600 11.3 @@ -0,0 +1,16 @@ 11.4 +[Documentation= 11.5 + "<p>The {@name} {@type} represents a <code>@namespace</code> rule.</p>" 11.6 +] 11.7 +interface CSSNamespaceRule : CSSRule { 11.8 + 11.9 + [Documentation= 11.10 + "<p>The {@name} {@type} must return the namespace of the <code>@namespace</code> rule.</p>" 11.11 + ] 11.12 + readonly attribute DOMString namespaceURI; 11.13 + 11.14 + [Documentation= 11.15 + "<p>The {@name} {@type} must return the prefix of the <code>@namespace</code> rule or the\ 11.16 + empty string if there is no prefix.</p>" 11.17 + ] 11.18 + readonly attribute DOMString? prefix; 11.19 +};
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 12.2 +++ b/cssom/idl/CSSPageRule.idl Mon Jul 16 00:55:13 2012 -0600 12.3 @@ -0,0 +1,26 @@ 12.4 +[Documentation= 12.5 + "<p>The {@name} {@type} represents a <code>@page</code> rule.</p>\ 12.6 + <p class='note'>Need to define the rules for\ 12.7 + <dfn id='parse-a-css-page-selector'>parse a CSS page selector</dfn> and\ 12.8 + <dfn id='serialize-a-css-page-selector'>serialize a CSS page selector</dfn>.</p>" 12.9 +] 12.10 +interface CSSPageRule : CSSRule { 12.11 + 12.12 + [Documentation= 12.13 + "<p>The {@name} {@type}, on getting, must return the result of <span title='serialize a CSS page selector'>serializing</span>\ 12.14 + the associated <span>CSS page selector</span>.</p>\ 12.15 + <p>On setting the {@name} {@type} these steps must be run:</p>\ 12.16 + <ol>\ 12.17 + <li><p>Run the <span>parse a CSS page selector</span> algorithm on the given value.</p></li>\ 12.18 + <li><p>If the algorithm returns a non-null value replace the associated <span>CSS page selector</span> with the returned value.</p></li>\ 12.19 + <li><p>Otherwise, if the algorithm returns a null value, do nothing.</p></li>\ 12.20 + </ol>" 12.21 + ] 12.22 + attribute DOMString selectorText; 12.23 + 12.24 + [Documentation= 12.25 + "<p>The {@name} {@type} must return a <code>CSSStyleDeclaration</code> for the <code>@page</code> rule.</p>" 12.26 + ] 12.27 + readonly attribute CSSStyleDeclaration style; 12.28 + 12.29 +};
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/cssom/idl/CSSRule.idl Mon Jul 16 00:55:13 2012 -0600 13.3 @@ -0,0 +1,76 @@ 13.4 +// 13.5 +// All members defined since DOM-2 Style. The only differences are: 13.6 +// 13.7 +// 1. removal of UNKNOWN_RULE = 0 constant 13.8 +// 2. removal of CHARSET_RULE = 1 constant 13.9 +// 3. addition of NAMESPACE_RULE = 10 constant 13.10 +// 4. removal of commented raises(DOMException) on setting cssText 13.11 +// 13.12 + 13.13 +[Documentation= 13.14 + "<p>The {@name} {@type} represents an abstract, base CSS style rule. Each\ 13.15 + distinct CSS style rule type is represented by a distinct {@type} that\ 13.16 + inherits from this {@type}.</p>" 13.17 +] 13.18 +interface CSSRule { 13.19 + const unsigned short STYLE_RULE = 1; 13.20 + const unsigned short IMPORT_RULE = 3; 13.21 + const unsigned short MEDIA_RULE = 4; 13.22 + const unsigned short FONT_FACE_RULE = 5; 13.23 + const unsigned short PAGE_RULE = 6; 13.24 + const unsigned short NAMESPACE_RULE = 10; 13.25 + 13.26 + [Documentation= 13.27 + "<p>The {@name} {@type} must return the <span>CSS rule</span> type, as follows:</p>\ 13.28 + <dl class='switch'>\ 13.29 + <dt><code>STYLE_RULE</code></dt>\ 13.30 + <dd>The object is a <code>CSSStyleRule</code>.</dd>\ 13.31 + <dt><code>IMPORT_RULE</code></dt>\ 13.32 + <dd>The object is a <code>CSSImportRule</code>.</dd>\ 13.33 + <dt><code>MEDIA_RULE</code></dt>\ 13.34 + <dd>The object is a <code>CSSMediaRule</code>.</dd>\ 13.35 + <dt><code>FONT_FACE_RULE</code></dt>\ 13.36 + <dd>The object is a <code>CSSFontFaceRule</code>.</dd>\ 13.37 + <dt><code>PAGE_RULE</code></dt>\ 13.38 + <dd>The object is a <code>CSSPageRule</code>.</dd>\ 13.39 + <dt><code>NAMESPACE_RULE</code></dt>\ 13.40 + <dd>The object is a <code>CSSNamespaceRule</code>.</dd>\ 13.41 + </dl>\ 13.42 + <p class='note'>Constants with values 0 and 2 have been obsoleted by this\ 13.43 + specification. They might be re-allocated in the future.\ 13.44 + <p class='note'>Constants for new and proprietary features are coordinated\ 13.45 + on the <a href='http://wiki.csswg.org/spec/cssom-constants'>CSSOM Constants</a> wiki page.</p>" 13.46 + ] 13.47 + readonly attribute unsigned short type; 13.48 + 13.49 + [Documentation= 13.50 + "<p>The {@name} {@type} must return a <span title='serialize a CSS rule'>serialization</span> of the\ 13.51 + <span>CSS rule</span>.</p>\ 13.52 + <p>On setting the {@name} {@type} these steps must be run:</p>\ 13.53 + <ol>\ 13.54 + <li><p><span title='Parse a CSS rule'>Parse</span> the value.</p></li>\ 13.55 + <li><p>If parsing failed terminate this algorithm.</p></li>\ 13.56 + <li><p>If the <code title='dom-CSSRule-type'>type</code> of the new\ 13.57 + object does not match the <code title='dom-CSSRule-type'>type</code> of\ 13.58 + the current object\ 13.59 + <span data-anolis-spec=dom title=concept-throw>throw</span> an\ 13.60 + '<code data-anolis-spec=dom>InvalidModificationError</code>' exception.</li>\ 13.61 + <li><p>Replace the current object with the new object.</p></li>\ 13.62 + </ol>" 13.63 + ] 13.64 + attribute DOMString cssText; 13.65 + 13.66 + [Documentation= 13.67 + "<p>The {@name} {@type} must return the nearest enclosing rule of the current rule or null, if\ 13.68 + there is no enclosing rule.</p>\ 13.69 + <p class='note'>For example, <code>@media</code> can enclose a rule.</p>" 13.70 + ] 13.71 + readonly attribute CSSRule parentRule; 13.72 + 13.73 + [Documentation= 13.74 + "<p>The {@name} {@type} must return the <code>CSSStyleSheet</code> object that contains the the\ 13.75 + current rule.</p>" 13.76 + ] 13.77 + readonly attribute CSSStyleSheet parentStyleSheet; 13.78 + 13.79 +};
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 14.2 +++ b/cssom/idl/CSSRuleList.idl Mon Jul 16 00:55:13 2012 -0600 14.3 @@ -0,0 +1,4 @@ 14.4 +[Documentation= 14.5 + "<p>The {@name} sequence represents an ordered collection of CSS style rules.</p>" 14.6 +] 14.7 +typedef sequence<CSSRule> CSSRuleList;
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 15.2 +++ b/cssom/idl/CSSStyleDeclaration.idl Mon Jul 16 00:55:13 2012 -0600 15.3 @@ -0,0 +1,20 @@ 15.4 +// 15.5 +// All members defined since DOM-2 Style. The only differences are: 15.6 +// 15.7 +// 1. removal of commented raises(DOMException) on setting cssText 15.8 +// 2. removal of raises(DOMException) on {set,remove}Property 15.9 +// 3. removal of getPropertyCSSValue() method 15.10 +// 15.11 +interface CSSStyleDeclaration { 15.12 + attribute DOMString cssText; 15.13 + 15.14 + readonly attribute unsigned long length; 15.15 + DOMString item(unsigned long index); 15.16 + 15.17 + DOMString getPropertyValue(DOMString property); 15.18 + DOMString getPropertyPriority(DOMString property); 15.19 + void setProperty(DOMString property, DOMString value, optional DOMString priority); 15.20 + DOMString removeProperty(DOMString property); 15.21 + 15.22 + readonly attribute CSSRule parentRule; 15.23 +};
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 16.2 +++ b/cssom/idl/CSSStyleRule.idl Mon Jul 16 00:55:13 2012 -0600 16.3 @@ -0,0 +1,28 @@ 16.4 +// 16.5 +// All members defined since DOM-2 Style. The only differences are: 16.6 +// 16.7 +// 1. removal of commented raises(DOMException) on setting selectorText 16.8 +// 16.9 + 16.10 +[Documentation= 16.11 + "<p>The {@name} {@type} represents a rule set.</p>" 16.12 +] 16.13 +interface CSSStyleRule : CSSRule { 16.14 + 16.15 + [Documentation= 16.16 + "<p>The {@name} {@type}, on getting, must return the result of <span title='serialize a group of selectors'>serializing</span> the associated\ 16.17 + <span>group of selectors</span>.</p>\ 16.18 + <p>On setting the {@name} {@type} these steps must be run:</p>\ 16.19 + <ol>\ 16.20 + <li><p>Run the <span>parse a group of selectors</span> algorithm on the given value.</p></li>\ 16.21 + <li><p>If the algorithm returns a non-null value replace the associated <span>group of selectors</span> with the returned value.</p></li>\ 16.22 + <li><p>Otherwise, if the algorithm returns a null value, do nothing.</p></li>\ 16.23 + </ol>" 16.24 + ] 16.25 + attribute DOMString selectorText; 16.26 + 16.27 + [Documentation= 16.28 + "<p>The {@name} {@type} must return a <code>CSSStyleDeclaration</code> object for the rule set.</p>" 16.29 + ] 16.30 + readonly attribute CSSStyleDeclaration style; 16.31 +};
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 17.2 +++ b/cssom/idl/CSSStyleSheet.idl Mon Jul 16 00:55:13 2012 -0600 17.3 @@ -0,0 +1,38 @@ 17.4 +// 17.5 +// All members defined since DOM-2 Style. The only differences are: 17.6 +// 17.7 +// 1. removal of raises(DOMException) on {insert,delete}Rule operations. 17.8 +// 17.9 + 17.10 +[Documentation= 17.11 + "<p>The {@name} {@type} represents a CSS <span>style sheet</span> rule.</p>" 17.12 +] 17.13 +interface CSSStyleSheet : StyleSheet { 17.14 + 17.15 + [Documentation= 17.16 + "<p>The {@name} {@type} must return the <span>style sheet owner CSS rule</span>.</p>" 17.17 + ] 17.18 + readonly attribute CSSRule ownerRule; 17.19 + 17.20 + [Documentation= 17.21 + "<p>The {@name} {@type} must return a <code>CSSRuleList</code> object representing the <span>style\ 17.22 + sheet CSS rules</span>.</p>\ 17.23 + <p class='note'>CSS rules that were dropped during parsing can not be\ 17.24 + found using APIs described by this specification.</p>" 17.25 + ] 17.26 + readonly attribute CSSRuleList cssRules; 17.27 + 17.28 + [Documentation= 17.29 + "<p>The {@name} {@type} must <span>insert a CSS rule</span> <var>rule</var> the in CSS rule\ 17.30 + list returned by <code title='dom-CSSStyleSheet-cssRules'>cssRules</code> at\ 17.31 + <var>index</var>.</p>" 17.32 + ] 17.33 + unsigned long insertRule(DOMString rule, unsigned long index); 17.34 + 17.35 + [Documentation= 17.36 + "<p>The {@name} {@type} must <span>remove a CSS rule</span> from the CSS rule list returned by\ 17.37 + <code title='dom-CSSStyleSheet-cssRules'>cssRules</code> at <var>index</var>.</p>" 17.38 + ] 17.39 + void deleteRule(unsigned long index); 17.40 + 17.41 +};
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 18.2 +++ b/cssom/idl/Document.idl Mon Jul 16 00:55:13 2012 -0600 18.3 @@ -0,0 +1,138 @@ 18.4 +// 18.5 +// Significant changes since DOM-2 Style: 18.6 +// 18.7 +// 1. move styleSheets from separate interface (DocumentStyle) to Document 18.8 +// 2. addition of selectedStyleSheetSet, lastStyleSheetSet, preferredStyleSheetSet, styleSheetSets, and enableStyleSheetsForSet members 18.9 +// 18.10 +// N.B. HTML4 Section 14.3 "External Style Sheets" introduces the concept of a "group [of] alternate style sheets ... under a single style [sheet set] name", 18.11 +// but does not actually use the term "style sheet set". See http://www.w3.org/TR/html401/present/styles.html#h-14.3 for details. 18.12 +// 18.13 +// N.B. According to HTML4 Section 14.3, a "persistent style sheet ... must apply in addition to any alternate style sheet". 18.14 +// 18.15 +// N.B. HTML4 Section 14.3 distinguishes the three categories of style sheets as follows: 18.16 +// 18.17 +// * persistent - @rel='stylesheet', @title is missing (or empty string?) 18.18 +// * preferred - @rel='stylesheet', @title is present (and non-empty?) 18.19 +// * alternate - @rel='alternate stylesheet', @title is present (and non-empty?) 18.20 +// 18.21 +// Also, HTML5 effectively defines: 18.22 +// 18.23 +// * ignored - @rel='alternate stylesheet', @title is missing (or is empty string?) - in this case, LinkStyle.style must evaluate to null 18.24 +// 18.25 +// N.B. HTML4 Section 4.3 allows author to specify the default preferred style sheet [set]... [presumably in the case that there are multiple preferred style sheet sets]: 18.26 +// 18.27 +// * in content - <META http-equiv="Default-Style" content="compact"> 18.28 +// * in http - e.g., using response header - "Default-Style: compact" 18.29 +// * if multiple of the above forms are present, then the LAST one [seen or parsed] takes precedence; HOWEVER, if two or more LINK elements specify preferred style 18.30 +// [sheet sets], the FIRST one present in the document takes precedence; 18.31 +// * preferred style sheets specified using the above (META or HTTP header equivalent) take precedence over those specified with LINK 18.32 +// 18.33 +// N.B. CSSOM Draft presently employs the term "Style Sheet Collection" 18.34 +// 18.35 +// Spec Issues: 18.36 +// 18.37 +// 1. need to specify which style sheets are included in styleSheets, and in which order: 18.38 +// 18.39 +// * from Link HTTP header reference 18.40 +// * from <?xml-stylesheet ...?> 18.41 +// * from LINK element, @rel='stylesheet'|'alternate stylesheet' 18.42 +// * from STYLE element 18.43 +// 18.44 +// 2. for purpose of comparing two titled (named) style sheets, is title (name) compared on case-sensitive or case-insensitive basis 18.45 +// 18.46 +// 3. CSSOM 6.2 appears to imply that one can create a CSSStyleSheet (or StyleSheet) object and add it to a Document. However, that is not the case; rather 18.47 +// it is necessary to create an HTMLLinkElement or HTMLStyleElement element to indirectly create an empty StyleSheet, then this element can be added to the Document. 18.48 +// 18.49 + 18.50 +partial interface Document { 18.51 + 18.52 + [Documentation= 18.53 + "<p>The {@name} {@type} must return a <code>StyleSheetList</code> sequence representing\ 18.54 + the <span>document style sheets</span>.</p>\ 18.55 + <p class='note'>Because of historical IDL limitations the {@name} {@type}\ 18.56 + used to be on a separate interface, <code>DocumentStyle</code>.</p>" 18.57 + ] 18.58 + readonly attribute StyleSheetList styleSheets; // DOM-2 - defined on DocumentStyle interface 18.59 + 18.60 + [Documentation= 18.61 + "<p>The {@name} {@type} must, on getting, must run these steps:</p>\ 18.62 + <ol>\ 18.63 + <li><p>If there is a single <span>enabled style sheet set</span> and no\ 18.64 + other <span>document style sheets</span> with a non-empty\ 18.65 + <span>style sheet title</span> have the\ 18.66 + <span>style sheet disabled flag</span> unset, return the\ 18.67 + <span>style sheet set name</span> of the\ 18.68 + <span>enabled style sheet set</span> and terminate these steps.</li>\ 18.69 + \ 18.70 + <li><p>Otherwise, if <span title='style sheet'>style sheets</span> from\ 18.71 + different <span title='style sheet set'>style sheet sets</span> have\ 18.72 + their <span>style sheet disabled flag</span> unset, return\ 18.73 + null and terminate these steps.</li>\ 18.74 + \ 18.75 + <li>\ 18.76 + <p>Otherwise, return the empty string.</p>\ 18.77 + \ 18.78 + <p class='note'>At this point either all\ 18.79 + <span title='style sheet'>style sheets</span> with a non-empty\ 18.80 + <span>style sheet title</span> have the\ 18.81 + <span>style sheet disabled flag</span> set, or there are no such\ 18.82 + <span title='style sheet'>style sheets</span>.</p>\ 18.83 + </li>\ 18.84 + </ol>\ 18.85 + \ 18.86 + <p>On setting the\ 18.87 + <code title='dom-Document-selectedStyleSheetSet'>selectedStyleSheetSet</code>\ 18.88 + attribute these steps must be run:</p>\ 18.89 + \ 18.90 + <ol>\ 18.91 + <li><p>If the value is null terminate this set of steps.</p></li>\ 18.92 + <li><p>Otherwise, <span>select a style sheet set</span> with as name the\ 18.93 + value passed.</p></li>\ 18.94 + </ol>\ 18.95 + \ 18.96 + <p>From the DOM's perspective, all views have the same\ 18.97 + <code title='dom-Document-selectedStyleSheetSet'>selectedStyleSheetSet</code>.\ 18.98 + If a user agent supports multiple views with different selected\ 18.99 + alternative style sheets, then this attribute (and the\ 18.100 + <code>StyleSheet</code> interface's\ 18.101 + <code title='dom-StyleSheet-disabled'>disabled</code> attribute)\ 18.102 + must return and set the value for the default\ 18.103 + view.</p>" 18.104 + ] 18.105 + attribute DOMString? selectedStyleSheetSet; // new 18.106 + 18.107 + [Documentation= 18.108 + "<p>The {@name} {@type} must return the <span>last style sheet set name</span>.</p>\ 18.109 + <p class='note'>This attribute is initially null.</p>" 18.110 + ] 18.111 + readonly attribute DOMString? lastStyleSheetSet; // new 18.112 + 18.113 + [Documentation= 18.114 + "<p>The {@name} {@type} must return the <span>preferred style sheet set name</span>.</p>\ 18.115 + <p class='note'>Unlike <code title='dom-Document-lastStyleSheetSet'>lastStyleSheetSet</code>,\ 18.116 + this attribute is initially the empty string.</p>" 18.117 + ] 18.118 + readonly attribute DOMString? preferredStyleSheetSet; // new 18.119 + 18.120 + [Documentation= 18.121 + "<p>The {@name} {@type} must return a list of the <span title='style sheet set name'>style\ 18.122 + sheet set names</span> of the <span title='style sheet set'>style sheet sets</span>, in order\ 18.123 + of the <span>document style sheets</span>.</p>" 18.124 + ] 18.125 + readonly attribute DOMStringList styleSheetSets; // new 18.126 + 18.127 + [Documentation= 18.128 + "<p>The {@name} {@type} must, when invoked, run these steps:</p>\ 18.129 + <ol>\ 18.130 + <li><p>If <var>name</var> is null terminate these steps.</p></li>\ 18.131 + <li><p><span>Enable a style sheet set</span> with name <var>name</var>.</p></li>\ 18.132 + </ol>\ 18.133 + <p class='note'><span title='Style sheet'>Style sheets</span> with an\ 18.134 + empty <span>style sheet title</span> are never affected by this method.\ 18.135 + This method does not change the values of the\ 18.136 + <code title='dom-Document-lastStyleSheetSet'>lastStyleSheetSet</code> or\ 18.137 + <code title='dom-Document-preferredStyleSheetSet'>preferredStyleSheetSet</code> attributes.</p>" 18.138 + ] 18.139 + void enableStyleSheetsForSet(DOMString? name); // new 18.140 + 18.141 +};
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 19.2 +++ b/cssom/idl/ElementCSSInlineStyle.idl Mon Jul 16 00:55:13 2012 -0600 19.3 @@ -0,0 +1,13 @@ 19.4 +[NoInterfaceObject, 19.5 + Documentation= 19.6 + "The {@name} {@type} is implemented by <code>Element</code> objects in order to provide access to inline style properties." 19.7 +] 19.8 +interface ElementCSSInlineStyle { 19.9 + 19.10 + [Documentation= 19.11 + "The {@name} {@type} must return a mutable <code>CSSStyleDeclaration</code> object\ 19.12 + that represents the inline style properties of the associated <code>Element</code> instance." 19.13 + ] 19.14 + readonly attribute CSSStyleDeclaration style; 19.15 + 19.16 +};
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 20.2 +++ b/cssom/idl/LinkStyle.idl Mon Jul 16 00:55:13 2012 -0600 20.3 @@ -0,0 +1,15 @@ 20.4 +[NoInterfaceObject, 20.5 + Documentation= 20.6 + "<p>The <dfn id='associated-style-sheet'>associated style sheet</dfn> of a node is the <span>style sheet</span> in the list of\ 20.7 + <span>document style sheets</span> of which the <span>style sheet owner node</span> implements the {@name} {@type}.</p>" 20.8 +] 20.9 +interface LinkStyle { 20.10 + 20.11 + [Documentation= 20.12 + "<p>The {@name} {@type} must return the <span>associated style sheet</span> for the node, or null,\ 20.13 + if there is no <span>associated style sheet</span>.</p>" 20.14 + ] 20.15 + readonly attribute StyleSheet sheet; 20.16 + 20.17 +}; 20.18 +
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 21.2 +++ b/cssom/idl/Makefile Mon Jul 16 00:55:13 2012 -0600 21.3 @@ -0,0 +1,30 @@ 21.4 + 21.5 +IDLDRIVER = cssom.idl 21.6 +IDLFRAGS = cssfontfacerule.idl \ 21.7 + cssimportrule.idl \ 21.8 + cssmediarule.idl \ 21.9 + cssnamespacerule.idl \ 21.10 + cssom.idl \ 21.11 + csspagerule.idl \ 21.12 + cssrule.idl \ 21.13 + cssrulelist.idl \ 21.14 + cssstyledeclaration.idl \ 21.15 + cssstylerule.idl \ 21.16 + cssstylesheet.idl \ 21.17 + document.idl \ 21.18 + elementcssinlinestyle.idl \ 21.19 + linkstyle.idl \ 21.20 + medialist.idl \ 21.21 + processinginstruction.idl \ 21.22 + stylesheet.idl \ 21.23 + stylesheetlist.idl \ 21.24 + window.idl 21.25 +JSONFILE = cssom.json 21.26 + 21.27 +all: $(JSONFILE) 21.28 + 21.29 +$(JSONFILE): $(IDLDRIVER) $(IDLFRAGS) 21.30 + gcc -E -x c -P -C $< | node cssom.js > $@ 21.31 + 21.32 +clean:: 21.33 + $(RM) $(JSONFILE)
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 22.2 +++ b/cssom/idl/MediaList.idl Mon Jul 16 00:55:13 2012 -0600 22.3 @@ -0,0 +1,70 @@ 22.4 +// 22.5 +// All members defined since DOM-2 Style. The only differences are: 22.6 +// 22.7 +// 1. addition of stringifier qualifier on mediaText 22.8 +// 2. addition of getter qualifier on item 22.9 +// 3. removal of raises(DOMException) from {append,delete}Medium 22.10 +// 22.11 + 22.12 +[Documentation= 22.13 + "<p>An object that implements the {@link} {@type} has an associated <dfn>collection of media queries</dfn>.</p>", 22.14 + [ Documentation= 22.15 + "<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>\ 22.16 + <ol>\ 22.17 + <li><p>Create a new {@name} object.</p></li>\ 22.18 + <li><p>Set its <span title='dom-MediaList-mediaText'>mediaText</span> attribute to <var>s</var>.</p></li>\ 22.19 + <li><p>Return the newly created <code>{@name}</code> object.</p></li>\ 22.20 + </ol>" 22.21 + ] 22.22 + Constructor 22.23 +] 22.24 +interface MediaList { 22.25 + 22.26 + [Documentation= 22.27 + "<p>The {@name} {@type} must return a <span title='serialize a media query list'>serialization</span>\ 22.28 + of the <span>collection of media queries</span>.</p>\ 22.29 + <p>Setting the {@name} {@type} must run these steps:\ 22.30 + <ol>\ 22.31 + <li><p>Empty the <span>collection of media queries</span>.</p></li>\ 22.32 + <li><p>If the given value is the empty string terminate these steps.</p></li>\ 22.33 + <li><p>Append all the media queries as a result of <span title='parse a media query list'>parsing</span> the given\ 22.34 + value to the <span>collection of media queries</span>.</p></li>\ 22.35 + </ol>" 22.36 + ] 22.37 + stringifier attribute DOMString mediaText; 22.38 + 22.39 + [Documentation= 22.40 + "<p>The {@name} {@type} must return the number of media queries in the <span>collection of media queries</span>.</p>" 22.41 + ] 22.42 + readonly attribute unsigned long length; 22.43 + 22.44 + [Documentation= 22.45 + "<p>The {@name} method must return the media query in the <span>collection of media queries</span> given by\ 22.46 + <var>index</var>, or null, if <var>index</var> is greater than or equal to the number of media queries in the\ 22.47 + <span>collection of media queries</span>.</p>" 22.48 + ] 22.49 + getter DOMString item(unsigned long index); 22.50 + 22.51 + [Documentation= 22.52 + "<p>The {@name} method must run these steps:</p>\ 22.53 + <ol>\ 22.54 + <li><p>Let <var>m</var> be the result of <span title='parse a media query'>parsing</span> the given value.</p></li>\ 22.55 + <li><p>If <var>m</var> is null terminate these steps.</p></li>\ 22.56 + <li><p>If <span title='compare media queries'>comparing</span> <var>m</var> with any of the media queries in the\ 22.57 + <span>collection of media queries</span> returns true terminate these steps.</p></li>\ 22.58 + <li><p>Append <var>m</var> to the <span>collection of media queries</span>.</p></li>\ 22.59 + </ol>" 22.60 + ] 22.61 + void appendMedium(DOMString medium); 22.62 + 22.63 + [Documentation= 22.64 + "<p>The {@name} method must run these steps:</p>\ 22.65 + <ol>\ 22.66 + <li><p>Let <var>m</var> be the result of <span title='parse a media query'>parsing</span> the given value.</p></li>\ 22.67 + <li><p>If <var>m</var> is null terminate these steps.</p></li>\ 22.68 + <li><p>Remove any media query from the <span>collection of media queries</span> for which\ 22.69 + <span title='compare media queries'>comparing</span> the media query with <var>m</var> returns true.</p></li>\ 22.70 + </ol>" 22.71 + ] 22.72 + void deleteMedium(DOMString medium); 22.73 +};
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 23.2 +++ b/cssom/idl/ProcessingInstruction.idl Mon Jul 16 00:55:13 2012 -0600 23.3 @@ -0,0 +1,1 @@ 23.4 +ProcessingInstruction implements LinkStyle;
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 24.2 +++ b/cssom/idl/StyleSheet.idl Mon Jul 16 00:55:13 2012 -0600 24.3 @@ -0,0 +1,50 @@ 24.4 +// 24.5 +// All members defined since DOM-2 Style. Only difference 24.6 +// is addition of [PutForwards=mediaText], which is presently 24.7 +// not defined in CSSOM draft. 24.8 +// 24.9 + 24.10 +[Documentation= 24.11 + "<p>The {@name} {@type} represents an abstract, base style sheet.</p>" 24.12 +] 24.13 +interface StyleSheet { 24.14 + 24.15 + [Documentation= 24.16 + "<p>The {@name} {@type} must return the <span>style sheet type</span>.</p>" 24.17 + ] 24.18 + readonly attribute DOMString type; 24.19 + 24.20 + [Documentation= 24.21 + "<p>The {@name} {@type} must return the <span>style sheet location</span>.</p>" 24.22 + ] 24.23 + readonly attribute DOMString href; 24.24 + 24.25 + [Documentation= 24.26 + "<p>The {@name} {@type} must return the <span>style sheet owner node</span>.</p>" 24.27 + ] 24.28 + readonly attribute Node ownerNode; 24.29 + 24.30 + [Documentation= 24.31 + "<p>The {@name} {@type} must return the <span>style sheet parent</span>.</p>" 24.32 + ] 24.33 + readonly attribute StyleSheet parentStyleSheet; 24.34 + 24.35 + [Documentation= 24.36 + "<p>The {@name} {@type} must return the <span>style sheet title</span>.</p>" 24.37 + ] 24.38 + readonly attribute DOMString title; 24.39 + 24.40 + [PutForwards=mediaText, // [GA] there is no mediaText attribute! 24.41 + Documentation= 24.42 + "<p>The {@name} {@type} must return the <span>style sheet media</span>.</p>" 24.43 + ] 24.44 + readonly attribute MediaList media; 24.45 + 24.46 + [Documentation= 24.47 + "<p>The {@name} {@type} must return true if the <span>style sheet disabled flag</span>\ 24.48 + is set, or false otherwise.</p>\ 24.49 + <p>Setting the {@name} {@type} must set the <span>style sheet disabled flag</span>\ 24.50 + if the new value is true, or unset the <span>style sheet disabled flag</span> otherwise.</p>" 24.51 + ] 24.52 + attribute boolean disabled; 24.53 +};
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 25.2 +++ b/cssom/idl/StyleSheetList.idl Mon Jul 16 00:55:13 2012 -0600 25.3 @@ -0,0 +1,4 @@ 25.4 +[Documentation= 25.5 + "<p>The {@name} sequence represents an ordered collection of <span title='style sheets'>style sheets</span>.</p>" 25.6 +] 25.7 +typedef sequence<StyleSheet> StyleSheetList;
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 26.2 +++ b/cssom/idl/Window.idl Mon Jul 16 00:55:13 2012 -0600 26.3 @@ -0,0 +1,44 @@ 26.4 + 26.5 +partial interface Window { 26.6 + 26.7 + CSSStyleDeclaration getComputedStyle(Element elt); 26.8 + 26.9 + [Documentation= 26.10 + "<p>The {@name} {@type} must run these steps:</p>\ 26.11 + <ol>\ 26.12 + <li><p>Let <var>doc</var> be the\ 26.13 + <code data-anolis-spec=dom>Document</code>\ 26.14 + associated with the <code data-anolis-spec=html>Window</code> object on\ 26.15 + which the method was invoked.</p></li>\ 26.16 + <li><p>Let <var>obj</var> be <var>elt</var>.</p></li>\ 26.17 + <li><p>If <var>pseudoElt</var> is as an\ 26.18 + <span data-anolis-spec=dom>ASCII case-insensitive</span> match for\ 26.19 + either '<code>:before</code>' or '<code>::before</code>' let\ 26.20 + <var>obj</var> be the '::before' pseudo-element of\ 26.21 + <var>elt</var>.</p></li>\ 26.22 + <li><p>If <var>pseudoElt</var> is as an\ 26.23 + <span data-anolis-spec=dom>ASCII case-insensitive</span> match for\ 26.24 + either '<code>:after</code>' or '<code>::after</code>' let\ 26.25 + <var>obj</var> be the '::after' pseudo-element of\ 26.26 + <var>elt</var>.</p></li>\ 26.27 + <li>\ 26.28 + <p>Return a <span>CSS declaration block</span> with the\ 26.29 + <span>CSS declaration block readonly flag</span> set and the\ 26.30 + <span>CSS declaration block declarations</span> set to all properties\ 26.31 + the user agent supports with as value the <span>resolved value</span>\ 26.32 + computed for <var>obj</var> using the style rules associated\ 26.33 + with <var>doc</var>.</p>\ 26.34 + <p class='note'>This means that even if <var>obj</var> is in a\ 26.35 + different document (e.g. one fetched via <code>XMLHttpRequest</code>) it\ 26.36 + will still use the style rules associated with the document that is\ 26.37 + associated with the global object on which\ 26.38 + <code title='dom-Window-getComputedStyle'>getComputedStyle()</code> was\ 26.39 + invoked to compute the <span>CSS declaration block</span>.</p>\ 26.40 + </li>\ 26.41 + </ol>\ 26.42 + <p class='note'>Because of historical IDL limitations the {@name} {@type} used to be on\ 26.43 + a separate interface, <code>ViewCSS</code>.</p>" 26.44 + ] 26.45 + CSSStyleDeclaration getComputedStyle(Element elt, DOMString pseudoElt); 26.46 + 26.47 +};
27.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 27.2 +++ b/cssom/idl/cssom.idl Mon Jul 16 00:55:13 2012 -0600 27.3 @@ -0,0 +1,18 @@ 27.4 +#include "CSSFontFaceRule.idl" 27.5 +#include "CSSImportRule.idl" 27.6 +#include "CSSMediaRule.idl" 27.7 +#include "CSSNamespaceRule.idl" 27.8 +#include "CSSPageRule.idl" 27.9 +#include "CSSRule.idl" 27.10 +#include "CSSRuleList.idl" 27.11 +#include "CSSStyleDeclaration.idl" 27.12 +#include "CSSStyleRule.idl" 27.13 +#include "CSSStyleSheet.idl" 27.14 +#include "Document.idl" 27.15 +#include "ElementCSSInlineStyle.idl" 27.16 +#include "LinkStyle.idl" 27.17 +#include "MediaList.idl" 27.18 +#include "ProcessingInstruction.idl" 27.19 +#include "StyleSheet.idl" 27.20 +#include "StyleSheetList.idl" 27.21 +#include "Window.idl"
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 28.2 +++ b/cssom/idl/cssom.js Mon Jul 16 00:55:13 2012 -0600 28.3 @@ -0,0 +1,43 @@ 28.4 + 28.5 +(function() { 28.6 + var sys = require("util"); 28.7 + var fs = require("fs"); 28.8 + var parser = require("WebIDLParser.js").Parser; 28.9 + var input = ''; 28.10 + var $ = { 28.11 + ondata : function(d) { 28.12 + input += d; 28.13 + }, 28.14 + onend : function() { 28.15 + sys.puts ( JSON.stringify ( parser.parse ( input ), false, null ) ); 28.16 + }, 28.17 + onerror : function(e) { 28.18 + sys.puts ( sys.inspect ( e ) ); 28.19 + }, 28.20 + run : function(argv) { 28.21 + try { 28.22 + if ( argv.length > 2 ) { 28.23 + fs.readFile ( argv [ argv.length - 1 ], 'utf-8', 28.24 + function(e,d) { 28.25 + if ( ! e ) { 28.26 + input = d; setTimeout ( $.onend, 0 ); 28.27 + } else { 28.28 + setTimeout ( $.onerror, 0, e ); 28.29 + } 28.30 + } 28.31 + ); 28.32 + } else { 28.33 + var s = process.stdin; 28.34 + s.on ( 'data', $.ondata ); 28.35 + s.on ( 'end', $.onend ); 28.36 + s.on ( 'error', $.onerror ); 28.37 + s.setEncoding ( 'utf-8' ); 28.38 + s.resume(); 28.39 + } 28.40 + } catch ( e ) { 28.41 + setTimeout ( $.onerror, 0, e ); 28.42 + } 28.43 + } 28.44 + }; 28.45 + $.run ( process.argv ); 28.46 +})(); 28.47 \ No newline at end of file