From c523884f92033a2c9283bebc8d61b55f66c5467b Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Fri, 3 Aug 2012 12:35:14 +0200 Subject: [PATCH] Bug 770453 - [b2g] Semi-transparent scroll bars should not occupy content-flow space. r=roc --- layout/generic/nsGfxScrollFrame.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 482869d48a6..c909c5a40ac 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -478,8 +478,9 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState, computedMaxHeight = NS_UNCONSTRAINEDSIZE; } if (aAssumeHScroll) { - nsSize hScrollbarPrefSize = - mInner.mHScrollbarBox->GetPrefSize(const_cast(aState->mBoxState)); + nsSize hScrollbarPrefSize; + GetScrollbarMetrics(aState->mBoxState, mInner.mHScrollbarBox, + nsnull, &hScrollbarPrefSize, false); if (computedHeight != NS_UNCONSTRAINEDSIZE) computedHeight = NS_MAX(0, computedHeight - hScrollbarPrefSize.height); computedMinHeight = NS_MAX(0, computedMinHeight - hScrollbarPrefSize.height); @@ -488,8 +489,9 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState, } if (aAssumeVScroll) { - nsSize vScrollbarPrefSize = - mInner.mVScrollbarBox->GetPrefSize(const_cast(aState->mBoxState)); + nsSize vScrollbarPrefSize; + GetScrollbarMetrics(aState->mBoxState, mInner.mVScrollbarBox, + &vScrollbarPrefSize, nsnull, true); availWidth = NS_MAX(0, availWidth - vScrollbarPrefSize.width); }