Version: 3.5.4 (using KDE 3.5.4, Arch Linux) Compiler: Target: i686-pc-linux-gnu OS: Linux (i686) release 2.6.17-ARCH When resizing the browser window, tables are resized. However, their captions remain at the original size when they should resize along with the table. It appears that during the initial rendering of the page, the caption tag is rendered at the correct size. Firefox and Internet Explorer do not exhibit this behaviour. The following HTML will cause Konqueror to exhibit this problem: <table style="width: 100%; border: 1px solid black;"> <caption style="background-color: gray;">Caption here</caption> <tr> <td>moo</td> </tr> </table>
Created attachment 17506 [details] test case attached
SVN commit 577316 by ggarand: mark table caption for layout if needed. BUG: 133001 M +4 -1 render_table.cpp --- branches/KDE/3.5/kdelibs/khtml/rendering/render_table.cpp #577315:577316 @@ -283,9 +283,12 @@ m_height = 0; initMaxMarginValues(); - //int oldWidth = m_width; + int oldWidth = m_width; calcWidth(); m_overflowWidth = m_width; + + if (tCaption && (oldWidth != m_width || tCaption->style()->height().isPercent())) + tCaption->setChildNeedsLayout(true); // the optimization below doesn't work since the internal table // layout could have changed. we need to add a flag to the table