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

This commit is contained in:
Markus Stange 2012-07-28 09:41:42 +02:00
parent 5bc1a73c63
commit a74f371136

View File

@ -478,8 +478,9 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
computedMaxHeight = NS_UNCONSTRAINEDSIZE;
}
if (aAssumeHScroll) {
nsSize hScrollbarPrefSize =
mInner.mHScrollbarBox->GetPrefSize(const_cast<nsBoxLayoutState&>(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<nsBoxLayoutState&>(aState->mBoxState));
nsSize vScrollbarPrefSize;
GetScrollbarMetrics(aState->mBoxState, mInner.mVScrollbarBox,
&vScrollbarPrefSize, nsnull, true);
availWidth = NS_MAX(0, availWidth - vScrollbarPrefSize.width);
}