cssom/Overview.html

changeset 8372
b3a214e224d7
parent 8371
ca20cc414744
child 8373
37cd62aced08
     1.1 --- a/cssom/Overview.html	Fri Jun 07 10:32:38 2013 +0200
     1.2 +++ b/cssom/Overview.html	Fri Jun 07 14:43:47 2013 +0200
     1.3 @@ -265,14 +265,14 @@
     1.4  <cite>DOM</cite>,
     1.5  <cite>HTML</cite>,
     1.6  <cite>URL</cite>,
     1.7 -<!--<cite>Fetch</cite>,-->
     1.8 +<cite>Fetch</cite>,
     1.9  <cite>Associating Style Sheets with XML documents</cite>
    1.10  and
    1.11  <cite>XML</cite>.
    1.12  <a href="#refsDOM">[DOM]</a>
    1.13  <a href="#refsHTML">[HTML]</a>
    1.14  <a href="#refsURL">[URL]</a>
    1.15 -<!--<span data-anolis-ref>CORS</span>-->
    1.16 +<a href="#refsFETCH">[FETCH]</a>
    1.17  <a href="#refsXMLSS">[XMLSS]</a>
    1.18  <a href="#refsXML">[XML]</a>
    1.19  
    1.20 @@ -864,7 +864,7 @@
    1.21   <dd><p>The literal string "<code title="">text/css</code>".</dd>
    1.22  
    1.23   <dt><dfn id="concept-css-style-sheet-location" title="concept-css-style-sheet-location">location</dfn></dt>
    1.24 - <dd><p>The <a class="external" href="http://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a> of the
    1.25 + <dd><p>The <a class="external" href="http://url.spec.whatwg.org/#concept-absolute-url" title="concept-absolute-url">absolute URL</a> of the first request of the
    1.26   <a href="#css-style-sheet">CSS style sheet</a> or null if the <a href="#css-style-sheet">CSS style sheet</a> was
    1.27   embedded.</dd>
    1.28  
    1.29 @@ -939,6 +939,9 @@
    1.30   <dt><dfn id="concept-css-style-sheet-css-rules" title="concept-css-style-sheet-css-rules">CSS rules</dfn></dt>
    1.31   <dd><p>The <a href="#css-rule" title="CSS rule">CSS rules</a> associated with the
    1.32   <a href="#css-style-sheet">CSS style sheet</a>.</dd>
    1.33 + 
    1.34 + <dt><dfn id="concept-css-style-sheet-origin-clean-flag" title="concept-css-style-sheet-origin-clean-flag">origin-clean flag</dfn>
    1.35 + <dd><p>Either set or clear. If it is set, the API allows reading and modifying of the <a href="#concept-css-style-sheet-css-rules" title="concept-css-style-sheet-css-rules">CSS rules</a>.
    1.36  </dl>
    1.37  
    1.38  <p>When you are to <a href="#create-a-css-style-sheet">create a CSS style sheet</a> the above properties,
    1.39 @@ -1020,19 +1023,35 @@
    1.40  <p>The <dfn id="dom-cssstylesheet-ownerrule" title="dom-CSSStyleSheet-ownerRule"><code>ownerRule</code></dfn> attribute must return the <a href="#concept-css-style-sheet-owner-css-rule" title="concept-css-style-sheet-owner-css-rule">owner
    1.41  CSS rule</a> or null if none. If a value other than null is ever returned, than that same value must always be returned on each get access.</p>
    1.42  
    1.43 -<p>The <dfn id="dom-cssstylesheet-cssrules" title="dom-CSSStyleSheet-cssRules"><code>cssRules</code></dfn> attribute must return a read-only, live <code><a href="#cssrulelist">CSSRuleList</a></code> object representing
    1.44 -the <a href="#concept-css-style-sheet-css-rules" title="concept-css-style-sheet-css-rules">CSS rules</a>. The same object must be returned on each get access.</p>
    1.45 -<p class="note">Even though the returned <code><a href="#cssrulelist">CSSRuleList</a></code> object is read-only (from the perspective of
    1.46 -client-authored script), it can nevertheless change over time due to its liveness status. For example, invoking
    1.47 -the <code title="dom-CSSStyleSheet-insertRule"><a href="#dom-cssstylesheet-insertrule">insertRule()</a></code> or <code title="dom-CSSStyleSheet-deleteRule"><a href="#dom-cssstylesheet-deleterule">deleteRule()</a></code> methods can result in mutations
    1.48 -reflected in the returned object.</p>
    1.49 -
    1.50 -<p>The <dfn id="dom-cssstylesheet-insertrule" title="dom-CSSStyleSheet-insertRule"><code>insertRule(<var title="">rule</var>, <var title="">index</var>)</code></dfn> method must <a href="#insert-a-css-rule">insert a CSS
    1.51 -rule</a> <var title="">rule</var> in the CSS rule list returned by <code title="dom-CSSStyleSheet-cssRules"><a href="#dom-cssstylesheet-cssrules">cssRules</a></code> at <var title="">index</var>, and return
    1.52 -<var title="">index</var>.
    1.53 -
    1.54 -<p>The <dfn id="dom-cssstylesheet-deleterule" title="dom-CSSStyleSheet-deleteRule"><code>deleteRule(<var title="">index</var>)</code></dfn> method must <a href="#remove-a-css-rule">remove a CSS rule</a> in the CSS rule
    1.55 -list returned by <code title="dom-CSSStyleSheet-cssRules"><a href="#dom-cssstylesheet-cssrules">cssRules</a></code> at <var title="">index</var>.
    1.56 +<p>The <dfn id="dom-cssstylesheet-cssrules" title="dom-CSSStyleSheet-cssRules"><code>cssRules</code></dfn> attribute must follow these steps:
    1.57 +
    1.58 +<ol>
    1.59 + <li><p>If the <a href="#concept-css-style-sheet-origin-clean-flag" title="concept-css-style-sheet-origin-clean-flag">origin-clean flag</a> is clear,
    1.60 + <a class="external" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a> a <code class="external"><a href="http://dom.spec.whatwg.org/#securityerror">SecurityError</a></code> exception.
    1.61 + <li><p>Return a read-only, live <code><a href="#cssrulelist">CSSRuleList</a></code> object representing
    1.62 + the <a href="#concept-css-style-sheet-css-rules" title="concept-css-style-sheet-css-rules">CSS rules</a>. The same object must be returned on each get access.</p>
    1.63 + <p class="note">Even though the returned <code><a href="#cssrulelist">CSSRuleList</a></code> object is read-only (from the perspective of
    1.64 + client-authored script), it can nevertheless change over time due to its liveness status. For example, invoking
    1.65 + the <code title="dom-CSSStyleSheet-insertRule"><a href="#dom-cssstylesheet-insertrule">insertRule()</a></code> or <code title="dom-CSSStyleSheet-deleteRule"><a href="#dom-cssstylesheet-deleterule">deleteRule()</a></code> methods can result in
    1.66 + mutations reflected in the returned object.</p>
    1.67 +</ol>
    1.68 +
    1.69 +<p>The <dfn id="dom-cssstylesheet-insertrule" title="dom-CSSStyleSheet-insertRule"><code>insertRule(<var title="">rule</var>, <var title="">index</var>)</code></dfn> method must run the following steps:
    1.70 +
    1.71 +<ol>
    1.72 + <li><p>If the <a href="#concept-css-style-sheet-origin-clean-flag" title="concept-css-style-sheet-origin-clean-flag">origin-clean flag</a> is clear,
    1.73 + <a class="external" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a> a <code class="external"><a href="http://dom.spec.whatwg.org/#securityerror">SecurityError</a></code> exception.
    1.74 + <li><p>Return the result of invoking <a href="#insert-a-css-rule">insert a CSS rule</a> <var title="">rule</var> in the <a href="#concept-css-style-sheet-css-rules" title="concept-css-style-sheet-css-rules">CSS rules</a>
    1.75 + at <var title="">index</var>.
    1.76 +</ol>
    1.77 +
    1.78 +<p>The <dfn id="dom-cssstylesheet-deleterule" title="dom-CSSStyleSheet-deleteRule"><code>deleteRule(<var title="">index</var>)</code></dfn> method must run the following steps:
    1.79 +
    1.80 +<ol>
    1.81 + <li><p>If the <a href="#concept-css-style-sheet-origin-clean-flag" title="concept-css-style-sheet-origin-clean-flag">origin-clean flag</a> is clear,
    1.82 + <a class="external" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a> a <code class="external"><a href="http://dom.spec.whatwg.org/#securityerror">SecurityError</a></code> exception.
    1.83 + <li><p><a href="#remove-a-css-rule">Remove a CSS rule</a> in the <a href="#concept-css-style-sheet-css-rules" title="concept-css-style-sheet-css-rules">CSS rules</a> at <var title="">index</var>.
    1.84 +</ol>
    1.85  
    1.86  <h3 id="css-style-sheet-collections"><span class="secno">6.2 </span>CSS Style Sheet Collections</h3>
    1.87  
    1.88 @@ -1543,22 +1562,38 @@
    1.89   value is not a <a href="#supported-styling-language">supported styling language</a> the user agent
    1.90   may terminate these steps.</li>
    1.91  
    1.92 - <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>
    1.93 - the <a class="external" href="http://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a> specified by the
    1.94 - <code title="">href</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a> and then
    1.95 - <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch">fetch</a> it.</li>
    1.96 -
    1.97 - <li>
    1.98 -  <p>When the resource is available, the document is in
    1.99 -  <a class="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>
   1.100 -  and the
   1.101 -  <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#content-type">Content-Type metadata</a> of
   1.102 -  the resource is not a <a href="#supported-styling-language">supported styling language</a> change the
   1.103 -  <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
   1.104 -  to <code title="">text/css</code>.</p>
   1.105 - </li>
   1.106 -
   1.107 - <li><p>If the resource is not in a
   1.108 + <li><p>Let <var title="">input URL</var> be the value specified by the
   1.109 + <code title="">href</code> <a class="external" href="http://www.w3.org/TR/xml-stylesheet/#dt-pseudo-attribute">pseudo-attribute</a>.
   1.110 + 
   1.111 + <li><p>Let <var title="">base URL</var> be the processing instruction's <a class="external" href="http://dom.spec.whatwg.org/#concept-node-document" title="concept-node-document">node document</a>'s
   1.112 + <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#document-base-url">document base URL</a>.
   1.113 + 
   1.114 + <li><p>Let <var title="">origin</var> be the processing instruction's <a class="external" href="http://dom.spec.whatwg.org/#concept-node-document" title="concept-node-document">node document</a>'s
   1.115 + <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#origin">origin</a>.
   1.116 +
   1.117 + <li><p>Let <var title="">parsed URL</var> be the return value of invoking the <a class="external" href="http://url.spec.whatwg.org/#concept-url-parser" title="concept-url-parser">URL parser</a> with the
   1.118 + string <var title="">input URL</var> and the base URL <var title="">base URL</var>.
   1.119 + 
   1.120 + <li><p>If <var title="">parsed URL</var> is failure, terminate these steps.
   1.121 + 
   1.122 + <li><p>Let <var title="">request</var> be a new <a class="external" href="http://fetch.spec.whatwg.org/#concept-request" title="concept-request">request</a>, with the
   1.123 + <a class="external" href="http://fetch.spec.whatwg.org/#concept-request-url" title="concept-request-url">url</a> <var title="">parsed URL</var>,
   1.124 + <a class="external" href="http://fetch.spec.whatwg.org/#concept-request-origin" title="concept-request-origin">origin</a> <var title="">origin</var> and
   1.125 + <a class="external" href="http://fetch.spec.whatwg.org/#concept-request-referrer" title="concept-request-referrer">referrer</a> <var title="">base URL</var>.
   1.126 +
   1.127 + <li><p>Let <var title="">response</var> be the result of <a class="external" href="http://fetch.spec.whatwg.org/#concept-fetch" title="concept-fetch">fetching</a> <var title="">request</var>.</li>
   1.128 +
   1.129 + <li><p>Wait until <var title="">response</var> is available.
   1.130 + 
   1.131 + <li><p>If <var title="">response</var> is a <a class="external" href="http://fetch.spec.whatwg.org/#concept-network-error" title="concept-network-error">network error</a>, terminate these steps.
   1.132 + 
   1.133 + <li><p>If the processing instruction's <a class="external" href="http://dom.spec.whatwg.org/#concept-node-document" title="concept-node-document">node document</a> is
   1.134 + in <a class="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, <var title="">response</var> is
   1.135 + <a class="external" href="http://fetch.spec.whatwg.org/#cors-same-origin">CORS-same-origin</a> 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 <var title="">response</var> is not a
   1.136 + <a href="#supported-styling-language">supported styling language</a> change 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 <var title="">response</var> to
   1.137 + <code title="">text/css</code>.
   1.138 +
   1.139 + <li><p>If <var title="">response</var> is not in a
   1.140   <a href="#supported-styling-language">supported styling language</a> terminate these steps.</li>
   1.141  
   1.142   <li>
   1.143 @@ -1566,29 +1601,31 @@
   1.144  
   1.145    <dl>
   1.146     <dt><a href="#concept-css-style-sheet-location" title="concept-css-style-sheet-location">location</a></dt>
   1.147 -   <dd><p>The <a class="external" href="http://url.spec.whatwg.org/#concept-absolute-url" title="concept-absolute-url">absolute URL</a> of the
   1.148 -   resource.</dd>
   1.149 +   <dd><p>The result of invoking the <a class="external" href="http://url.spec.whatwg.org/#concept-url-serializer" title="concept-url-serializer">URL serializer</a> with <var title="">parsed URL</var>.</dd>
   1.150  
   1.151     <dt><a href="#concept-css-style-sheet-parent" title="concept-css-style-sheet-parent">parent</a></dt>
   1.152 -   <dd><p>null</dd>
   1.153 +   <dd><p>null.</dd>
   1.154  
   1.155     <dt><a href="#concept-css-style-sheet-owner-node" title="concept-css-style-sheet-owner-node">owner node</a></dt>
   1.156 -   <dd><p>The node.</dd>
   1.157 +   <dd><p>The processing instruction.</dd>
   1.158  
   1.159     <dt><a href="#concept-css-style-sheet-owner-css-rule" title="concept-css-style-sheet-owner-css-rule">owner CSS rule</a></dt>
   1.160 -   <dd><p>null</dd>
   1.161 +   <dd><p>null.</dd>
   1.162  
   1.163     <dt><a href="#concept-css-style-sheet-media" title="concept-css-style-sheet-media">media</a></dt>
   1.164     <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>
   1.165     if any, or the empty string otherwise.</dd>
   1.166  
   1.167     <dt><a href="#concept-css-style-sheet-title" title="concept-css-style-sheet-title">title</a></dt>
   1.168 -   <dd><p><var title="">title</var></dd>
   1.169 +   <dd><p><var title="">title</var>.</dd>
   1.170  
   1.171     <dt><a href="#concept-css-style-sheet-alternate-flag" title="concept-css-style-sheet-alternate-flag">alternate flag</a></dt>
   1.172     <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>
   1.173     value is a <a class="external" href="http://dom.spec.whatwg.org/#case-sensitive">case-sensitive</a> match for
   1.174     "<code title="">yes</code>", or clear otherwise.
   1.175 +   
   1.176 +   <dt><a href="#concept-css-style-sheet-origin-clean-flag" title="concept-css-style-sheet-origin-clean-flag">origin-clean flag</a>
   1.177 +   <dd><p>Set if <var title="">response</var> is <a class="external" href="http://fetch.spec.whatwg.org/#cors-same-origin">CORS-same-origin</a>, or clear otherwise.
   1.178    </dl>
   1.179   </li>
   1.180  </ol>
   1.181 @@ -1619,18 +1656,36 @@
   1.182   "<code title="">alternate</code>" and <var title="">title</var> is the
   1.183   empty string terminate these steps.</li>
   1.184  
   1.185 - <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>
   1.186 - the specified <a class="external" href="http://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a> and
   1.187 - <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch">fetch</a> it.</li>
   1.188 -
   1.189 - <li><p>When the resource is available, the document is in
   1.190 - <a class="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>
   1.191 - 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
   1.192 - the resource is not a <a href="#supported-styling-language">supported styling language</a> change the
   1.193 - <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
   1.194 - to <code title="">text/css</code>.</li>
   1.195 -
   1.196 - <li><p>If the resource is not in a
   1.197 + <li><p>Let <var title="">input URL</var> be the value specified. <span class="XXX">Be more specific</span>
   1.198 + 
   1.199 + <li><p>Let <var title="">base URL</var> be the document's <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#document-base-url">document base URL</a>. <span class="XXX">Is there a document at this
   1.200 + point?</span>
   1.201 + 
   1.202 + <li><p>Let <var title="">origin</var> be the document's <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#origin">origin</a>.
   1.203 +
   1.204 + <li><p>Let <var title="">parsed URL</var> be the return value of invoking the <a class="external" href="http://url.spec.whatwg.org/#concept-url-parser" title="concept-url-parser">URL parser</a> with the
   1.205 + string <var title="">input URL</var> and the base URL <var title="">base URL</var>.
   1.206 + 
   1.207 + <li><p>If <var title="">parsed URL</var> is failure, terminate these steps.
   1.208 + 
   1.209 + <li><p>Let <var title="">request</var> be a new <a class="external" href="http://fetch.spec.whatwg.org/#concept-request" title="concept-request">request</a>, with the
   1.210 + <a class="external" href="http://fetch.spec.whatwg.org/#concept-request-url" title="concept-request-url">url</a> <var title="">parsed URL</var>,
   1.211 + <a class="external" href="http://fetch.spec.whatwg.org/#concept-request-origin" title="concept-request-origin">origin</a> <var title="">origin</var> and
   1.212 + <a class="external" href="http://fetch.spec.whatwg.org/#concept-request-referrer" title="concept-request-referrer">referrer</a> <var title="">base URL</var>.
   1.213 +
   1.214 + <li><p>Let <var title="">response</var> be the result of <a class="external" href="http://fetch.spec.whatwg.org/#concept-fetch" title="concept-fetch">fetching</a> <var title="">request</var>.</li>
   1.215 +
   1.216 + <li><p>Wait until <var title="">response</var> is available.
   1.217 + 
   1.218 + <li><p>If <var title="">response</var> is a <a class="external" href="http://fetch.spec.whatwg.org/#concept-network-error" title="concept-network-error">network error</a>, terminate these steps.
   1.219 + 
   1.220 + <li><p>If the processing instruction's <a class="external" href="http://dom.spec.whatwg.org/#concept-node-document" title="concept-node-document">node document</a> is
   1.221 + in <a class="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, <var title="">response</var> is
   1.222 + <a class="external" href="http://fetch.spec.whatwg.org/#cors-same-origin">CORS-same-origin</a> 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 <var title="">response</var> is not a
   1.223 + <a href="#supported-styling-language">supported styling language</a> change 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 <var title="">response</var> to
   1.224 + <code title="">text/css</code>.
   1.225 +
   1.226 + <li><p>If <var title="">response</var> is not in a
   1.227   <a href="#supported-styling-language">supported styling language</a> terminate these steps.</li>
   1.228  
   1.229   <li>
   1.230 @@ -1638,30 +1693,32 @@
   1.231  
   1.232    <dl>
   1.233     <dt><a href="#concept-css-style-sheet-location" title="concept-css-style-sheet-location">location</a></dt>
   1.234 -   <dd><p>The <a class="external" href="http://url.spec.whatwg.org/#concept-absolute-url" title="concept-absolute-url">absolute URL</a> of the
   1.235 -   resource.</dd>
   1.236 +   <dd><p>The result of invoking the <a class="external" href="http://url.spec.whatwg.org/#concept-url-serializer" title="concept-url-serializer">URL serializer</a> with <var title="">parsed URL</var>.</dd>
   1.237  
   1.238     <dt><a href="#concept-css-style-sheet-owner-node" title="concept-css-style-sheet-owner-node">owner node</a></dt>
   1.239 -   <dd><p>null</dd>
   1.240 +   <dd><p>null.</dd>
   1.241  
   1.242     <dt><a href="#concept-css-style-sheet-parent" title="concept-css-style-sheet-parent">parent</a></dt>
   1.243 -   <dd><p>null</dd>
   1.244 +   <dd><p>null.</dd>
   1.245  
   1.246     <dt><a href="#concept-css-style-sheet-owner-css-rule" title="concept-css-style-sheet-owner-css-rule">owner CSS rule</a></dt>
   1.247 -   <dd><p>null</dd>
   1.248 +   <dd><p>null.</dd>
   1.249  
   1.250     <dt><a href="#concept-css-style-sheet-media" title="concept-css-style-sheet-media">media</a></dt>
   1.251     <dd><p>The value of the first <code title="">media</code> parameter.</dd>
   1.252     <!-- XXX register media parameter? bah -->
   1.253  
   1.254     <dt><a href="#concept-css-style-sheet-title" title="concept-css-style-sheet-title">title</a></dt>
   1.255 -   <dd><p><var title="">title</var></dd>
   1.256 +   <dd><p><var title="">title</var>.</dd>
   1.257  
   1.258     <dt><a href="#concept-css-style-sheet-alternate-flag" title="concept-css-style-sheet-alternate-flag">alternate flag</a></dt>
   1.259     <dd><p>Set if one of the specified link relation type for this HTTP
   1.260     <code title="http-link">Link</code> header is an
   1.261     <a class="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for
   1.262     "<code title="">alternate</code>", or false otherwise.
   1.263 +   
   1.264 +   <dt><a href="#concept-css-style-sheet-origin-clean-flag" title="concept-css-style-sheet-origin-clean-flag">origin-clean flag</a>
   1.265 +   <dd><p>Set if <var title="">response</var> is <a class="external" href="http://fetch.spec.whatwg.org/#cors-same-origin">CORS-same-origin</a>, or clear otherwise.
   1.266    </dl>
   1.267   </li>
   1.268  </ol>
   1.269 @@ -1693,6 +1750,9 @@
   1.270  <dd><p>An optional reference to an associated <a href="#css-style-sheet">CSS style sheet</a>.
   1.271  This item is initialized to reference an associated style sheet when the rule is created. Subsequent to initialization, this item
   1.272  is reset to null if the rule becomes disassociated from its initial style sheet. Once reset to null, it must never change.</dd>
   1.273 +
   1.274 +<dt><dfn id="concept-css-rule-nested-css-rules" title="concept-css-rule-nested-css-rules">child CSS rules</dfn>
   1.275 +<dd><p>A list of child <a href="#css-rule" title="CSS rule">CSS rules</a>.
   1.276  </dl>
   1.277  
   1.278  <p>In addition to the above state, each <a href="#css-rule">CSS rule</a> may be associated
   1.279 @@ -1786,6 +1846,7 @@
   1.280   <code title="">@charset</code> at-rules, <code title="">@import</code> at-rules, and <code title="">@namespace</code> at-rules,
   1.281   <a class="external" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a> an <code class="external"><a href="http://dom.spec.whatwg.org/#invalidstateerror">InvalidStateError</a></code> exception.
   1.282   <li><p>Insert <var title="">new rule</var> into <var title="">list</var> at the zero-indexed position <var title="">index</var>.<p></li>
   1.283 + <li><p>Return <var title="">index</var>.
   1.284  </ol>
   1.285  <p class="XXX">DOM-2 CSS specifies that a <code>NO_MODIFICATION_ALLOWED_ERR</code> exception is thrown
   1.286  if the style sheet is read-only. Are there any read-only style sheets?</p>
   1.287 @@ -1964,7 +2025,7 @@
   1.288  attribute of the associated <a href="#css-style-sheet">CSS style sheet</a>.</p>
   1.289  
   1.290  <p>The <dfn id="dom-cssimportrule-stylesheet" title="dom-CSSImportRule-styleSheet"><code>styleSheet</code></dfn> attribute must return the associated <a href="#css-style-sheet">CSS style sheet</a>.</p>
   1.291 -<p class="note">If loading of the style sheet fails its <code title="dom-CSSStyleSheet-cssRules"><a href="#dom-cssstylesheet-cssrules">cssRules</a></code>
   1.292 +<p class="note">If loading of the style sheet fails its <a href="#concept-css-style-sheet-css-rules" title="concept-css-style-sheet-css-rules">CSS rules</a>
   1.293  list is simply empty, i.e., an <code title="">@import</code> at-rule always has an associated <a href="#css-style-sheet">CSS style sheet</a>.</p>
   1.294  
   1.295  
   1.296 @@ -1982,15 +2043,15 @@
   1.297  <p>The <dfn id="dom-cssmediarule-media" title="dom-CSSMediaRule-media"><code>media</code></dfn> attribute must return a <code><a href="#medialist">MediaList</a></code> object for the list of media queries specified
   1.298  with the <code title="">@media</code> at-rule.</p>
   1.299  
   1.300 -<p>The <dfn id="dom-cssmediarule-cssrules" title="dom-CSSMediaRule-cssRules"><code>cssRules</code></dfn> attribute must return a <code><a href="#cssrulelist">CSSRuleList</a></code> object for the list of CSS rules 
   1.301 -specified with the <code title="">@media</code> at-rule.</p>
   1.302 -
   1.303 -<p>The <dfn id="dom-cssmediarule-insertrule" title="dom-CSSMediaRule-insertRule"><code>insertRule(<var title="">rule</var>, <var title="">index</var>)</code></dfn> method must <a href="#insert-a-css-rule">insert a CSS
   1.304 -rule</a> <var title="">rule</var> into the CSS rule list returned by <code title="dom-CSSMediaRule-cssRules"><a href="#dom-cssmediarule-cssrules">cssRules</a></code> at <var title="">index</var>, and
   1.305 -return <var title="">index</var>.</p>
   1.306 -
   1.307 -<p>The <dfn id="dom-cssmediarule-deleterule" title="dom-CSSMediaRule-deleteRule"><code>deleteRule(<var title="">index</var>)</code></dfn> method must <a href="#remove-a-css-rule">remove a CSS rule</a> from the CSS rule
   1.308 -list returned by <code title="dom-CSSMediaRule-cssRules"><a href="#dom-cssmediarule-cssrules">cssRules</a></code> at <var title="">index</var>.</p>
   1.309 +<p>The <dfn id="dom-cssmediarule-cssrules" title="dom-CSSMediaRule-cssRules"><code>cssRules</code></dfn> attribute must return a <code><a href="#cssrulelist">CSSRuleList</a></code> object for the
   1.310 +<span title="concept-css-rule-child-css-rules">child CSS rules</span> specified with the <code title="">@media</code> at-rule.</p>
   1.311 +
   1.312 +<p>The <dfn id="dom-cssmediarule-insertrule" title="dom-CSSMediaRule-insertRule"><code>insertRule(<var title="">rule</var>, <var title="">index</var>)</code></dfn> method must return the result of
   1.313 +invoking <a href="#insert-a-css-rule">insert a CSS rule</a> <var title="">rule</var> into the <span title="concept-css-rule-child-css-rules">child CSS rules</span> at
   1.314 +<var title="">index</var>.</p>
   1.315 +
   1.316 +<p>The <dfn id="dom-cssmediarule-deleterule" title="dom-CSSMediaRule-deleteRule"><code>deleteRule(<var title="">index</var>)</code></dfn> method must <a href="#remove-a-css-rule">remove a CSS rule</a> from the
   1.317 +<span title="concept-css-rule-child-css-rules">child CSS rules</span> at <var title="">index</var>.</p>
   1.318  
   1.319  
   1.320  <h4 id="the-cssfontfacerule-interface"><span class="secno">6.4.7 </span>The <code title="">CSSFontFaceRule</code> Interface</h4>
   1.321 @@ -2045,9 +2106,9 @@
   1.322  <p>On setting, the <code title="dom-CSSNamespaceRule-namespaceURI"><a href="#dom-cssnamespacerule-namespaceuri">namespaceURI</a></code> attribute must run the following steps:</p>
   1.323  
   1.324  <ol>
   1.325 - <li><p>Let <var title="">CSS style sheet</var> be the value returned by <code title="dom-CSSRule-parentStyleSheet"><a href="#dom-cssrule-parentstylesheet">parentStyleSheet</a></code>.
   1.326 - <li><p>Let <var title="">list</var> be the value returned by <code title="dom-CSSStyleSheet-cssRules"><a href="#dom-cssstylesheet-cssrules">cssRules</a></code> of <var title="">CSS style sheet</var>, or
   1.327 - null if <var title="">CSS style sheet</var> is null.
   1.328 + <li><p>Let <var title="">parent</var> be the <a href="#concept-css-rule-parent-css-style-sheet" title="concept-css-rule-parent-css-style-sheet">parent CSS style sheet</a>.
   1.329 + <li><p>Let <var title="">list</var> be the <a href="#concept-css-style-sheet-css-rules" title="concept-css-style-sheet-css-rules">CSS rules</a> of <var title="">parent</var>, or
   1.330 + null if <var title="">parent</var> is null.
   1.331   <li><p>If <var title="">list</var> is not null and contains anything other than
   1.332   <code title="">@charset</code> at-rules, <code title="">@import</code> at-rules, and <code title="">@namespace</code> at-rules,
   1.333   <a class="external" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a> an <code class="external"><a href="http://dom.spec.whatwg.org/#invalidstateerror">InvalidStateError</a></code> exception.
   1.334 @@ -2060,9 +2121,9 @@
   1.335  <p>On setting, the <code title="dom-CSSNamespaceRule-prefix"><a href="#dom-cssnamespacerule-prefix">prefix</a></code> attribute must run the following steps:</p>
   1.336  
   1.337  <ol>
   1.338 - <li><p>Let <var title="">CSS style sheet</var> be the value returned by <code title="dom-CSSRule-parentStyleSheet"><a href="#dom-cssrule-parentstylesheet">parentStyleSheet</a></code>.
   1.339 - <li><p>Let <var title="">list</var> be the value returned by <code title="dom-CSSStyleSheet-cssRules"><a href="#dom-cssstylesheet-cssrules">cssRules</a></code> of <var title="">CSS style sheet</var>, or
   1.340 - null if <var title="">CSS style sheet</var> is null.
   1.341 + <li><p>Let <var title="">parent</var> be the <a href="#concept-css-rule-parent-css-style-sheet" title="concept-css-rule-parent-css-style-sheet">parent CSS style sheet</a>.
   1.342 + <li><p>Let <var title="">list</var> be the <a href="#concept-css-style-sheet-css-rules" title="concept-css-style-sheet-css-rules">CSS rules</a> of <var title="">parent</var>, or
   1.343 + null if <var title="">parent</var> is null.
   1.344   <li><p>If <var title="">list</var> is not null and contains anything other than
   1.345   <code title="">@charset</code> at-rules, <code title="">@import</code> at-rules, and <code title="">@namespace</code> at-rules,
   1.346   <a class="external" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a> an <code class="external"><a href="http://dom.spec.whatwg.org/#invalidstateerror">InvalidStateError</a></code> exception.
   1.347 @@ -2920,6 +2981,9 @@
   1.348  <dt id="refsDOM2STYLE">[DOM2STYLE]
   1.349  <dd>(Non-normative) <cite><a href="http://www.w3.org/TR/DOM-Level-2-Style/">Document Object Model (DOM) Level 2 Style Specification</a></cite>, Chris Wilson, Philippe Le Hégaret and Vidur Apparao. W3C.
   1.350  
   1.351 +<dt id="refsFETCH">[FETCH]
   1.352 +<dd><cite><a href="http://fetch.spec.whatwg.org/">Fetch</a></cite>, Anne van Kesteren. WHATWG.
   1.353 +
   1.354  <dt id="refsHTML">[HTML]
   1.355  <dd><cite><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">HTML</a></cite>, Ian Hickson. WHATWG.
   1.356  

mercurial