positioned tables
David Hyatt
hyatt at apple.com
Mon Sep 29 16:37:38 CEST 2003
Positioned tables let calcHeight change the height, possibly decreasing
it, which makes the bottoms of the tables not paint.
This patch fixes the problem, but in reality, tables need to do
calcHeight much earlier (with all the isTable hacks removed), and just
use that when they lay out. This is just a temporary solution.
Index: khtml/rendering/render_table.cpp
===================================================================
RCS file:
/local/home/cvs/Labyrinth/WebCore/khtml/rendering/render_table.cpp,v
retrieving revision 1.72
diff -u -p -r1.72 khtml/rendering/render_table.cpp
--- khtml/rendering/render_table.cpp 2003/09/26 00:57:15 1.72
+++ khtml/rendering/render_table.cpp 2003/09/29 22:14:25
@@ -349,8 +349,17 @@ void RenderTable::layout()
//kdDebug(0) << "table height: " << m_height << endl;
+ // FIXME: calcHeight should not affect height for tables. In the
positioned case,
+ // e.g., <table style="position:absolute">, it potentially does.
We're going to have to come up with a better
+ // solution eventually, but for now a good stopgap solution is to
simply prevent this function
+ // from altering the height.
+ //
+ // When the height is implicitly determined via, e.g., explicit
top and bottom values in CSS, we're still
+ // going to be completely wrong.
+ int oldHeight = m_height;
calcHeight();
-
+ m_height = oldHeight;
+
//kdDebug(0) << "table height: " << m_height << endl;
// table can be containing block of positioned elements.
More information about the Khtml-devel
mailing list