Bug 710373 - Pressing the vertical slider down arrow should move three lines instead of one. r=roc

This commit is contained in:
Jared Wein 2012-01-31 12:04:35 +01:00
parent 145530e7f8
commit e7ae7fed94

View File

@ -3233,7 +3233,8 @@ nsGfxScrollFrameInner::ReflowFinished()
nsPoint scrollPos = GetScrollPosition();
// XXX shouldn't we use GetPageScrollAmount/GetLineScrollAmount here?
if (vScroll) {
nscoord fontHeight = GetLineScrollAmount().height;
const double kScrollMultiplier = 3;
nscoord fontHeight = GetLineScrollAmount().height * kScrollMultiplier;
// We normally use (scrollArea.height - fontHeight) for height
// of page scrolling. However, it is too small when
// fontHeight is very large. (If fontHeight is larger than
@ -3243,7 +3244,7 @@ nsGfxScrollFrameInner::ReflowFinished()
nscoord pageincrement = nscoord(mScrollPort.height - fontHeight);
nscoord pageincrementMin = nscoord(float(mScrollPort.height) * 0.8);
FinishReflowForScrollbar(vScroll, minY, maxY, scrollPos.y,
NS_MAX(pageincrement,pageincrementMin),
NS_MAX(pageincrement, pageincrementMin),
fontHeight);
}
if (hScroll) {