Skip to content

Commit

Permalink
[giow] (2) Make style sheets block scripts even in descendant documents
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10575

git-svn-id: http://svn.whatwg.org/webapps@5663 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 1, 2010
1 parent 1e55654 commit 6236b8c
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 32 deletions.
38 changes: 28 additions & 10 deletions complete.html
Expand Up @@ -14143,6 +14143,20 @@ <h4 id=styling><span class=secno>4.2.7 </span><dfn title="styling processing mod
and the user agent hasn't given up on that particular style sheet
yet. A user agent may give up on a style sheet at any time.</p>

<p>A <code><a href=#document>Document</a></code> <dfn id=has-a-style-sheet-that-is-blocking-scripts>has a style sheet that is blocking
scripts</dfn> if there is either <a href=#a-style-sheet-that-is-blocking-scripts>a style sheet that is
blocking scripts</a> in the context of that
<code><a href=#document>Document</a></code>, or if that <code><a href=#document>Document</a></code> is in a
<a href=#browsing-context>browsing context</a> that has a <a href=#parent-browsing-context>parent browsing
context</a>, and the <a href=#active-document>active document</a> of that
<a href=#parent-browsing-context>parent browsing context</a> itself <a href=#has-a-style-sheet-that-is-blocking-scripts>has a style sheet
that is blocking scripts</a>.</p>

<p>A <code><a href=#document>Document</a></code> <dfn id=has-no-style-sheet-that-is-blocking-scripts>has no style sheet that is blocking
scripts</dfn> if it does not <a href=#has-a-style-sheet-that-is-blocking-scripts title="has a style sheet that is
blocking scripts">have a style sheet that is blocking scripts</a>
as defined in the previous paragraph.</p>

</div>


Expand Down Expand Up @@ -14572,10 +14586,12 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>


<dt id=script-processing-style-delayed>If the element does not
have a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute, but
there is <a href=#a-style-sheet-that-is-blocking-scripts>a style sheet that is blocking scripts</a>, and
the element has been flagged as
<a href=#parser-inserted>"parser-inserted"</a></dt>
have a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute, and
the element has been flagged as <a href=#parser-inserted>"parser-inserted"</a>,
and the <code><a href=#document>Document</a></code> of the <a href=#html-parser>HTML parser</a> or
<a href=#xml-parser>XML parser</a> that created the <code><a href=#script>script</a></code>
element <a href=#has-a-style-sheet-that-is-blocking-scripts>has a style sheet that is blocking
scripts</a></dt>

<dd>

Expand Down Expand Up @@ -80376,8 +80392,9 @@ <h5 id=the-before-head-insertion-mode><span class=secno>12.2.5.6 </span>The "<df
for this instance of the <a href=#html-parser>HTML parser</a>, such that
the <a href=#event-loop>event loop</a> will not run <a href=#concept-task title=concept-task>tasks</a> that invoke the <a href=#tokenization title=tokenization>tokenizer</a>.</li>

<li><p><a href=#spin-the-event-loop>Spin the event loop</a> until there is no <a href=#a-style-sheet-that-is-blocking-scripts title="a style sheet that is blocking scripts">style sheet that
is blocking scripts</a> and <var title="">the script</var>'s
<li><p><a href=#spin-the-event-loop>Spin the event loop</a> until the parser's
<code><a href=#document>Document</a></code> <a href=#has-no-style-sheet-that-is-blocking-scripts>has no style sheet that is blocking
scripts</a> and <var title="">the script</var>'s
<a href=#ready-to-be-parser-executed>"ready to be parser-executed"</a> flag is
set.</li>

Expand Down Expand Up @@ -81809,8 +81826,8 @@ <h4 id=the-end><span class=secno>12.2.6 </span>The end</h4>
<code><a href=#script>script</a></code> in the <a href=#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list of scripts that will
execute when the document has finished parsing</a> has its
<a href=#ready-to-be-parser-executed>"ready to be parser-executed"</a> flag set <em>and</em>
there is no <a href=#a-style-sheet-that-is-blocking-scripts title="a style sheet that is blocking
scripts">style sheet that is blocking scripts</a>.</li>
the parser's <code><a href=#document>Document</a></code> <a href=#has-no-style-sheet-that-is-blocking-scripts>has no style sheet that
is blocking scripts</a>.</li>

<li><p><a href=#executing-a-script-block title="executing a script block">Execute</a> the
first <code><a href=#script>script</a></code> in the <a href=#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list of scripts that will
Expand Down Expand Up @@ -82765,8 +82782,9 @@ <h3 id=parsing-xhtml-documents><span class=secno>13.2 </span>Parsing XHTML docum
<ol><li><p>Block this instance of the <a href=#xml-parser>XML parser</a>, such
that the <a href=#event-loop>event loop</a> will not run <a href=#concept-task title=concept-task>tasks</a> that invoke it.</li>

<li><p><a href=#spin-the-event-loop>Spin the event loop</a> until there is no <a href=#a-style-sheet-that-is-blocking-scripts title="a style sheet that is blocking scripts">style sheet that is
blocking scripts</a> and the <a href=#pending-parsing-blocking-script>pending parsing-blocking
<li><p><a href=#spin-the-event-loop>Spin the event loop</a> until the parser's
<code><a href=#document>Document</a></code> <a href=#has-no-style-sheet-that-is-blocking-scripts>has no style sheet that is blocking
scripts</a> and the <a href=#pending-parsing-blocking-script>pending parsing-blocking
script</a>'s <a href=#ready-to-be-parser-executed>"ready to be parser-executed"</a> flag is
set.</li>

Expand Down
38 changes: 28 additions & 10 deletions index
Expand Up @@ -14120,6 +14120,20 @@ c-end = "--&gt;"</pre>
and the user agent hasn't given up on that particular style sheet
yet. A user agent may give up on a style sheet at any time.</p>

<p>A <code><a href=#document>Document</a></code> <dfn id=has-a-style-sheet-that-is-blocking-scripts>has a style sheet that is blocking
scripts</dfn> if there is either <a href=#a-style-sheet-that-is-blocking-scripts>a style sheet that is
blocking scripts</a> in the context of that
<code><a href=#document>Document</a></code>, or if that <code><a href=#document>Document</a></code> is in a
<a href=#browsing-context>browsing context</a> that has a <a href=#parent-browsing-context>parent browsing
context</a>, and the <a href=#active-document>active document</a> of that
<a href=#parent-browsing-context>parent browsing context</a> itself <a href=#has-a-style-sheet-that-is-blocking-scripts>has a style sheet
that is blocking scripts</a>.</p>

<p>A <code><a href=#document>Document</a></code> <dfn id=has-no-style-sheet-that-is-blocking-scripts>has no style sheet that is blocking
scripts</dfn> if it does not <a href=#has-a-style-sheet-that-is-blocking-scripts title="has a style sheet that is
blocking scripts">have a style sheet that is blocking scripts</a>
as defined in the previous paragraph.</p>

</div>


Expand Down Expand Up @@ -14549,10 +14563,12 @@ c-end = "--&gt;"</pre>


<dt id=script-processing-style-delayed>If the element does not
have a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute, but
there is <a href=#a-style-sheet-that-is-blocking-scripts>a style sheet that is blocking scripts</a>, and
the element has been flagged as
<a href=#parser-inserted>"parser-inserted"</a></dt>
have a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute, and
the element has been flagged as <a href=#parser-inserted>"parser-inserted"</a>,
and the <code><a href=#document>Document</a></code> of the <a href=#html-parser>HTML parser</a> or
<a href=#xml-parser>XML parser</a> that created the <code><a href=#script>script</a></code>
element <a href=#has-a-style-sheet-that-is-blocking-scripts>has a style sheet that is blocking
scripts</a></dt>

<dd>

Expand Down Expand Up @@ -76290,8 +76306,9 @@ document.body.appendChild(text);
for this instance of the <a href=#html-parser>HTML parser</a>, such that
the <a href=#event-loop>event loop</a> will not run <a href=#concept-task title=concept-task>tasks</a> that invoke the <a href=#tokenization title=tokenization>tokenizer</a>.</li>

<li><p><a href=#spin-the-event-loop>Spin the event loop</a> until there is no <a href=#a-style-sheet-that-is-blocking-scripts title="a style sheet that is blocking scripts">style sheet that
is blocking scripts</a> and <var title="">the script</var>'s
<li><p><a href=#spin-the-event-loop>Spin the event loop</a> until the parser's
<code><a href=#document>Document</a></code> <a href=#has-no-style-sheet-that-is-blocking-scripts>has no style sheet that is blocking
scripts</a> and <var title="">the script</var>'s
<a href=#ready-to-be-parser-executed>"ready to be parser-executed"</a> flag is
set.</li>

Expand Down Expand Up @@ -77723,8 +77740,8 @@ document.body.appendChild(text);
<code><a href=#script>script</a></code> in the <a href=#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list of scripts that will
execute when the document has finished parsing</a> has its
<a href=#ready-to-be-parser-executed>"ready to be parser-executed"</a> flag set <em>and</em>
there is no <a href=#a-style-sheet-that-is-blocking-scripts title="a style sheet that is blocking
scripts">style sheet that is blocking scripts</a>.</li>
the parser's <code><a href=#document>Document</a></code> <a href=#has-no-style-sheet-that-is-blocking-scripts>has no style sheet that
is blocking scripts</a>.</li>

<li><p><a href=#executing-a-script-block title="executing a script block">Execute</a> the
first <code><a href=#script>script</a></code> in the <a href=#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list of scripts that will
Expand Down Expand Up @@ -78679,8 +78696,9 @@ document.body.appendChild(text);
<ol><li><p>Block this instance of the <a href=#xml-parser>XML parser</a>, such
that the <a href=#event-loop>event loop</a> will not run <a href=#concept-task title=concept-task>tasks</a> that invoke it.</li>

<li><p><a href=#spin-the-event-loop>Spin the event loop</a> until there is no <a href=#a-style-sheet-that-is-blocking-scripts title="a style sheet that is blocking scripts">style sheet that is
blocking scripts</a> and the <a href=#pending-parsing-blocking-script>pending parsing-blocking
<li><p><a href=#spin-the-event-loop>Spin the event loop</a> until the parser's
<code><a href=#document>Document</a></code> <a href=#has-no-style-sheet-that-is-blocking-scripts>has no style sheet that is blocking
scripts</a> and the <a href=#pending-parsing-blocking-script>pending parsing-blocking
script</a>'s <a href=#ready-to-be-parser-executed>"ready to be parser-executed"</a> flag is
set.</li>

Expand Down
40 changes: 28 additions & 12 deletions source
Expand Up @@ -14953,6 +14953,20 @@ c-end = "-->"</pre>
and the user agent hasn't given up on that particular style sheet
yet. A user agent may give up on a style sheet at any time.</p>

<p>A <code>Document</code> <dfn>has a style sheet that is blocking
scripts</dfn> if there is either <span>a style sheet that is
blocking scripts</span> in the context of that
<code>Document</code>, or if that <code>Document</code> is in a
<span>browsing context</span> that has a <span>parent browsing
context</span>, and the <span>active document</span> of that
<span>parent browsing context</span> itself <span>has a style sheet
that is blocking scripts</span>.</p>

<p>A <code>Document</code> <dfn>has no style sheet that is blocking
scripts</dfn> if it does not <span title="has a style sheet that is
blocking scripts">have a style sheet that is blocking scripts</span>
as defined in the previous paragraph.</p>

</div>


Expand Down Expand Up @@ -15445,10 +15459,12 @@ c-end = "-->"</pre>


<dt id="script-processing-style-delayed">If the element does not
have a <code title="attr-script-src">src</code> attribute, but
there is <span>a style sheet that is blocking scripts</span>, and
the element has been flagged as
<span>"parser-inserted"</span></dt>
have a <code title="attr-script-src">src</code> attribute, and
the element has been flagged as <span>"parser-inserted"</span>,
and the <code>Document</code> of the <span>HTML parser</span> or
<span>XML parser</span> that created the <code>script</code>
element <span>has a style sheet that is blocking
scripts</span></dt>

<dd>

Expand Down Expand Up @@ -92185,9 +92201,9 @@ document.body.appendChild(text);
title="concept-task">tasks</span> that invoke the <span
title="tokenization">tokenizer</span>.</p></li>

<li><p><span>Spin the event loop</span> until there is no <span
title="a style sheet that is blocking scripts">style sheet that
is blocking scripts</span> and <var title="">the script</var>'s
<li><p><span>Spin the event loop</span> until the parser's
<code>Document</code> <span>has no style sheet that is blocking
scripts</span> and <var title="">the script</var>'s
<span>"ready to be parser-executed"</span> flag is
set.</p></li>

Expand Down Expand Up @@ -93773,8 +93789,8 @@ document.body.appendChild(text);
<code>script</code> in the <span>list of scripts that will
execute when the document has finished parsing</span> has its
<span>"ready to be parser-executed"</span> flag set <em>and</em>
there is no <span title="a style sheet that is blocking
scripts">style sheet that is blocking scripts</span>.</p></li>
the parser's <code>Document</code> <span>has no style sheet that
is blocking scripts</span>.</p></li>

<li><p><span title="executing a script block">Execute</span> the
first <code>script</code> in the <span>list of scripts that will
Expand Down Expand Up @@ -94872,9 +94888,9 @@ document.body.appendChild(text);
that the <span>event loop</span> will not run <span
title="concept-task">tasks</span> that invoke it.</p></li>

<li><p><span>Spin the event loop</span> until there is no <span
title="a style sheet that is blocking scripts">style sheet that is
blocking scripts</span> and the <span>pending parsing-blocking
<li><p><span>Spin the event loop</span> until the parser's
<code>Document</code> <span>has no style sheet that is blocking
scripts</span> and the <span>pending parsing-blocking
script</span>'s <span>"ready to be parser-executed"</span> flag is
set.</p></li>

Expand Down

0 comments on commit 6236b8c

Please sign in to comment.