Index: khtml/rendering/render_table.cpp =================================================================== RCS file: /local/home/cvs/Labyrinth/WebCore/khtml/rendering/render_table.cpp,v retrieving revision 1.124 diff -u -p -r1.124 khtml/rendering/render_table.cpp --- khtml/rendering/render_table.cpp 2005/04/15 22:00:16 1.124 +++ khtml/rendering/render_table.cpp 2005/04/18 11:05:52 @@ -1123,13 +1123,14 @@ void RenderTableSection::calcRowHeight() || va == SUPER || va == SUB) { int b=cell->baselinePosition(); - - if (b>baseline) - baseline=b; - - int td = rowPos[ indx ] + ch - b; - if (td>bdesc) - bdesc = td; + if (b > cell->borderTop() + cell->paddingTop()) { + if (b>baseline) + baseline=b; + + int td = rowPos[ indx ] + ch - b; + if (td>bdesc) + bdesc = td; + } } } @@ -1665,14 +1666,18 @@ bool RenderTableCell::absolutePosition(i short RenderTableCell::baselinePosition( bool ) const { - RenderObject *o = firstChild(); + RenderObject* o = firstChild(); int offset = paddingTop() + borderTop(); - if ( !o ) return offset; - while ( o->firstChild() ) { - if ( !o->isInline() ) + if (!o) return offset + contentHeight(); + while (o->firstChild()) { + if (!o->isInline()) offset += o->paddingTop() + o->borderTop(); o = o->firstChild(); } + + if (!o->isInline()) + return paddingTop() + borderTop() + contentHeight(); + offset += o->baselinePosition( true ); return offset; } Index: khtml/rendering/render_block.h =================================================================== RCS file: /local/home/cvs/Labyrinth/WebCore/khtml/rendering/render_block.h,v retrieving revision 1.64 diff -u -p -r1.64 khtml/rendering/render_block.h --- khtml/rendering/render_block.h 2005/02/14 18:19:18 1.64 +++ khtml/rendering/render_block.h 2005/04/18 11:05:53 @@ -197,8 +197,8 @@ public: virtual int getBaselineOfFirstLineBox() const; - RootInlineBox* firstRootBox() { return static_cast(m_firstLineBox); } - RootInlineBox* lastRootBox() { return static_cast(m_lastLineBox); } + RootInlineBox* firstRootBox() const { return static_cast(m_firstLineBox); } + RootInlineBox* lastRootBox() const { return static_cast(m_lastLineBox); } // Obtains the nearest enclosing block (including this block) that contributes a first-line style to our inline // children. Index: khtml/rendering/render_block.cpp =================================================================== RCS file: /local/home/cvs/Labyrinth/WebCore/khtml/rendering/render_block.cpp,v retrieving revision 1.180 diff -u -p -r1.180 khtml/rendering/render_block.cpp --- khtml/rendering/render_block.cpp 2005/04/15 10:53:59 1.180 +++ khtml/rendering/render_block.cpp 2005/04/18 11:05:56 @@ -534,7 +534,7 @@ void RenderBlock::layoutBlock(bool relay m_height = m_overflowHeight + borderBottom() + paddingBottom(); } - if (hasOverhangingFloats() && (isFloating() || isTableCell())) { + if (hasOverhangingFloats() && ((isFloating() && style()->height().isVariable()) || isTableCell())) { m_height = floatBottom(); m_height += borderBottom() + paddingBottom(); }