2010-11-02 James Simonsen <simonjam@chromium.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Nov 2010 03:56:46 +0000 (03:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Nov 2010 03:56:46 +0000 (03:56 +0000)
        Reviewed by Adam Barth.

        mathml in html sometimes incorrectly parsed
        https://bugs.webkit.org/show_bug.cgi?id=48105

        * html5lib/resources/webkit01.dat: Test case for bug.
2010-11-02  James Simonsen  <simonjam@chromium.org>

        Reviewed by Adam Barth.

        mathml in html sometimes incorrectly parsed
        https://bugs.webkit.org/show_bug.cgi?id=48105

        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::processEndTag): Fixed to match HTML5 spec.

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

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

index 31372e3..896d11c 100644 (file)
@@ -1,3 +1,12 @@
+2010-11-02  James Simonsen  <simonjam@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        mathml in html sometimes incorrectly parsed
+        https://bugs.webkit.org/show_bug.cgi?id=48105
+
+        * html5lib/resources/webkit01.dat: Test case for bug.
+
 2010-11-02  Dmitry Titov  <dimich@chromium.org>
 
         [Chromium] Unreviewed update of test expectations.
index 9869454..f8d73f9 100644 (file)
@@ -572,3 +572,18 @@ console.log("FOO<span>BAR</span>BAZ");
 |     <svg svg>
 |       <svg tfoot>
 |         <svg td>
+
+#data
+<math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math>
+#errors
+#document
+| <html>
+|   <head>
+|   <body>
+|     <math math>
+|       <math mrow>
+|         <math mrow>
+|           <math mn>
+|             "1"
+|         <math mi>
+|           "a"
index 7739304..4f10a74 100644 (file)
@@ -1,3 +1,13 @@
+2010-11-02  James Simonsen  <simonjam@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        mathml in html sometimes incorrectly parsed
+        https://bugs.webkit.org/show_bug.cgi?id=48105
+
+        * html/parser/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processEndTag): Fixed to match HTML5 spec.
+
 2010-11-02  Chris Guillory  <chris.guillory@google.com>
 
         Reviewed by Dmitry Titov.
index c385437..6134607 100644 (file)
@@ -2295,7 +2295,8 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
             while (1) {
                 if (nodeRecord->element()->hasLocalName(token.name())) {
                     m_tree.openElements()->popUntilPopped(nodeRecord->element());
-                    break;
+                    resetForeignInsertionMode();
+                    return;
                 }
                 nodeRecord = nodeRecord->next();
                 if (nodeRecord->element()->namespaceURI() == xhtmlNamespaceURI)