[html5] r5496 - [giow] (2) Allow parser-inserted scripts to rerun if they failed to be run by th [...]

whatwg at whatwg.org whatwg at whatwg.org
Sat Sep 25 12:26:25 PDT 2010


Author: ianh
Date: 2010-09-25 12:26:24 -0700 (Sat, 25 Sep 2010)
New Revision: 5496

Modified:
   complete.html
   index
   source
Log:
[giow] (2) Allow parser-inserted scripts to rerun if they failed to be run by the parser.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10519

Modified: complete.html
===================================================================
--- complete.html	2010-09-25 18:56:11 UTC (rev 5495)
+++ complete.html	2010-09-25 19:26:24 UTC (rev 5496)
@@ -14260,13 +14260,30 @@
 
    </li>
 
+   <li>
+
+    <p>If the element has its <a href=#parser-inserted>"parser-inserted"</a> flag set,
+    then set <var title="">was-parser-inserted</var> to true and unset
+    the element's <a href=#parser-inserted>"parser-inserted"</a> flag. Otherwise, set
+    <var title="">was-parser-inserted</var> to false.</p>
+
+    <p class=note>This is done so that if parser-inserted
+    <code><a href=#script>script</a></code> elements fail to run when the parser tries to
+    run them, e.g. because they are empty or specify an unsupported
+    scripting language, another script can later mutate them and cause
+    them to run again.</p>
+
+    <!-- q.v. http://hsivonen.iki.fi/test/moz/script-setting-src-on-parser-inserted-script.html -->
+
+   </li>
+
    <li id=script-processing-empty>
 
     <p>If the element has no <code title=attr-script-src><a href=#attr-script-src>src</a></code>
-    attribute, and its child nodes consist only of comment nodes and
-    empty <a href=#text-node title="text node">text nodes</a>, then the user
-    agent must abort these steps at this point. The script is not
-    executed.</p>
+    attribute, and its child nodes, if any, consist only of comment
+    nodes and empty <a href=#text-node title="text node">text nodes</a>, then
+    the user agent must abort these steps at this point. The script is
+    not executed.</p>
 
    </li>
 
@@ -14354,6 +14371,13 @@
 
    <li>
 
+    <p>If <var title="">was-parser-inserted</var> is true, then flag
+    the element as <a href=#parser-inserted>"parser-inserted"</a> again.</p>
+
+   </li>
+
+   <li>
+
     <p>If the element's <code><a href=#document>Document</a></code> has an <a href=#active-parser>active
     parser</a>, and the parser's <a href=#script-nesting-level>script nesting level</a>
     is non-zero, but this <code><a href=#script>script</a></code> element does not have

Modified: index
===================================================================
--- index	2010-09-25 18:56:11 UTC (rev 5495)
+++ index	2010-09-25 19:26:24 UTC (rev 5496)
@@ -14237,13 +14237,30 @@
 
    </li>
 
+   <li>
+
+    <p>If the element has its <a href=#parser-inserted>"parser-inserted"</a> flag set,
+    then set <var title="">was-parser-inserted</var> to true and unset
+    the element's <a href=#parser-inserted>"parser-inserted"</a> flag. Otherwise, set
+    <var title="">was-parser-inserted</var> to false.</p>
+
+    <p class=note>This is done so that if parser-inserted
+    <code><a href=#script>script</a></code> elements fail to run when the parser tries to
+    run them, e.g. because they are empty or specify an unsupported
+    scripting language, another script can later mutate them and cause
+    them to run again.</p>
+
+    <!-- q.v. http://hsivonen.iki.fi/test/moz/script-setting-src-on-parser-inserted-script.html -->
+
+   </li>
+
    <li id=script-processing-empty>
 
     <p>If the element has no <code title=attr-script-src><a href=#attr-script-src>src</a></code>
-    attribute, and its child nodes consist only of comment nodes and
-    empty <a href=#text-node title="text node">text nodes</a>, then the user
-    agent must abort these steps at this point. The script is not
-    executed.</p>
+    attribute, and its child nodes, if any, consist only of comment
+    nodes and empty <a href=#text-node title="text node">text nodes</a>, then
+    the user agent must abort these steps at this point. The script is
+    not executed.</p>
 
    </li>
 
@@ -14331,6 +14348,13 @@
 
    <li>
 
+    <p>If <var title="">was-parser-inserted</var> is true, then flag
+    the element as <a href=#parser-inserted>"parser-inserted"</a> again.</p>
+
+   </li>
+
+   <li>
+
     <p>If the element's <code><a href=#document>Document</a></code> has an <a href=#active-parser>active
     parser</a>, and the parser's <a href=#script-nesting-level>script nesting level</a>
     is non-zero, but this <code><a href=#script>script</a></code> element does not have

Modified: source
===================================================================
--- source	2010-09-25 18:56:11 UTC (rev 5495)
+++ source	2010-09-25 19:26:24 UTC (rev 5496)
@@ -15084,13 +15084,30 @@
 
    </li>
 
+   <li>
+
+    <p>If the element has its <span>"parser-inserted"</span> flag set,
+    then set <var title="">was-parser-inserted</var> to true and unset
+    the element's <span>"parser-inserted"</span> flag. Otherwise, set
+    <var title="">was-parser-inserted</var> to false.</p>
+
+    <p class="note">This is done so that if parser-inserted
+    <code>script</code> elements fail to run when the parser tries to
+    run them, e.g. because they are empty or specify an unsupported
+    scripting language, another script can later mutate them and cause
+    them to run again.</p>
+
+    <!-- q.v. http://hsivonen.iki.fi/test/moz/script-setting-src-on-parser-inserted-script.html -->
+
+   </li>
+
    <li id="script-processing-empty">
 
     <p>If the element has no <code title="attr-script-src">src</code>
-    attribute, and its child nodes consist only of comment nodes and
-    empty <span title="text node">text nodes</span>, then the user
-    agent must abort these steps at this point. The script is not
-    executed.</p>
+    attribute, and its child nodes, if any, consist only of comment
+    nodes and empty <span title="text node">text nodes</span>, then
+    the user agent must abort these steps at this point. The script is
+    not executed.</p>
 
    </li>
 
@@ -15208,6 +15225,13 @@
 
    <li>
 
+    <p>If <var title="">was-parser-inserted</var> is true, then flag
+    the element as <span>"parser-inserted"</span> again.</p>
+
+   </li>
+
+   <li>
+
     <p>If the element's <code>Document</code> has an <span>active
     parser</span>, and the parser's <span>script nesting level</span>
     is non-zero, but this <code>script</code> element does not have




More information about the Commit-Watchers mailing list