[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml/html
From:       Maks Orlovich <maksim () kde ! org>
Date:       2005-08-26 0:58:31
Message-ID: 1125017911.591316.3475.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 453378 by orlovich:

Fix rowIndex to make sure the head goes first. Noticed from reading the code.
Testcase upcoming.


 M  +13 -1     html_tableimpl.cpp  


--- branches/KDE/3.5/kdelibs/khtml/html/html_tableimpl.cpp #453377:453378
@@ -707,10 +707,22 @@
     if ( !table || table->id() != ID_TABLE )
 	return -1;
 
+    HTMLTableSectionElementImpl *head = static_cast<HTMLTableElementImpl \
                *>(table)->tHead();
     HTMLTableSectionElementImpl *foot = static_cast<HTMLTableElementImpl \
*>(table)->tFoot(); +
+    if ( head ) {
+        const NodeImpl *row = head->firstChild();
+        while ( row ) {
+            if ( row == this )
+                return rIndex;
+            rIndex++;
+            row = row->nextSibling();
+        }
+    }
+
     NodeImpl *node = table->firstChild();
     while ( node ) {
-        if ( node != foot && (node->id() == ID_THEAD || node->id() == ID_TFOOT || \
node->id() == ID_TBODY) ) { +        if ( node != foot && node != head && (node->id() \
                == ID_THEAD || node->id() == ID_TFOOT || node->id() == ID_TBODY) ) {
 	    HTMLTableSectionElementImpl* section = static_cast<HTMLTableSectionElementImpl \
*>(node);  const NodeImpl *row = section->firstChild();
 	    while ( row ) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic