This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22322 - Where possible, replace parts of the parser that say "act as is a ... tag had been seen" with explicit requirements to act appropriately (e.g. pop the stack, add elements, etc)
Summary: Where possible, replace parts of the parser that say "act as is a ... tag had...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P1 blocker
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on: 17930
Blocks: 21308
  Show dependency treegraph
 
Reported: 2013-06-10 22:47 UTC by contributor
Modified: 2013-07-03 14:19 UTC (History)
11 users (show)

See Also:


Attachments

Description contributor 2013-06-10 22:47:12 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#tree-construction
Complete: http://www.whatwg.org/c#tree-construction
Referrer: 

Comment:
Where possible, replace parts of the parser that say "act as is a ... tag had
been seen" with explicit requirements to act appropriately (e.g. pop the
stack, add elements, etc)

Posted from: 2620:0:1000:147c:e6ce:8fff:fe07:8094 by ian@hixie.ch
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1521.3 Safari/537.36
Comment 1 Ian 'Hixie' Hickson 2013-06-10 22:50:11 UTC
I don't know how plausible this is, but it would make the parser easier to understand, which would then make solving the problems with namespaces more tractable. Any opinions?

Before doing this throughout I'd try to do it in a few places to make sure it was itself tractable and to make sure we were all on the same page.
Comment 2 Anne 2013-06-12 06:14:12 UTC
Sounds okay to me.
Comment 3 Henri Sivonen 2013-06-12 07:29:45 UTC
Seems superficially OK. The V.nu parser tends to inline "as if" stuff anyway.
Comment 4 Ian 'Hixie' Hickson 2013-06-28 23:05:39 UTC
The main idea here would be to remove the parser's assumption in the html section that we're not in a foreign section (or that if we are, that the fake tokens it's generating are going to match html nodes, not foreign ones). Ideally, this will then fix bug 21308, or at least make it much more obvious what needs fixing to address the problems there.
Comment 5 Ian 'Hixie' Hickson 2013-07-01 19:24:39 UTC
Note to self: I'm not inlining the AAA into the <a> start tag step.
Comment 6 Ian 'Hixie' Hickson 2013-07-01 19:25:12 UTC
Same for <nobr>.
Comment 7 Ian 'Hixie' Hickson 2013-07-01 20:48:38 UTC
And not inlining </script> in foreign content either. But that one seems safe.
Comment 8 contributor 2013-07-01 21:19:56 UTC
Checked in as WHATWG revision r8001.
Check-in comment: Change the HTML parser from using 'act as if' tokens to inlining the behaviour. The only normative changes should be the number of 'parse errors' detected in certain edge cases. Three occurrences of 'act as if' remain. This should make it a lot easier to fix the spec's namespace issues.
http://html5.org/tools/web-apps-tracker?from=8000&to=8001
Comment 9 contributor 2013-07-01 21:49:28 UTC
Checked in as WHATWG revision r8002.
Check-in comment: Remove the remaining 'act as if' cases. This _should_ be an entirely editorial fix, but reviews are definitely encouraged...
http://html5.org/tools/web-apps-tracker?from=8001&to=8002
Comment 10 Ian 'Hixie' Hickson 2013-07-03 14:19:52 UTC
Let me know if I missed anything!