Reviewed by Hyatt.
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Apr 2006 22:31:55 +0000 (22:31 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Apr 2006 22:31:55 +0000 (22:31 +0000)
        - Fixed http://bugzilla.opendarwin.org/post_bug.cgi
        REGRESSION (r14048): Google calendar not parsing

        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::handleError): Rolling out grandparent NULL check
        because it caused this regression and there's no test case
        justifying it.

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

WebCore/ChangeLog
WebCore/html/HTMLParser.cpp

index 3bf1c98dd3620c75163d79b476354896787b700c..e0d2593bc3890967ea5cbff38c873a7eea3fd317 100644 (file)
@@ -1,3 +1,15 @@
+2006-04-26  Geoffrey Garen  <ggaren@apple.com>
+
+        Reviewed by Hyatt.
+
+        - Fixed http://bugzilla.opendarwin.org/post_bug.cgi
+        REGRESSION (r14048): Google calendar not parsing
+        
+        * html/HTMLParser.cpp:
+        (WebCore::HTMLParser::handleError): Rolling out grandparent NULL check
+        because it caused this regression and there's no test case
+        justifying it.
+        
 2006-04-26  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by hyatt
index b2344f053242a27c213048fa6e57a44fed1140e5..107839e50f812125c095d0a5a603b83b42674128 100644 (file)
@@ -487,13 +487,12 @@ bool HTMLParser::handleError(Node* n, bool flat, const AtomicString& localName,
                 if (possiblyMoveStrayContent) {
                     Node *node = current;
                     Node *parent = node->parentNode();
-                    // It is allowed for nodes on the node stack to have been removed from the tree, thus we have to check (parentNode() == NULL) first
+                    // A script may have removed the current node's parent from the DOM
                     // http://bugzilla.opendarwin.org/show_bug.cgi?id=7137
+                    // FIXME: we should do real recovery here and re-parent with the correct node.
                     if (!parent)
                         return false;
                     Node *grandparent = parent->parentNode();
-                    if (!grandparent)
-                        return false;
 
                     if (n->isTextNode() ||
                         (h->hasLocalName(trTag) &&