Fix the .rows and .cells arrays on tables by merging with the KHTML trunk. TH was...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Feb 2004 22:07:42 +0000 (22:07 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Feb 2004 22:07:42 +0000 (22:07 +0000)
as a row instead of as a cell.

        Reviewed by kocienda

        * khtml/html/html_miscimpl.cpp:
        (HTMLCollectionImpl::calcLength):
        (HTMLCollectionImpl::getItem):
        (HTMLCollectionImpl::getNamedItem):

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

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

index f83ecc6..178a6c7 100644 (file)
@@ -1,5 +1,17 @@
 2004-02-11  David Hyatt  <hyatt@apple.com>
 
+       Fix the .rows and .cells arrays on tables by merging with the KHTML trunk.  TH was being included
+       as a row instead of as a cell.
+       
+        Reviewed by kocienda
+
+        * khtml/html/html_miscimpl.cpp:
+        (HTMLCollectionImpl::calcLength):
+        (HTMLCollectionImpl::getItem):
+        (HTMLCollectionImpl::getNamedItem):
+
+2004-02-11  David Hyatt  <hyatt@apple.com>
+
        Remove my bogus refs of the elementSheet.  Fixes 3554213 and 3555467.
        
         * khtml/html/html_baseimpl.cpp:
index f1b4e72..a94900f 100644 (file)
@@ -88,14 +88,14 @@ unsigned long HTMLCollectionImpl::calcLength(NodeImpl *current) const
                     deep = false;
                 break;
             case TR_CELLS:
-                if(e->id() == ID_TD)
+                if(e->id() == ID_TD || e->id() == ID_TH)
                     len++;
                 else if(e->id() == ID_TABLE)
                     deep = false;
                 break;
             case TABLE_ROWS:
             case TSECTION_ROWS:
-                if(e->id() == ID_TR || e->id() == ID_TH)
+                if(e->id() == ID_TR)
                     len++;
                 else if(e->id() == ID_TABLE)
                     deep = false;
@@ -173,14 +173,14 @@ NodeImpl *HTMLCollectionImpl::getItem(NodeImpl *current, int index, int &len) co
                     deep = false;
                 break;
             case TR_CELLS:
-                if(e->id() == ID_TD)
+                if(e->id() == ID_TD || e->id() == ID_TH)
                     len++;
                 else if(e->id() == ID_TABLE)
                     deep = false;
                 break;
             case TABLE_ROWS:
             case TSECTION_ROWS:
-                if(e->id() == ID_TR || e->id() == ID_TH)
+                if(e->id() == ID_TR)
                     len++;
                 else if(e->id() == ID_TABLE)
                     deep = false;
@@ -297,14 +297,14 @@ NodeImpl *HTMLCollectionImpl::getNamedItem( NodeImpl *current, int attr_id,
                     deep = false;
                 break;
             case TR_CELLS:
-                if(e->id() == ID_TD)
+                if(e->id() == ID_TD || e->id() == ID_TH)
                     check = true;
                 else if(e->id() == ID_TABLE)
                     deep = false;
                 break;
             case TABLE_ROWS:
             case TSECTION_ROWS:
-                if(e->id() == ID_TR || e->id() == ID_TH)
+                if(e->id() == ID_TR)
                     check = true;
                 else if(e->id() == ID_TABLE)
                     deep = false;