[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 07:19:00 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 6d17fb2b7ce884a05cc4c72bcefcbf0d8d5456aa
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 9 18:52:21 2003 +0000

    	Finish the KONQBLOCK removal and make sure that table rows and
    	cells encountered inside stray content cause the stray content to
    	close so that the rows and cells can be part of the table.
    
    	This fixes the versiontracker bug.  #3142319.
    
            Reviewed by darin.
    
            * khtml/html/htmlparser.cpp:
            (KHTMLParser::reset):
            (isTableRelatedTag):
            (KHTMLParser::insertNode):
            (KHTMLParser::popOneBlock):
            * khtml/html/htmlparser.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3282 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 5f0c803..53418f3 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,22 @@
 2003-01-08  David Hyatt  <hyatt at apple.com>
 
+	Finish the KONQBLOCK removal and make sure that table rows and
+	cells encountered inside stray content cause the stray content to
+	close so that the rows and cells can be part of the table.
+
+	This fixes the versiontracker bug.  #3142319.
+	
+        Reviewed by darin.
+
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::reset):
+        (isTableRelatedTag):
+        (KHTMLParser::insertNode):
+        (KHTMLParser::popOneBlock):
+        * khtml/html/htmlparser.h:
+
+2003-01-08  David Hyatt  <hyatt at apple.com>
+
 	Revert the redundancy that dirk noticed.
 
 	Fixing issue #3 on diveintomark.org's list, which actually involved
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5f0c803..53418f3 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,22 @@
 2003-01-08  David Hyatt  <hyatt at apple.com>
 
+	Finish the KONQBLOCK removal and make sure that table rows and
+	cells encountered inside stray content cause the stray content to
+	close so that the rows and cells can be part of the table.
+
+	This fixes the versiontracker bug.  #3142319.
+	
+        Reviewed by darin.
+
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::reset):
+        (isTableRelatedTag):
+        (KHTMLParser::insertNode):
+        (KHTMLParser::popOneBlock):
+        * khtml/html/htmlparser.h:
+
+2003-01-08  David Hyatt  <hyatt at apple.com>
+
 	Revert the redundancy that dirk noticed.
 
 	Fixing issue #3 on diveintomark.org's list, which actually involved
diff --git a/WebCore/khtml/html/htmlparser.cpp b/WebCore/khtml/html/htmlparser.cpp
index 9c137d2..a025dae 100644
--- a/WebCore/khtml/html/htmlparser.cpp
+++ b/WebCore/khtml/html/htmlparser.cpp
@@ -76,12 +76,14 @@ public:
         :
         id(_id),
         level(_level),
+        strayTableContent(false),
         node(_node),
         next(_next)
         { }
 
     int       id;
     int       level;
+    bool      strayTableContent;
     NodeImpl *node;
     HTMLStackElem *next;
 };
@@ -175,6 +177,7 @@ void KHTMLParser::reset()
     haveFrameSet = false;
     haveContent = false;
     inSelect = false;
+    inStrayTableContent = false;
     
     form = 0;
     map = 0;
@@ -300,6 +303,12 @@ void KHTMLParser::parseToken(Token *t)
     }
 }
 
+static bool isTableRelatedTag(int id)
+{
+    return (id == ID_TR || id == ID_TD || id == ID_TABLE || id == ID_TBODY || id == ID_TFOOT || id == ID_THEAD ||
+            id == ID_TH);
+}
+
 bool KHTMLParser::insertNode(NodeImpl *n, bool flat)
 {
     int id = n->id();
@@ -365,6 +374,17 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat)
         // switch according to the element to insert
         switch(id)
         {
+        case ID_TR:
+        case ID_TH:
+        case ID_TD:
+            if (inStrayTableContent) {
+                // pop out to the nearest enclosing table-related tag.
+                while (!isTableRelatedTag(current->id()))
+                    popOneBlock();
+                inStrayTableContent = false;
+                return insertNode(n);
+            }
+            break;
         case ID_COMMENT:
             break;
         case ID_HEAD:
@@ -638,6 +658,8 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat)
                     {
                         pushBlock(id, tagPriority[id]);
                         current = n;
+                        inStrayTableContent = true;
+                        blockStack->strayTableContent = true;
                     }
                     return true;
                 }
@@ -1235,6 +1257,9 @@ void KHTMLParser::popOneBlock()
     blockStack = Elem->next;
     current = Elem->node;
 
+    if (Elem->strayTableContent)
+        inStrayTableContent = false;
+        
     delete Elem;
 }
 
diff --git a/WebCore/khtml/html/htmlparser.h b/WebCore/khtml/html/htmlparser.h
index cea46f1..82f093b 100644
--- a/WebCore/khtml/html/htmlparser.h
+++ b/WebCore/khtml/html/htmlparser.h
@@ -175,7 +175,8 @@ protected:
     int discard_until;
 
     bool headLoaded;
-
+    bool inStrayTableContent;
+    
 #if SPEED_DEBUG > 0
     QTime qt;
 #endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list