Bug 726258 - Don't suppress the scrollbar because of a too small size in the scollbar minor direction. r=bz

This commit is contained in:
Mats Palmgren 2012-02-22 17:23:47 +01:00
parent 3806f8dd6c
commit 4ac8d2dffb
4 changed files with 26 additions and 5 deletions

View File

@ -429,7 +429,7 @@ nsHTMLScrollFrame::TryLayout(ScrollReflowState* aState,
ComputeInsideBorderSize(aState, desiredInsideBorderSize);
nsSize scrollPortSize = nsSize(NS_MAX(0, aState->mInsideBorderSize.width - vScrollbarDesiredWidth),
NS_MAX(0, aState->mInsideBorderSize.height - hScrollbarDesiredHeight));
if (!aForce) {
nsRect scrolledRect =
mInner.GetScrolledRectInternal(aState->mContentsOverflowAreas.ScrollableOverflow(),
@ -442,8 +442,7 @@ nsHTMLScrollFrame::TryLayout(ScrollReflowState* aState,
aState->mStyles.mHorizontal == NS_STYLE_OVERFLOW_SCROLL ||
scrolledRect.XMost() >= scrollPortSize.width + oneDevPixel ||
scrolledRect.x <= -oneDevPixel;
if (aState->mInsideBorderSize.height < hScrollbarMinSize.height ||
scrollPortSize.width < hScrollbarMinSize.width)
if (scrollPortSize.width < hScrollbarMinSize.width)
wantHScrollbar = false;
if (wantHScrollbar != aAssumeHScroll)
return false;
@ -455,8 +454,7 @@ nsHTMLScrollFrame::TryLayout(ScrollReflowState* aState,
aState->mStyles.mVertical == NS_STYLE_OVERFLOW_SCROLL ||
scrolledRect.YMost() >= scrollPortSize.height + oneDevPixel ||
scrolledRect.y <= -oneDevPixel;
if (aState->mInsideBorderSize.width < vScrollbarMinSize.width ||
scrollPortSize.height < vScrollbarMinSize.height)
if (scrollPortSize.height < vScrollbarMinSize.height)
wantVScrollbar = false;
if (wantVScrollbar != aAssumeVScroll)
return false;

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html><head>
<title>Testcase for bug 726258</title>
<style>
html,body{ overflow:hidden; margin:0; padding:0; }
p { overflow: auto; white-space: nowrap; font-size: 13px; padding-top:100px; margin-top:-100px; }
</style>
</head>
<p>
1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890
</p>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html><head>
<title>Testcase for bug 726258</title>
<style>
html,body{ overflow:hidden; margin:0; padding:0; }
p { overflow: auto; white-space: nowrap; font-size: 13px; margin-top:0; }
</style>
</head>
<p>
1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890
</p>

View File

@ -12,3 +12,4 @@ HTTP == transformed-1.html transformed-1.html?ref
HTTP == transformed-1.html?up transformed-1.html?ref
== uncovering-1.html uncovering-1-ref.html
== uncovering-2.html uncovering-2-ref.html
== less-than-scrollbar-height.html less-than-scrollbar-height-ref.html