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

List:       konq-bugs
Subject:    [Bug 93791] [test case] displays a table that appears to have empty
From:       Germain Garand <germain () ebooksfrance ! com>
Date:       2007-10-06 23:23:44
Message-ID: 20071006232344.2343.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=93791         
germain ebooksfrance com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From germain ebooksfrance com  2007-10-07 01:23 -------
SVN commit 722231 by ggarand:

RenderTable::columns array can sometimes be out of sync after a table section removal.

fix transposed from a patch by Alexey Proskuryakov <ap nypop com> 


 M  +29 -1     render_table.cpp  
 M  +2 -0      render_table.h  


--- trunk/KDE/kdelibs/khtml/rendering/render_table.cpp #722230:722231
 @ -738,6 +738,20  @
        }
        child = child->nextSibling();
     }
+
+    int maxCols = 0;
+    for (RenderObject *child = firstChild(); child; child = child->nextSibling()) {
+        if (child->isTableSection()) {
+            RenderTableSection *section = static_cast<RenderTableSection *>(child);
+            int sectionCols = section->numColumns();
+            if (sectionCols > maxCols)
+                maxCols = sectionCols;
+        }
+    }
+    
+    columns.resize(maxCols);
+    columnPos.resize(maxCols+1);
+    
     needSectionRecalc = false;
     setNeedsLayout(true);
 }
 @ -1774,6 +1788,20  @
     }
 }
 
+int RenderTableSection::numColumns() const
+{
+    int result = 0;
+    
+    for (int r = 0; r < numRows(); ++r) {
+        for (int c = result; c < table()->numEffCols(); ++c) {
+            if (cellAt(r, c))
+                result = c;
+        }
+    }
+    
+    return result + 1;
+}
+ 
 void RenderTableSection::recalcCells()
 {
     cCol = 0;
 @ -2902,7 +2930,7  @
 
 void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& pI, int _tx, int _ty, RenderObject* bgObj)
 {
-    if (!bgObj)
+    if (!bgObj || style()->visibility() != VISIBLE)
         return;
 
     RenderTable* tableElt = table();
--- trunk/KDE/kdelibs/khtml/rendering/render_table.h #722230:722231
 @ -271,6 +271,8  @
     QVector<RowStruct> grid;
     QVector<int> rowPos;
 
+    int numColumns() const;
+
     signed short cRow;
     ushort cCol;
     bool needCellRecalc;
_______________________________________________
Konq-bugs mailing list
Konq-bugs@mail.kde.org
https://mail.kde.org/mailman/listinfo/konq-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

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