This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The HTML parser misorders the text nodes in this example: <b><i><a><s><tt><div></b>first</b></div></tt></s></a>second</i> Given the importance of the HTML parser, this should probably be fixed before CR.
So for the simple case of ignoring the "If inner loop counter is greater than or equal to three, then go to the next step in the overall algorithm." part of the AAA, <b><i><a><s><tt><div></b>first</b></div></tt></s></a>second</i> parses into <b><i><a><s><tt></tt></s></a></i></b><i><a><s><tt><div><b></b>first</div></tt></s></a>second</i> At least that's what I get from hacking html5lib to ignore the "greater than or equal to three" limit.
See: http://html5.org/tools/web-apps-tracker?from=5641&to=5642 It seems a little weird to want to "fix" this bug when all of the major recent browsers are 100% consistent on their parsing behavior in this scenario--e.g., we've successfully achieved an interoperable HTML5 parser! What'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 "practical limits" for the AAA which seem to have resulted in this problem. Yet, if this isn't really a "problem" for web content somewhere, then why fix it? My inclination is to Won't Fix this bug and call this an interesting anomaly of the AAA (and move on). There's enough other bizarre features of the HTML5 parser that I'm pretty comfortable with that idea.
Ian, you appear to have addressed this in the WHATWG spec: http://html5.org/tools/web-apps-tracker?from=8107&to=8108 and https://github.com/w3c/html/commit/6e2035558ee3764f38a697a9e90e254461acd74f The question now becomes, will implementations adjust to match?
EDITOR'S RESPONSE: This is an Editor'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