[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:15:58 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f41e03d104fc586af365a757c395ad1600e2ffc3
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 3 20:58:20 2003 +0000

    	Fix for 3475767, hang at saabnet.com.  Fix h1-h6 to be more tolerant regarding allowed child elements, to avoid
    	deeply nested pages.
    
            Reviewed by darin
    
            * khtml/html/dtd.cpp:
            (DOM::checkChild):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5677 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7ef5ed9..d11c98f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2003-12-03  David Hyatt  <hyatt at apple.com>
+
+	Fix for 3475767, hang at saabnet.com.  Fix h1-h6 to be more tolerant regarding allowed child elements, to avoid
+	deeply nested pages.
+	
+        Reviewed by darin
+
+        * khtml/html/dtd.cpp:
+        (DOM::checkChild):
+
 2003-12-03  John Sullivan  <sullivan at apple.com>
 
         - fixed these two design issues after Dave and I talked to HI:
diff --git a/WebCore/khtml/html/dtd.cpp b/WebCore/khtml/html/dtd.cpp
index bce4f76..508172a 100644
--- a/WebCore/khtml/html/dtd.cpp
+++ b/WebCore/khtml/html/dtd.cpp
@@ -588,15 +588,15 @@ bool DOM::checkChild(ushort tagID, ushort childID)
     case ID_WBR:
         return check_array(childID, tag_list_1);
     case ID_P:
+        // P: ( _0 | TABLE ) *
+        return check_array(childID, tag_list_0) || childID == ID_TABLE;
     case ID_H1:
     case ID_H2:
     case ID_H3:
     case ID_H4:
     case ID_H5:
     case ID_H6:
-        if (childID == ID_TABLE || (tagID != ID_P && (childID == ID_FORM || childID == ID_CENTER || childID == ID_HR)))
-            return true;
-        return check_array(childID, tag_list_0);
+        return check_array(childID, tag_list_1) && (childID < ID_H1 || childID > ID_H6);
     case ID_BASEFONT:
     case ID_BR:
     case ID_AREA:
@@ -615,12 +615,10 @@ bool DOM::checkChild(ushort tagID, ushort childID)
         return false;
     case ID_BODY:
         // BODY: _1 * + _2
-        if( check_array(childID, tag_list_1) ) return true;
-        return check_array(childID, tag_list_2);
+        return check_array(childID, tag_list_1) || check_array(childID, tag_list_2);
     case ID_ADDRESS:
         // ADDRESS: ( _0 | P ) *
-        if( check_array(childID, tag_list_0) ) return true;
-        return (childID == ID_P);
+        return check_array(childID, tag_list_0) || childID == ID_P;
     case ID_LI:
     case ID_DT:
     case ID_DIV:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list