From 7d81a6f553447f3148a904adbfac27fa25b3076b Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Fri, 10 Dec 1999 02:14:35 +0000 Subject: [PATCH] fix for page scrolling to scroll (one page - height of one line), not 80% of the page as before. bug 21348, r=evaughan,sfraser. a=brendan. --- layout/generic/nsGfxScrollFrame.cpp | 4 ++-- layout/html/base/src/nsGfxScrollFrame.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index dc2aedd91c17..76dbdfacc938 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -1468,8 +1468,8 @@ nsGfxScrollFrameInner::ReflowScrollArea( nsIPresContext* aPresContext //SetAttribute(mHScrollbarFrame, nsXULAtoms::curpos, curX); SetAttribute(mVScrollbarFrame, nsXULAtoms::maxpos, maxY); SetAttribute(mHScrollbarFrame, nsXULAtoms::maxpos, maxX); - SetAttribute(mVScrollbarFrame, nsXULAtoms::pageincrement, nscoord(float(scrollAreaSize.height)*0.8)); - SetAttribute(mHScrollbarFrame, nsXULAtoms::pageincrement, nscoord(float(scrollAreaSize.width)*0.8)); + SetAttribute(mVScrollbarFrame, nsXULAtoms::pageincrement, nscoord(scrollAreaSize.height - fontHeight)); + SetAttribute(mHScrollbarFrame, nsXULAtoms::pageincrement, nscoord(scrollAreaSize.width - 10*mOnePixel)); SetAttribute(mVScrollbarFrame, nsXULAtoms::increment, fontHeight); nsIScrollableView* scrollable = GetScrollableView(aPresContext); diff --git a/layout/html/base/src/nsGfxScrollFrame.cpp b/layout/html/base/src/nsGfxScrollFrame.cpp index dc2aedd91c17..76dbdfacc938 100644 --- a/layout/html/base/src/nsGfxScrollFrame.cpp +++ b/layout/html/base/src/nsGfxScrollFrame.cpp @@ -1468,8 +1468,8 @@ nsGfxScrollFrameInner::ReflowScrollArea( nsIPresContext* aPresContext //SetAttribute(mHScrollbarFrame, nsXULAtoms::curpos, curX); SetAttribute(mVScrollbarFrame, nsXULAtoms::maxpos, maxY); SetAttribute(mHScrollbarFrame, nsXULAtoms::maxpos, maxX); - SetAttribute(mVScrollbarFrame, nsXULAtoms::pageincrement, nscoord(float(scrollAreaSize.height)*0.8)); - SetAttribute(mHScrollbarFrame, nsXULAtoms::pageincrement, nscoord(float(scrollAreaSize.width)*0.8)); + SetAttribute(mVScrollbarFrame, nsXULAtoms::pageincrement, nscoord(scrollAreaSize.height - fontHeight)); + SetAttribute(mHScrollbarFrame, nsXULAtoms::pageincrement, nscoord(scrollAreaSize.width - 10*mOnePixel)); SetAttribute(mVScrollbarFrame, nsXULAtoms::increment, fontHeight); nsIScrollableView* scrollable = GetScrollableView(aPresContext);