Fix for 3769409, a regression from 10.3.4 to 10.3.5 involving <colgroup>s in malform...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Sep 2004 20:50:48 +0000 (20:50 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Sep 2004 20:50:48 +0000 (20:50 +0000)
        Reviewed by mjs

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):

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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/html/htmlparser.cpp

index 647c3e13a57455b189d2ee19b1c8695ce6fcd826..97a104b0037e04dbc9578911657cd7fc8f705279 100644 (file)
@@ -1,3 +1,12 @@
+2004-09-01  David Hyatt  <hyatt@apple.com>
+
+       Fix for 3769409, a regression from 10.3.4 to 10.3.5 involving <colgroup>s in malformed HTML.
+       
+        Reviewed by mjs
+
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::insertNode):
+
 2004-09-01  David Hyatt  <hyatt@apple.com>
 
        Fix for the <colgroup> crasher.  Make sure adding to an anonymous box just returns immediately. Also eliminate
index b457d7838551edc41c247fed1925b6c02d0ca7a5..73a0783393cc93dc0a532bd238f43ff69115c9d0 100644 (file)
@@ -537,9 +537,9 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat)
         case ID_TBODY:
         case ID_TFOOT:
         case ID_COLGROUP: {
-            if (current->id() == ID_THEAD || current->id() == ID_TBODY || current->id() == ID_TFOOT ||
-                current->id() == ID_COLGROUP) {
-                popOneBlock();
+            if (isTableRelatedTag(current->id())) {
+                while (current->id() != ID_TABLE && isTableRelatedTag(current->id()))
+                    popOneBlock();
                 return insertNode(n);
             }
         }