A start "body" tag in the "in body" insertion mode is a parse error
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 16:08:26 +0000 (16:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 16:08:26 +0000 (16:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90373

Patch by Kwang Yul Seo <skyul@company100.net> on 2012-07-02
Reviewed by Eric Seidel.

According to HTML5 specification (http://www.w3.org/TR/html5/tree-construction.html#parsing-main-inbody),
a start "body" tag in the "in body" insertion mode is a parse error. So parseError(token) is required here.
No behavior change because parseError(token) is just a marker.

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

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

Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLTreeBuilder.cpp

index 49fc3f8..967546d 100644 (file)
@@ -1,3 +1,17 @@
+2012-07-02  Kwang Yul Seo  <skyul@company100.net>
+
+        A start "body" tag in the "in body" insertion mode is a parse error
+        https://bugs.webkit.org/show_bug.cgi?id=90373
+
+        Reviewed by Eric Seidel.
+
+        According to HTML5 specification (http://www.w3.org/TR/html5/tree-construction.html#parsing-main-inbody),
+        a start "body" tag in the "in body" insertion mode is a parse error. So parseError(token) is required here.
+        No behavior change because parseError(token) is just a marker.
+
+        * html/parser/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
+
 2012-07-02  Raphael Kubo da Costa  <rakuco@webkit.org>
 
         [EFL] Unreviewed build fix with ENABLE_NETSCAPE_PLUGIN_API after r121467.
index 56b7658..fd0d003 100644 (file)
@@ -751,6 +751,7 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken& token)
         return;
     }
     if (token.name() == bodyTag) {
+        parseError(token);
         if (!m_tree.openElements()->secondElementIsHTMLBodyElement() || m_tree.openElements()->hasOnlyOneElement()) {
             ASSERT(isParsingFragment());
             return;