Skip to content
Permalink
Browse files

[giow] (2) Make style sheets block scripts even in descendant documents

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 6236b8c9a1b02c174ce17397542c3c61be3848b5
Showing with 84 additions and 32 deletions.
  1. +28 −10 complete.html
  2. +28 −10 index
  3. +28 −12 source
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>




<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>

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>

<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
<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>

38 index
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>




<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>

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>

<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
<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>

40 source
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>




<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>

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>

<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
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>

0 comments on commit 6236b8c

Please sign in to comment.
You can’t perform that action at this time.