Version: 3.4.0 (using KDE 3.4.0, Debian Package 4:3.4.0-0pre2 (3.1)) Compiler: gcc version 3.3.5 (Debian 1:3.3.5-8) OS: Linux (i686) release 2.6.10-1-k7 Hello, Whenever you put a table at the bottom of a page without specifying the height directly in the table, it is rendered from that position down. I'll attach a small test case for this situation. Internet Explorer (tested with version 6) and Firefox (tested with version 1.0.1), render the boxes correctly, Konqueror (version 3.4.0) does not render the first box properly. Tom
Created attachment 11477 [details] test
Created attachment 14911 [details] patch calculate table height a bit differently for positioned tables, so as to get accurate bottom positioning, also adds table { box-sizing: border-box } to default sheet.
SVN commit 514954 by ggarand: Use the calculated height for positioned tables, so as to always compute an accurate position. Add box-sizing: border-box to table's default style BUG: 107521 M +1 -0 css/html4.css M +7 -3 rendering/render_box.cpp M +3 -1 rendering/render_table.cpp --- branches/KDE/3.5/kdelibs/khtml/css/html4.css #514953:514954 @@ -173,6 +173,7 @@ text-align: -khtml-auto; border-spacing: 2px; -khtml-flow-mode: -khtml-around-floats; + box-sizing: border-box; } TABLE[align="center"] { --- branches/KDE/3.5/kdelibs/khtml/rendering/render_box.cpp #514953:514954 @@ -1033,7 +1033,7 @@ } if (result != -1) { result = height.width(result); - if (cb->isTableCell() && !isTable() && style()->boxSizing() != BORDER_BOX) { + if (cb->isTableCell() && style()->boxSizing() != BORDER_BOX) { result -= (borderTop() + paddingTop() + borderBottom() + paddingBottom()); result = kMax(0, result); } @@ -1467,8 +1467,12 @@ else if (!height.isVariable()) { h = height.width(ch); - if (ourHeight - pab > h) - ourHeight = h + pab; + if (ourHeight - pab > h) { + if (!isTable()) + ourHeight = h + pab; + else + h = ourHeight - pab; + } } else if (isReplaced()) h = intrinsicHeight(); --- branches/KDE/3.5/kdelibs/khtml/rendering/render_table.cpp #514953:514954 @@ -303,6 +303,8 @@ m_height += bpTop; int oldHeight = m_height; + if (isPositioned()) + m_height += calculatedHeight + bpBottom; calcHeight(); int newHeight = m_height; m_height = oldHeight; @@ -310,7 +312,7 @@ Length h = style()->height(); int th = -(bpTop + bpBottom); // Tables size as though CSS height includes border/padding. if (isPositioned()) - th = newHeight; // FIXME: Leave this alone for now but investigate later. + th += newHeight; else if (h.isFixed()) th += h.value(); else if (h.isPercent())
Great! Thanks! Looking forward to the next release.