[html5] r7918 - [cgiowt] (3) Turn off a quirk in foreign lands when doing innerHTML parsing Fixi [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Jun 6 12:56:36 PDT 2013


Author: ianh
Date: 2013-06-06 12:56:34 -0700 (Thu, 06 Jun 2013)
New Revision: 7918

Modified:
   complete.html
   index
   source
Log:
[cgiowt] (3) Turn off a quirk in foreign lands when doing innerHTML parsing
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=17924
Affected topics: HTML Syntax and Parsing

Modified: complete.html
===================================================================
--- complete.html	2013-06-06 19:41:36 UTC (rev 7917)
+++ complete.html	2013-06-06 19:56:34 UTC (rev 7918)
@@ -91312,22 +91312,24 @@
    parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small", "span", "strong", "strike"<!-- so
    that s and strike can be handled uniformly throughout the parser -->, <!--"style",--> "sub",
    "sup", "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this list was determined
-   empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> <dt>A
-   start tag whose tag name is "font", if the token has any attributes named "color", "face", or
-   "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG but
-   legacy <font>s won't -->
+   empirically by studying over 6,000,000,000 pages that were specifically not XML pages -->
+   <dt>A start tag whose tag name is "font", if the token has any attributes named "color", "face",
+   or "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG
+   but legacy <font>s won't -->
 
    <dd>
 
     <p><a href=#parse-error>Parse error</a>.</p>
 
-    <p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-scope title="has an element in
-    scope">have an element in scope</a> that is a <a href=#mathml-text-integration-point>MathML text integration point</a>, an
-    <a href=#html-integration-point>HTML integration point</a>, or an element in the <a href=#html-namespace-0>HTML namespace</a>, or if the
-    <a href=#stack-of-open-elements>stack of open elements</a> has only one element, then process the token <a href=#using-the-rules-for>using the
-    rules for</a> the "<a href=#parsing-main-inbody title="insertion mode: in body">in body</a>" <a href=#insertion-mode>insertion
-    mode</a>. (<a href=#fragment-case>fragment case</a>)</p>
+    <!-- for sanity's sake, we limit this wacked quirk to legacy full-document parsing, not to
+    innerHTML. We have no data showing whether (or that) this is needed for innerHTML. If innerHTML
+    is used on an SVG or MathML node, it definitely doesn't make any sense (there's nothing to pop
+    to in the first place). Therefore, rather than trying to figure out in what convoluted
+    conditions we could actually do this quirk for innerHTML, we just don't do it at all. -->
 
+    <p>If the parser was originally created for the <a href=#html-fragment-parsing-algorithm>HTML fragment parsing algorithm</a>,
+    then act as described in the "any other start tag" entry below. (<a href=#fragment-case>fragment case</a>)</p>
+
     <p>Otherwise:</p>
 
     <p>Pop an element from the <a href=#stack-of-open-elements>stack of open elements</a>, and then keep popping more

Modified: index
===================================================================
--- index	2013-06-06 19:41:36 UTC (rev 7917)
+++ index	2013-06-06 19:56:34 UTC (rev 7918)
@@ -91312,22 +91312,24 @@
    parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small", "span", "strong", "strike"<!-- so
    that s and strike can be handled uniformly throughout the parser -->, <!--"style",--> "sub",
    "sup", "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this list was determined
-   empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> <dt>A
-   start tag whose tag name is "font", if the token has any attributes named "color", "face", or
-   "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG but
-   legacy <font>s won't -->
+   empirically by studying over 6,000,000,000 pages that were specifically not XML pages -->
+   <dt>A start tag whose tag name is "font", if the token has any attributes named "color", "face",
+   or "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG
+   but legacy <font>s won't -->
 
    <dd>
 
     <p><a href=#parse-error>Parse error</a>.</p>
 
-    <p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-scope title="has an element in
-    scope">have an element in scope</a> that is a <a href=#mathml-text-integration-point>MathML text integration point</a>, an
-    <a href=#html-integration-point>HTML integration point</a>, or an element in the <a href=#html-namespace-0>HTML namespace</a>, or if the
-    <a href=#stack-of-open-elements>stack of open elements</a> has only one element, then process the token <a href=#using-the-rules-for>using the
-    rules for</a> the "<a href=#parsing-main-inbody title="insertion mode: in body">in body</a>" <a href=#insertion-mode>insertion
-    mode</a>. (<a href=#fragment-case>fragment case</a>)</p>
+    <!-- for sanity's sake, we limit this wacked quirk to legacy full-document parsing, not to
+    innerHTML. We have no data showing whether (or that) this is needed for innerHTML. If innerHTML
+    is used on an SVG or MathML node, it definitely doesn't make any sense (there's nothing to pop
+    to in the first place). Therefore, rather than trying to figure out in what convoluted
+    conditions we could actually do this quirk for innerHTML, we just don't do it at all. -->
 
+    <p>If the parser was originally created for the <a href=#html-fragment-parsing-algorithm>HTML fragment parsing algorithm</a>,
+    then act as described in the "any other start tag" entry below. (<a href=#fragment-case>fragment case</a>)</p>
+
     <p>Otherwise:</p>
 
     <p>Pop an element from the <a href=#stack-of-open-elements>stack of open elements</a>, and then keep popping more

Modified: source
===================================================================
--- source	2013-06-06 19:41:36 UTC (rev 7917)
+++ source	2013-06-06 19:56:34 UTC (rev 7918)
@@ -101990,22 +101990,24 @@
    parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small", "span", "strong", "strike"<!-- so
    that s and strike can be handled uniformly throughout the parser -->, <!--"style",--> "sub",
    "sup", "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this list was determined
-   empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> <dt>A
-   start tag whose tag name is "font", if the token has any attributes named "color", "face", or
-   "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG but
-   legacy <font>s won't -->
+   empirically by studying over 6,000,000,000 pages that were specifically not XML pages -->
+   <dt>A start tag whose tag name is "font", if the token has any attributes named "color", "face",
+   or "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG
+   but legacy <font>s won't -->
 
    <dd>
 
     <p><span>Parse error</span>.</p>
 
-    <p>If the <span>stack of open elements</span> does not <span title="has an element in
-    scope">have an element in scope</span> that is a <span>MathML text integration point</span>, an
-    <span>HTML integration point</span>, or an element in the <span>HTML namespace</span>, or if the
-    <span>stack of open elements</span> has only one element, then process the token <span>using the
-    rules for</span> the "<span title="insertion mode: in body">in body</span>" <span>insertion
-    mode</span>. (<span>fragment case</span>)</p>
+    <!-- for sanity's sake, we limit this wacked quirk to legacy full-document parsing, not to
+    innerHTML. We have no data showing whether (or that) this is needed for innerHTML. If innerHTML
+    is used on an SVG or MathML node, it definitely doesn't make any sense (there's nothing to pop
+    to in the first place). Therefore, rather than trying to figure out in what convoluted
+    conditions we could actually do this quirk for innerHTML, we just don't do it at all. -->
 
+    <p>If the parser was originally created for the <span>HTML fragment parsing algorithm</span>,
+    then act as described in the "any other start tag" entry below. (<span>fragment case</span>)</p>
+
     <p>Otherwise:</p>
 
     <p>Pop an element from the <span>stack of open elements</span>, and then keep popping more




More information about the Commit-Watchers mailing list