Version: 3.3 (using KDE 3.3.0, compiled sources) Compiler: gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6) OS: Linux (i686) release 2.6.7-gentoo-r14 See attached testcase. The problem is also visible at: http://www.kde.nl/tips/#konqueror8
Created an attachment (id=7467) [details] testcase
I updated http://www.kde.nl/tips/#konqueror8 (whole kde.nl site) to use overflow: auto, but the problem still is there when the scrollbars appear.
I now see that also the bottom line of multiline elements that have css scrollbars is covered by those scrollbars.
I can confirm this, it's also visible here: http://annevankesteren.nl/archives/2003/08/structural-pseudo-classes The last pre element has most of the bottom line of text cut off. Looks like the the box doesn't reflow when the scrollbar gets added, and the scrollbar gets placed on top of the box contents.
CVS commit by ggarand: for elements with some kind of scrolling overflow and a variable height, 'Go Ahead'(tm) and include the scrollbar height in calculations to avoid masking content BUG: 89136 M +11 -0 ChangeLog 1.339 M +1 -3 rendering/bidi.cpp 1.201 M +8 -3 rendering/render_block.cpp 1.55 M +6 -0 rendering/render_box.cpp 1.248 --- kdelibs/khtml/ChangeLog #1.338:1.339 @@ -1,2 +1,13 @@ +2004-11-22 Germain Garand <germain@ebooksfrance.org> + + * rendering/bidi.cpp (layoutInlineChildren): for elements with some kind of + scrolling overflow and a variable height, include the scrollbar height in + calculations to avoid masking content (#89136). + + * rendering/render_block.cpp (layoutBlock/layoutBlockChildren): ditto. + + * rendering/render_box.cpp (contentWidth/contentHeight): subtract scrollbars + height/width when applicable. + 2004-11-22 Allan Sandfeld Jensen <kde@carewolf.com> --- kdelibs/khtml/rendering/bidi.cpp #1.200:1.201 @@ -1273,8 +1273,6 @@ void RenderBlock::layoutInlineChildren(b m_height = borderTop() + paddingTop(); int toAdd = borderBottom() + paddingBottom(); -#ifdef APPLE_CHANGES - if (includeScrollbarSize()) + if (m_layer && style()->scrollsOverflow() && style()->height().isVariable()) toAdd += m_layer->horizontalScrollbarHeight(); -#endif // Clear out our line boxes. --- kdelibs/khtml/rendering/render_block.cpp #1.54:1.55 @@ -525,6 +524,9 @@ void RenderBlock::layoutBlock(bool relay // Expand our intrinsic height to encompass floats. + int toAdd = borderBottom() + paddingBottom(); + if (m_layer && style()->scrollsOverflow() && style()->height().isVariable()) + toAdd += m_layer->horizontalScrollbarHeight(); if ( hasOverhangingFloats() && (isInlineBlockOrInlineTable() || isFloatingOrPositioned() || style()->hidesOverflow()) ) - m_height = floatBottom() + borderBottom() + paddingBottom(); + m_height = floatBottom() + toAdd; int oldHeight = m_height; @@ -612,4 +614,7 @@ void RenderBlock::layoutBlockChildren( b int toAdd = borderBottom() + paddingBottom(); + if (m_layer && style()->scrollsOverflow() && style()->height().isVariable()) + toAdd += m_layer->horizontalScrollbarHeight(); + m_height = borderTop() + paddingTop(); --- kdelibs/khtml/rendering/render_box.cpp #1.247:1.248 @@ -217,4 +217,7 @@ short RenderBox::contentWidth() const w -= paddingLeft() + paddingRight(); + if (m_layer && style()->scrollsOverflow()) + w -= m_layer->verticalScrollbarWidth(); + //kdDebug( 6040 ) << "RenderBox::contentWidth(2) = " << w << endl; return w; @@ -226,4 +229,7 @@ int RenderBox::contentHeight() const h -= paddingTop() + paddingBottom(); + if (m_layer && style()->scrollsOverflow()) + h -= m_layer->horizontalScrollbarHeight(); + return h; }
You need to log in before you can comment on or make changes to this bug.