Bug 210269. Reduce use of SetAttr during reflow. Also, fix up the API that gets the scrollbar dimensions of a scrollframe to always work right for RTL. r+sr=bryner
git-svn-id: svn://10.0.0.236/trunk@151089 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -3094,26 +3094,8 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext,
|
||||
}
|
||||
|
||||
if (scrollableFrame) {
|
||||
// Now, account for scrollbars, if we have any.
|
||||
PRBool verticalVisible;
|
||||
PRBool horizontalVisible;
|
||||
scrollableFrame->GetScrollbarVisibility(aPresContext, &verticalVisible,
|
||||
&horizontalVisible);
|
||||
|
||||
if (verticalVisible || horizontalVisible) {
|
||||
nscoord verticalWidth;
|
||||
nscoord horizontalHeight;
|
||||
scrollableFrame->GetScrollbarSizes(aPresContext, &verticalWidth,
|
||||
&horizontalHeight);
|
||||
if (verticalVisible) {
|
||||
// Assumes vertical scrollbars are on the right.
|
||||
viewportArea.width -= verticalWidth;
|
||||
}
|
||||
if (horizontalVisible) {
|
||||
// Assumes horizontal scrollbars are on the bottom.
|
||||
viewportArea.height -= horizontalHeight;
|
||||
}
|
||||
}
|
||||
nsMargin scrollbars = scrollableFrame->GetActualScrollbarSizes();
|
||||
viewportArea.Deflate(scrollbars);
|
||||
}
|
||||
|
||||
// Get the anchor point
|
||||
|
||||
Reference in New Issue
Block a user