[PATCH] tables with underspecified percents and cellspacing

Lars Knoll lars at trolltech.com
Wed Oct 23 11:52:46 BST 2002


And the fix is to change the patch in render_table.h to:

RCS file: /home/kde/kdelibs/khtml/rendering/render_table.h,v
retrieving revision 1.77
diff -u -b -p -r1.77 render_table.h
--- render_table.h      2002/09/24 16:05:34     1.77
+++ render_table.h      2002/10/23 10:56:08
@@ -149,7 +149,7 @@ public:
     }

     int bordersAndSpacing() const {
-       return borderLeft() + borderRight() + cellSpacing();
+       return borderLeft() + borderRight() + (numEffCols()+1) * 
cellSpacing();
     }

     RenderTableCol *colElement( int col );


Cheers,
Lars

> Something is still wrong with your patch. Testcase:
>
> <div style="border: 1px solid red;">
>  <table cellspacing=5>
>       <tr>
>         <td nowrap width="1%" valign="top" align="center"
> bgcolor="b6cbeb">#</td>
>
>         <td nowrap bgcolor="b6cbeb">#</td>
>         <td nowrap width="7%" bgcolor="b6cbeb">#</td>
>    <tr>
>          <td colspan=2 bgcolor=b6cbeb>#</td>
>         <td nowrap width="7%" bgcolor="b6cbeb">#</td>
>     </table>
> </div>






More information about the kfm-devel mailing list