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:
roc+%cs.cmu.edu
2004-01-09 19:21:20 +00:00
parent 6123ccb779
commit 2c7cf5d827
21 changed files with 212 additions and 344 deletions

View File

@@ -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