the gfx scrollframe sets curpos long before maxpos when going back on a page. this means we cannot keep the check that verifies curpos <= maxpos. r=ccarlen/sr=brendan/a=asa. bug# 134782

git-svn-id: svn://10.0.0.236/trunk@118116 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pinkerton%netscape.com
2002-04-04 14:50:39 +00:00
parent d050ccd7c4
commit 982f8ab64c

View File

@@ -380,8 +380,16 @@ nsNativeScrollbar::SetPosition(PRUint32 aPos)
aPos = 0;
PRInt32 oldValue = mValue;
mValue = ((PRInt32)aPos) > mMaxValue ? mMaxValue : ((int)aPos);
// while we _should_ be ensuring that we don't set our value higher
// than our max value, the gfx scrollview code plays fast and loose
// with the rules while going back/forward and adjusts the value to the
// previous value long before it sets the max. As a result, we would
// lose the given value (since max would most likely be 0). The only
// way around that is to relax our restrictions a little bit. (bug 135191)
// mValue = ((PRInt32)aPos) > mMaxValue ? mMaxValue : ((int)aPos);
mValue = aPos;
// redraw the scrollbar. We can do the update later since we'll
// always redraw our parent when we're in a tight loop.
if ( mValue != oldValue )