fixed bug where computing *need* for vert/horz scrollbar did not take into

account the fact that there might be a need for the other scrollbar too.
it used to be that if it knew that it *did* need a vert/horz scrollbar it
would take the other one into account properly. it was just in making the
initial decision that there was an error.
This commit is contained in:
michaelp%netscape.com 1998-11-25 03:32:00 +00:00
parent 5e81c03cc3
commit 52d7df63eb

View File

@ -972,9 +972,7 @@ NS_IMETHODIMP nsScrollingView :: ComputeContainerSize()
if (NS_OK == win->QueryInterface(kIScrollbarIID, (void **)&scrollv))
{
// XXX Shouldn't this check also take into account the height of the
// horizontal scrollbar if we need one?
if ((mSizeY > controlRect.height) &&
if ((mSizeY > (controlRect.height - ((nsnull != scrollh) ? hheight : 0))) &&
(mScrollPref != nsScrollPreference_kNeverScroll))
{
//we need to be able to scroll
@ -1040,9 +1038,7 @@ NS_IMETHODIMP nsScrollingView :: ComputeContainerSize()
if (NS_OK == win->QueryInterface(kIScrollbarIID, (void **)&scrollh))
{
// XXX Shouldn't this check also take into account the width of the
// vertical scrollbar if we have one?
if ((mSizeX > controlRect.width) &&
if ((mSizeX > (controlRect.width - ((nsnull != scrollv) ? vwidth : 0))) &&
(mScrollPref != nsScrollPreference_kNeverScroll))
{
//we need to be able to scroll