Fix for bug #4525. Changed Reflow() to take into account 'overflow:scroll' when

determining the desired width
This commit is contained in:
troy%netscape.com 1999-04-30 00:55:18 +00:00
Родитель 12389b25dd
Коммит 920ea0b453
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -333,7 +333,7 @@ nsScrollFrame::Reflow(nsIPresContext& aPresContext,
// See whether we have 'auto' scrollbars
// XXX What about the case where we're shrink-wrapping our height?
if (aReflowState.mStyleDisplay->mOverflow == NS_STYLE_OVERFLOW_SCROLL) {
// Always show scrollbars, so subtract for the space talen up by the
// Always show scrollbars, so subtract for the space taken up by the
// vertical scrollbar
if (!unconstrainedWidth) {
scrollAreaSize.width -= NSToCoordRound(sbWidth);
@ -508,7 +508,8 @@ nsScrollFrame::Reflow(nsIPresContext& aPresContext,
// Compute our desired size
aDesiredSize.width = scrollAreaSize.width;
aDesiredSize.width += border.left + border.right;
if (kidDesiredSize.height > scrollAreaSize.height) {
if ((kidDesiredSize.height > scrollAreaSize.height) ||
(aReflowState.mStyleDisplay->mOverflow == NS_STYLE_OVERFLOW_SCROLL)) {
aDesiredSize.width += NSToCoordRound(sbWidth);
}