Fix the .rows and .cells arrays on tables by merging with the KHTML trunk. TH was...
[WebKit-https.git] / WebCore / khtml / html / html_miscimpl.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;