[HTMLTemplateElement] Non </template> end tags should be ignored in "template content...
authorrafaelw@chromium.org <rafaelw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 00:15:23 +0000 (00:15 +0000)
committerrafaelw@chromium.org <rafaelw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 00:15:23 +0000 (00:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=109090

Reviewed by Adam Barth.

Source/WebCore:

https://dvcs.w3.org/hg/webcomponents/raw-file/38536d37fb82/spec/templates/index.html#template-contents-insertion-mode.

Test added to html5lib suite.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processEndTag):

LayoutTests:

* html5lib/resources/template.dat:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142049 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/html5lib/resources/template.dat
Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLTreeBuilder.cpp

index 3f898a8..7a861e3 100644 (file)
@@ -1,3 +1,12 @@
+2013-02-06  Rafael Weinstein  <rafaelw@chromium.org>
+
+        [HTMLTemplateElement] Non </template> end tags should be ignored in "template contents" insertion mode.
+        https://bugs.webkit.org/show_bug.cgi?id=109090
+
+        Reviewed by Adam Barth.
+
+        * html5lib/resources/template.dat:
+
 2013-02-06  Stephen Chenney  <schenney@chromium.org>
 
         [Chromium] Test expectations update for Skia change.
index 6bbd487..31eb96b 100644 (file)
 |         <menu>
 |           <i>
 |             "Foo"
+
+#data
+<body><template></div><div>Foo</div><template></template><tr></tr>
+#errors
+#document
+| <html>
+|   <head>
+|   <body>
+|     <template>
+|       #document-fragment
+|         <div>
+|           "Foo"
+|         <template>
+|           #document-fragment
+
+#data
+<body><div><template></div><tr><td>Foo</td></tr></template>
+#errors
+#document
+| <html>
+|   <head>
+|   <body>
+|     <div>
+|       <template>
+|         #document-fragment
+|           <tr>
+|             <td>
+|               "Foo"
index fc7fe18..98148a4 100644 (file)
@@ -1,3 +1,17 @@
+2013-02-06  Rafael Weinstein  <rafaelw@chromium.org>
+
+        [HTMLTemplateElement] Non </template> end tags should be ignored in "template contents" insertion mode.
+        https://bugs.webkit.org/show_bug.cgi?id=109090
+
+        Reviewed by Adam Barth.
+
+        https://dvcs.w3.org/hg/webcomponents/raw-file/38536d37fb82/spec/templates/index.html#template-contents-insertion-mode.
+
+        Test added to html5lib suite.
+
+        * html/parser/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processEndTag):
+
 2013-02-06  Alexandre Elias  <aelias@chromium.org>
 
         Make ScrollView::paint() clip by visibleContentRect
index e78e5c7..6cddddc 100644 (file)
@@ -2278,8 +2278,8 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken* token)
             processTemplateEndTag(token);
             return;
         }
-        setInsertionMode(InBodyMode);
-        processEndTag(token);
+
+        break;
 #else
         ASSERT_NOT_REACHED();
 #endif