Bug 770453 - [b2g] Semi-transparent scroll bars should not occupy content-flow space. r=roc

This commit is contained in:
Markus Stange 2012-08-03 12:35:14 +02:00
parent f55d9d2db2
commit c523884f92

View File

@ -478,8 +478,9 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
computedMaxHeight = NS_UNCONSTRAINEDSIZE; computedMaxHeight = NS_UNCONSTRAINEDSIZE;
} }
if (aAssumeHScroll) { if (aAssumeHScroll) {
nsSize hScrollbarPrefSize = nsSize hScrollbarPrefSize;
mInner.mHScrollbarBox->GetPrefSize(const_cast<nsBoxLayoutState&>(aState->mBoxState)); GetScrollbarMetrics(aState->mBoxState, mInner.mHScrollbarBox,
nsnull, &hScrollbarPrefSize, false);
if (computedHeight != NS_UNCONSTRAINEDSIZE) if (computedHeight != NS_UNCONSTRAINEDSIZE)
computedHeight = NS_MAX(0, computedHeight - hScrollbarPrefSize.height); computedHeight = NS_MAX(0, computedHeight - hScrollbarPrefSize.height);
computedMinHeight = NS_MAX(0, computedMinHeight - hScrollbarPrefSize.height); computedMinHeight = NS_MAX(0, computedMinHeight - hScrollbarPrefSize.height);
@ -488,8 +489,9 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
} }
if (aAssumeVScroll) { if (aAssumeVScroll) {
nsSize vScrollbarPrefSize = nsSize vScrollbarPrefSize;
mInner.mVScrollbarBox->GetPrefSize(const_cast<nsBoxLayoutState&>(aState->mBoxState)); GetScrollbarMetrics(aState->mBoxState, mInner.mVScrollbarBox,
&vScrollbarPrefSize, nsnull, true);
availWidth = NS_MAX(0, availWidth - vScrollbarPrefSize.width); availWidth = NS_MAX(0, availWidth - vScrollbarPrefSize.width);
} }