2011-01-06 Tony Gentilcore <tonyg@chromium.org>
authortonyg@chromium.org <tonyg@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jan 2011 22:07:41 +0000 (22:07 +0000)
committertonyg@chromium.org <tonyg@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jan 2011 22:07:41 +0000 (22:07 +0000)
        Reviewed by Eric Seidel.

        Allow framesets after hidden inputs
        https://bugs.webkit.org/show_bug.cgi?id=51998

        * html5lib/resources/webkit01.dat: Demonstrate that the value of the type attribute matters. An input with no type is tested in tests19.dat.
2011-01-06  Tony Gentilcore  <tonyg@chromium.org>

        Reviewed by Eric Seidel.

        Allow framesets after hidden inputs
        https://bugs.webkit.org/show_bug.cgi?id=51998

        This implements the HTML5 spec update in response to:
        http://www.w3.org/Bugs/Public/show_bug.cgi?id=11156

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

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

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

index 3252bd6..a52e5ab 100644 (file)
@@ -1,3 +1,12 @@
+2011-01-06  Tony Gentilcore  <tonyg@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Allow framesets after hidden inputs
+        https://bugs.webkit.org/show_bug.cgi?id=51998
+
+        * html5lib/resources/webkit01.dat: Demonstrate that the value of the type attribute matters. An input with no type is tested in tests19.dat.
+
 2010-12-29  Zhenyao Mo  <zmo@google.com>
 
         Reviewed by Kenneth Russell.
index f8d73f9..4101b21 100644 (file)
@@ -587,3 +587,23 @@ console.log("FOO<span>BAR</span>BAZ");
 |             "1"
 |         <math mi>
 |           "a"
+
+#data
+<!doctype html><input type="hidden"><frameset>
+#errors
+#document
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <frameset>
+
+#data
+<!doctype html><input type="button"><frameset>
+#errors
+#document
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <input>
+|       type="button"
index c6ef1dd..01ebf58 100644 (file)
@@ -1,3 +1,16 @@
+2011-01-06  Tony Gentilcore  <tonyg@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Allow framesets after hidden inputs
+        https://bugs.webkit.org/show_bug.cgi?id=51998
+
+        This implements the HTML5 spec update in response to:
+        http://www.w3.org/Bugs/Public/show_bug.cgi?id=11156
+
+        * html/parser/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
+
 2010-12-29  Zhenyao Mo  <zmo@google.com>
 
         Reviewed by Kenneth Russell.
index c37d6f1..02713e5 100644 (file)
@@ -893,7 +893,6 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken& token)
         || token.name() == brTag
         || token.name() == embedTag
         || token.name() == imgTag
-        || token.name() == inputTag
         || token.name() == keygenTag
         || token.name() == wbrTag) {
         m_tree.reconstructTheActiveFormattingElements();
@@ -901,6 +900,14 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken& token)
         m_framesetOk = false;
         return;
     }
+    if (token.name() == inputTag) {
+        RefPtr<Attribute> typeAttribute = token.getAttributeItem(typeAttr);
+        m_tree.reconstructTheActiveFormattingElements();
+        m_tree.insertSelfClosingHTMLElement(token);
+        if (!typeAttribute || !equalIgnoringCase(typeAttribute->value(), "hidden"))
+            m_framesetOk = false;
+        return;
+    }
     if (token.name() == paramTag
         || token.name() == sourceTag
         || token.name() == trackTag) {