<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20319</bug_id>
          
          <creation_ts>2012-12-10 04:40:50 +0000</creation_ts>
          <short_desc>Parser issue with AAA</short_desc>
          <delta_ts>2013-08-02 00:07:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>exclusion</status_whiteboard>
          <keywords>CR</keywords>
          <priority>P2</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>eoconnor</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
    
    <cc>travil</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>79791</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-10 04:40:50 +0000</bug_when>
    <thetext>The HTML parser misorders the text nodes in this example:

   &lt;b&gt;&lt;i&gt;&lt;a&gt;&lt;s&gt;&lt;tt&gt;&lt;div&gt;&lt;/b&gt;first&lt;/b&gt;&lt;/div&gt;&lt;/tt&gt;&lt;/s&gt;&lt;/a&gt;second&lt;/i&gt;

Given the importance of the HTML parser, this should probably be fixed before CR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80326</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2012-12-18 09:32:40 +0000</bug_when>
    <thetext>So for the simple case of ignoring the &quot;If inner loop counter is greater than or equal to three, then go to the next step in the overall algorithm.&quot; part of the AAA, &lt;b&gt;&lt;i&gt;&lt;a&gt;&lt;s&gt;&lt;tt&gt;&lt;div&gt;&lt;/b&gt;first&lt;/b&gt;&lt;/div&gt;&lt;/tt&gt;&lt;/s&gt;&lt;/a&gt;second&lt;/i&gt; parses into &lt;b&gt;&lt;i&gt;&lt;a&gt;&lt;s&gt;&lt;tt&gt;&lt;/tt&gt;&lt;/s&gt;&lt;/a&gt;&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;a&gt;&lt;s&gt;&lt;tt&gt;&lt;div&gt;&lt;b&gt;&lt;/b&gt;first&lt;/div&gt;&lt;/tt&gt;&lt;/s&gt;&lt;/a&gt;second&lt;/i&gt;

At least that&apos;s what I get from hacking html5lib to ignore the &quot;greater than or equal to three&quot; limit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91104</commentid>
    <comment_count>2</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2013-07-22 23:25:04 +0000</bug_when>
    <thetext>See: http://html5.org/tools/web-apps-tracker?from=5641&amp;to=5642

It seems a little weird to want to &quot;fix&quot; this bug when all of the major recent browsers are 100% consistent on their parsing behavior in this scenario--e.g., we&apos;ve successfully achieved an interoperable HTML5 parser!

What&apos;s so bad about leaving the current limits in place? I.e., is there a site compatibility bug that is motivating this change, or is it simply altruistic? The linked bug above describes &quot;practical limits&quot; for the AAA which seem to have resulted in this problem. Yet, if this isn&apos;t really a &quot;problem&quot; for web content somewhere, then why fix it?

My inclination is to Won&apos;t Fix this bug and call this an interesting anomaly of the AAA (and move on). There&apos;s enough other bizarre features of the HTML5 parser that I&apos;m pretty comfortable with that idea.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91530</commentid>
    <comment_count>3</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2013-08-01 23:23:13 +0000</bug_when>
    <thetext>Ian, you appear to have addressed this in the WHATWG spec:
http://html5.org/tools/web-apps-tracker?from=8107&amp;to=8108
and
https://github.com/w3c/html/commit/6e2035558ee3764f38a697a9e90e254461acd74f

The question now becomes, will implementations adjust to match?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91532</commentid>
    <comment_count>4</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2013-08-02 00:07:47 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:


   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: Applied existing patch (see below)

Chose to adopt two WHATWG/HTML5.1 patches to fix this bug in a manner harmonious with the WHATWG spec:

Cleanup the AAA algorithm: https://github.com/w3c/html/commit/9adb3bdc0ad9d12554a33e249dab52f265dfb3c2
Apply fix that prevents this out-of-order issue:
https://github.com/w3c/html/commit/f24a58afea6fcd12069ff7938a6d4839eb563f57</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>