Title: [145293] trunk
- Revision
- 145293
- Author
- rafa...@chromium.org
- Date
- 2013-03-08 17:29:38 -0800 (Fri, 08 Mar 2013)
Log Message
[HTMLTemplateElement] processTemplateEndTag() needs to check for template in html scope
https://bugs.webkit.org/show_bug.cgi?id=111880
Reviewed by Eric Seidel.
Source/WebCore:
Currently, </template> handling exits with an error if there is not a template tag "in scope"
which will be true if there is a table (for instance) below a template. This makes it so that
the search (correctly) examines the entire element stack.
Tests added to html5lib testing library.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processTemplateEndTag):
LayoutTests:
* html5lib/resources/template.dat:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (145292 => 145293)
--- trunk/LayoutTests/ChangeLog 2013-03-09 01:06:36 UTC (rev 145292)
+++ trunk/LayoutTests/ChangeLog 2013-03-09 01:29:38 UTC (rev 145293)
@@ -1,3 +1,12 @@
+2013-03-08 Rafael Weinstein <rafa...@chromium.org>
+
+ [HTMLTemplateElement] processTemplateEndTag() needs to check for template in html scope
+ https://bugs.webkit.org/show_bug.cgi?id=111880
+
+ Reviewed by Eric Seidel.
+
+ * html5lib/resources/template.dat:
+
2013-03-08 Ryosuke Niwa <rn...@webkit.org>
Add a failing test expectation per bug 111901.
Modified: trunk/LayoutTests/html5lib/resources/template.dat (145292 => 145293)
--- trunk/LayoutTests/html5lib/resources/template.dat 2013-03-09 01:06:36 UTC (rev 145292)
+++ trunk/LayoutTests/html5lib/resources/template.dat 2013-03-09 01:29:38 UTC (rev 145293)
@@ -1191,3 +1191,42 @@
| <style>
| "var i"
| <body>
+
+#data
+<template><table></template><body><span>Foo
+#errors
+#document
+| <html>
+| <head>
+| <template>
+| content
+| <table>
+| <body>
+| <span>
+| "Foo"
+
+#data
+<template><td></template><body><span>Foo
+#errors
+#document
+| <html>
+| <head>
+| <template>
+| content
+| <td>
+| <body>
+| <span>
+| "Foo"
+
+#data
+<template><object></template><body><span>Foo
+#errors
+#document
+| <html>
+| <head>
+| <template>
+| content
+| <object>
+| <body>
+| <span>
+| "Foo"
Modified: trunk/Source/WebCore/ChangeLog (145292 => 145293)
--- trunk/Source/WebCore/ChangeLog 2013-03-09 01:06:36 UTC (rev 145292)
+++ trunk/Source/WebCore/ChangeLog 2013-03-09 01:29:38 UTC (rev 145293)
@@ -1,3 +1,19 @@
+2013-03-08 Rafael Weinstein <rafa...@chromium.org>
+
+ [HTMLTemplateElement] processTemplateEndTag() needs to check for template in html scope
+ https://bugs.webkit.org/show_bug.cgi?id=111880
+
+ Reviewed by Eric Seidel.
+
+ Currently, </template> handling exits with an error if there is not a template tag "in scope"
+ which will be true if there is a table (for instance) below a template. This makes it so that
+ the search (correctly) examines the entire element stack.
+
+ Tests added to html5lib testing library.
+
+ * html/parser/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processTemplateEndTag):
+
2013-03-08 Eric Seidel <e...@webkit.org>
BackgroundHTMLParser should be able to atomize well-known strings
Modified: trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp (145292 => 145293)
--- trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp 2013-03-09 01:06:36 UTC (rev 145292)
+++ trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp 2013-03-09 01:29:38 UTC (rev 145293)
@@ -958,7 +958,8 @@
void HTMLTreeBuilder::processTemplateEndTag(AtomicHTMLToken* token)
{
- if (!m_tree.openElements()->inScope(token->name())) {
+ if (!m_tree.openElements()->hasTemplateInHTMLScope()) {
+ ASSERT(m_templateInsertionModes.isEmpty());
parseError(token);
return;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes