[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:01:28 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c6ba797924d9b5dbea7d9c00edcab4e94cf0326f
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 15 21:02:20 2002 +0000

    	Make <form> inside <table> stay inside the <table> but demote
    	itself to a leaf.  Then the children of the <form> are treated
    	as though they occurred underneath the <table> itself.  Everything
    	KHTML does with this is completely wrong but this band-aid should
    	hopefully suffice until 1.0.
    
    	Also allowing <input type="hidden"> to be constructed and attached
    	under <table>s.  Since they have no render objects this is safe.
    	Again, total hack, since CSS2 anonymous table construction should be
    	implemented and that would have fixed all this.
    
    	This collection of hacks makes travelocity render correctly on the
    	PLT.
    
            * khtml/css/html4.css:
            * khtml/html/dtd.cpp:
            (DOM::checkChild):
            * khtml/html/html_tableimpl.cpp:
            (HTMLTableElementImpl::addChild):
            * khtml/html/htmlparser.cpp:
            (KHTMLParser::parseToken):
            (KHTMLParser::insertNode):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2699 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index d982719..7054504 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,30 @@
 2002-11-15  David Hyatt  <hyatt at apple.com>
 
+	Make <form> inside <table> stay inside the <table> but demote
+	itself to a leaf.  Then the children of the <form> are treated
+	as though they occurred underneath the <table> itself.  Everything
+	KHTML does with this is completely wrong but this band-aid should
+	hopefully suffice until 1.0.
+
+	Also allowing <input type="hidden"> to be constructed and attached
+	under <table>s.  Since they have no render objects this is safe.
+	Again, total hack, since CSS2 anonymous table construction should be
+	implemented and that would have fixed all this.
+
+	This collection of hacks makes travelocity render correctly on the
+	PLT.
+	
+        * khtml/css/html4.css:
+        * khtml/html/dtd.cpp:
+        (DOM::checkChild):
+        * khtml/html/html_tableimpl.cpp:
+        (HTMLTableElementImpl::addChild):
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::parseToken):
+        (KHTMLParser::insertNode):
+
+2002-11-15  David Hyatt  <hyatt at apple.com>
+
 	Fix Hixie's blog.  Background images can be transparent, so
 	if the root's color isn't valid always do a fixup even if you
 	have a valid background image.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index d982719..7054504 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,30 @@
 2002-11-15  David Hyatt  <hyatt at apple.com>
 
+	Make <form> inside <table> stay inside the <table> but demote
+	itself to a leaf.  Then the children of the <form> are treated
+	as though they occurred underneath the <table> itself.  Everything
+	KHTML does with this is completely wrong but this band-aid should
+	hopefully suffice until 1.0.
+
+	Also allowing <input type="hidden"> to be constructed and attached
+	under <table>s.  Since they have no render objects this is safe.
+	Again, total hack, since CSS2 anonymous table construction should be
+	implemented and that would have fixed all this.
+
+	This collection of hacks makes travelocity render correctly on the
+	PLT.
+	
+        * khtml/css/html4.css:
+        * khtml/html/dtd.cpp:
+        (DOM::checkChild):
+        * khtml/html/html_tableimpl.cpp:
+        (HTMLTableElementImpl::addChild):
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::parseToken):
+        (KHTMLParser::insertNode):
+
+2002-11-15  David Hyatt  <hyatt at apple.com>
+
 	Fix Hixie's blog.  Background images can be transparent, so
 	if the root's color isn't valid always do a fixup even if you
 	have a valid background image.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index d982719..7054504 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,30 @@
 2002-11-15  David Hyatt  <hyatt at apple.com>
 
+	Make <form> inside <table> stay inside the <table> but demote
+	itself to a leaf.  Then the children of the <form> are treated
+	as though they occurred underneath the <table> itself.  Everything
+	KHTML does with this is completely wrong but this band-aid should
+	hopefully suffice until 1.0.
+
+	Also allowing <input type="hidden"> to be constructed and attached
+	under <table>s.  Since they have no render objects this is safe.
+	Again, total hack, since CSS2 anonymous table construction should be
+	implemented and that would have fixed all this.
+
+	This collection of hacks makes travelocity render correctly on the
+	PLT.
+	
+        * khtml/css/html4.css:
+        * khtml/html/dtd.cpp:
+        (DOM::checkChild):
+        * khtml/html/html_tableimpl.cpp:
+        (HTMLTableElementImpl::addChild):
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::parseToken):
+        (KHTMLParser::insertNode):
+
+2002-11-15  David Hyatt  <hyatt at apple.com>
+
 	Fix Hixie's blog.  Background images can be transparent, so
 	if the root's color isn't valid always do a fixup even if you
 	have a valid background image.
diff --git a/WebCore/khtml/html/dtd.cpp b/WebCore/khtml/html/dtd.cpp
index 020f854..6478870 100644
--- a/WebCore/khtml/html/dtd.cpp
+++ b/WebCore/khtml/html/dtd.cpp
@@ -734,6 +734,7 @@ bool DOM::checkChild(ushort tagID, ushort childID)
         case ID_TFOOT:
         case ID_TBODY:
         case ID_TEXT:
+        case ID_FORM:
         case ID_COMMENT:
             return true;
         default:
@@ -743,7 +744,7 @@ bool DOM::checkChild(ushort tagID, ushort childID)
     case ID_TFOOT:
     case ID_TBODY:
         // THEAD: TR +
-        if(childID == ID_TR || childID == ID_TEXT || childID == ID_COMMENT) return true;
+        if(childID == ID_FORM || childID == ID_TR || childID == ID_TEXT || childID == ID_COMMENT) return true;
         return false;
     case ID_COLGROUP:
         // COLGROUP: COL *
diff --git a/WebCore/khtml/html/html_tableimpl.cpp b/WebCore/khtml/html/html_tableimpl.cpp
index 87792a4..a6df87a 100644
--- a/WebCore/khtml/html/html_tableimpl.cpp
+++ b/WebCore/khtml/html/html_tableimpl.cpp
@@ -304,6 +304,12 @@ NodeImpl *HTMLTableElementImpl::addChild(NodeImpl *child)
         //if(incremental && !columnPos[totalCols]);// calcColWidth();
         return setTBody(static_cast<HTMLTableSectionElementImpl *>(child));
         break;
+    case ID_FORM:
+        // First add the child.
+        HTMLElementImpl::addChild(child);
+        // Now simply return ourselves as the newnode.  This has the effect of
+        // demoting the form to a leaf and moving it safely out of the way.
+        return this;
     }
     return 0;
 }
diff --git a/WebCore/khtml/html/htmlparser.cpp b/WebCore/khtml/html/htmlparser.cpp
index 3048915..a886705 100644
--- a/WebCore/khtml/html/htmlparser.cpp
+++ b/WebCore/khtml/html/htmlparser.cpp
@@ -258,7 +258,8 @@ void KHTMLParser::parseToken(Token *t)
         popOneBlock();
     }
 
-    if ( !insertNode(n, t->flat) ) {
+    if (!insertNode(n, t->flat)) 
+    {
         // we couldn't insert the node...
         
         if(n->isElementNode())
@@ -317,7 +318,10 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat)
         if(tagPriority[id] != 0 && !flat)
         {
             pushBlock(id, tagPriority[id]);
-            current = newNode;
+            if (newNode == current)
+                popBlock(id);
+            else
+                current = newNode;
 #if SPEED_DEBUG < 2
             if(!n->attached() && HTMLWidget ) {
                 // ### get rid of init. it has no reason for existance.
@@ -467,9 +471,18 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat)
             ElementImpl *e = static_cast<ElementImpl *>(n);
             DOMString type = e->getAttribute(ATTR_TYPE);
 
-            if ( strcasecmp( type, "hidden" ) != 0 )
-                break;
-            // Fall through!
+            if ( strcasecmp( type, "hidden" ) == 0 && form) {
+                form->addChild(n);
+#if SPEED_DEBUG < 2
+                if(!n->attached() && HTMLWidget) {
+                    n->init();
+                    if (!n->attached())
+                        n->attach();
+                }
+#endif
+                return true;
+            }
+            break;
         }
         case ID_TEXT:
             // ignore text inside the following elements.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list