LayoutTests:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Aug 2006 19:23:46 +0000 (19:23 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Aug 2006 19:23:46 +0000 (19:23 +0000)
        Reviewed by John Sullivan.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10204
          REGRESSION: title tag parsing problem breaks Travelocity and Google Analytics pages

        * fast/parser/title-error-test-expected.checksum: Added.
        * fast/parser/title-error-test-expected.png: Added.
        * fast/parser/title-error-test-expected.txt: Added.
        * fast/parser/title-error-test.html: Added.

WebCore:

        Reviewed by John Sullivan.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10204
          REGRESSION: title tag parsing problem breaks Travelocity and Google Analytics pages

        Test: fast/parser/title-error-test.html

        * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Fixed an error
        handling case that was skipping until a </style> tag in code that was shared
        between both <title> and <style>. Also rearranged the code a tiny bit.

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

LayoutTests/ChangeLog
LayoutTests/fast/parser/title-error-test-expected.checksum [new file with mode: 0644]
LayoutTests/fast/parser/title-error-test-expected.png [new file with mode: 0644]
LayoutTests/fast/parser/title-error-test-expected.txt [new file with mode: 0644]
LayoutTests/fast/parser/title-error-test.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/HTMLParser.cpp

index 50dbeeeafde77958d51f8402d37366af96eb564c..05f86353e72253bb8a50ccfe24684f80fe5daeeb 100644 (file)
@@ -1,6 +1,16 @@
-2006-08-11  David Kilzer  <ddkilzer@kilzer.net>
+2006-08-14  Darin Adler  <darin@apple.com>
 
-        Reviewed by NOBODY (layout test fix).
+        Reviewed by John Sullivan.
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10204
+          REGRESSION: title tag parsing problem breaks Travelocity and Google Analytics pages
+
+        * fast/parser/title-error-test-expected.checksum: Added.
+        * fast/parser/title-error-test-expected.png: Added.
+        * fast/parser/title-error-test-expected.txt: Added.
+        * fast/parser/title-error-test.html: Added.
+
+2006-08-11  David Kilzer  <ddkilzer@kilzer.net>
 
         Additional layout test fixes from hyatt's "Eliminate RenderImageButton" change
         in r15839.  See also r15840 for more layout test fixes.
diff --git a/LayoutTests/fast/parser/title-error-test-expected.checksum b/LayoutTests/fast/parser/title-error-test-expected.checksum
new file mode 100644 (file)
index 0000000..c053040
--- /dev/null
@@ -0,0 +1 @@
+14f69e81c1adb1a2f0586ee660865fb8
\ No newline at end of file
diff --git a/LayoutTests/fast/parser/title-error-test-expected.png b/LayoutTests/fast/parser/title-error-test-expected.png
new file mode 100644 (file)
index 0000000..f53c6d0
Binary files /dev/null and b/LayoutTests/fast/parser/title-error-test-expected.png differ
diff --git a/LayoutTests/fast/parser/title-error-test-expected.txt b/LayoutTests/fast/parser/title-error-test-expected.txt
new file mode 100644 (file)
index 0000000..611a72c
--- /dev/null
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock (anonymous) at (0,0) size 784x0
+        RenderInline {TIMER:TIME} at (0,0) size 0x0
+          RenderText {#text} at (0,0) size 0x0
+          RenderText {#text} at (0,0) size 0x0
+      RenderBlock (anonymous) at (0,0) size 784x18
+        RenderBlock {P} at (0,0) size 784x18
+          RenderInline {SPAN} at (0,0) size 75x18 [color=#008000]
+            RenderText {#text} at (0,0) size 75x18
+              text run at (0,0) width 75: "SUCCESS:"
+          RenderText {#text} at (75,0) size 147x18
+            text run at (75,0) width 147: " Content was displayed"
+      RenderBlock (anonymous) at (0,34) size 784x0
+        RenderInline {TIMER:TIME} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/fast/parser/title-error-test.html b/LayoutTests/fast/parser/title-error-test.html
new file mode 100644 (file)
index 0000000..eba0731
--- /dev/null
@@ -0,0 +1,5 @@
+<!-- -->
+<timer:time>
+<title></title>
+<p><span style="color: green;">SUCCESS:</span> Content was displayed</p>
+</timer:time>
index 704b144e9552b999aa553b5e2527b21a8b0db16e..44904d2d403194d2ee988ba020c2bb5d9229ae4d 100644 (file)
@@ -1,3 +1,16 @@
+2006-08-14  Darin Adler  <darin@apple.com>
+
+        Reviewed by John Sullivan.
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10204
+          REGRESSION: title tag parsing problem breaks Travelocity and Google Analytics pages
+
+        Test: fast/parser/title-error-test.html
+
+        * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Fixed an error
+        handling case that was skipping until a </style> tag in code that was shared
+        between both <title> and <style>. Also rearranged the code a tiny bit.
+
 2006-08-14  Darin Adler  <darin@apple.com>
 
         Reviewed by Hyatt.
@@ -86,7 +99,6 @@
         * bindings/js/kjs_events.cpp:
         (KJS::JSLazyEventListener::parseCode):
 
->>>>>>> .r15854
 2006-08-12  Eric Seidel  <eric@eseidel.com>
 
         Reviewed by hyatt and mjs.
index fabefed05e454ce7eabcf2ff6bc10bec1cbeed8e..fe38eb2abf802d3087838e59fa15c8fd831a93c4 100644 (file)
@@ -437,19 +437,19 @@ bool HTMLParser::handleError(Node* n, bool flat, const AtomicString& localName,
             if (!head)
                 createHead();
             if (head) {
-                Node *newNode = head->addChild(n);
-                if (newNode) {
-                    pushBlock(localName, tagPriority);
-                    setCurrent(newNode);
-                    if (!n->attached() && !m_fragment)
-                        n->attach();
-                } else {
-                    setSkipMode(styleTag);
+                Node* newNode = head->addChild(n);
+                if (!newNode) {
+                    setSkipMode(h->tagQName());
                     return false;
                 }
+                pushBlock(localName, tagPriority);
+                setCurrent(newNode);
+                if (!n->attached() && !m_fragment)
+                    n->attach();
                 return true;
-            } else if(inBody) {
-                setSkipMode(styleTag);
+            }
+            if (inBody) {
+                setSkipMode(h->tagQName());
                 return false;
             }
         } else if (h->hasLocalName(bodyTag)) {