[Bug 20924] [Templates]: processing an EOF token deep within a template which was opened in <head> may fail to run after-head work

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20924

--- Comment #3 from William Chen <wchen@mozilla.com> ---
Another approach we can take is to generate an implicit </template> on EOF in
the "template contents" mode. And then defer "in body", "in table", "in column
group" and "in frameset" modes to "template contents" if in the "template
contents case". The algorithm to handle </template> will pop the stack to the
last template and it will generate parse errors for some weird looking markup.
This should have the same tree output as the Rafael's solution because each
nested template will pop the stack to the previous template until there are
none left (instead of popping them all in one go).

I think this solution is simpler because we don't create a new algorithm that
does almost the same thing as </template>. Also, the spec is simpler because we
don't need as much language, it's almost all just deferring cases to "template
contents". I think it's also easier to understand that we are handling a quirk
in templates when we defer to "template case" rather than to "in table" for
column group and frameset.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 11 February 2013 23:40:22 UTC