mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
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:
parent
5e81c03cc3
commit
52d7df63eb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user