[Bug 18613] [Templates]: Section 7 Parsing HTML Templates needs to be re-written

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

Rafael Weinstein <rafaelw@chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #3 from Rafael Weinstein <rafaelw@chromium.org> 2012-08-28 23:45:46 UTC ---
I implemented the current spec text (including "clear the stack back to XXX",
and I have some questions:

Here are html5lib test cases that illustrate the issues:

// Does naked template go into <head> or <body> -- as is, it goes into <head>
#data
<template>Hello</template>
#errors
#document
| <html>
|   <head>
|   <body>
|     <template>
|       "Hello"

// Can template exist as a child of <html> -- as is, it gets put into <head>
#data
<html><template><div>
#errors
#document
| <html>
|   <template>
|     <div>

// Can template exist as a child of <colgroup> -- as is, no
#data
<table><colgroup><template>Hello
#errors
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <colgroup>
|         <template>
|           "Hello"

// Can template exist as a child of <frameset> -- as is, no
#data
<frameset><template><frame>
#errors
#document
| <html>
|   <head>
|   <body>
|     <frameset>
|       <template>
|         <frame>

// Reset insertion mode picks InBody for </head>, which is wrong for this case.
-- as is, this actually hits a series of assertions, and I'm pretty sure it's
wrong.
#data
<head><template><div></div></template></head>
#errors
#document
| <html>
|   <head>
|     <template>
|       <div>

// Should "in cell" be modified to "close the cell" on </template> (e.g. with
</table>, </tbody>, </tfoot>, </thead>, </tr>) -- as is, </tr> wil lbe ignored
and <div> appended to <td>
#data
<body><template><td></tr><div></template>
#errors
#document
| <html>
|   <head>
|   <body>
|     <template>
|       <td>
|       <div>

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 28 August 2012 23:45:47 UTC