Removed some code that's no longer needed now that the frames correctly

compute their size based on any absolutely positioned children they
have
This commit is contained in:
troy%netscape.com 1998-10-19 21:24:53 +00:00
Родитель a20eef0c50
Коммит ccb611db9b
2 изменённых файлов: 0 добавлений и 38 удалений

Просмотреть файл

@ -1043,14 +1043,7 @@ NS_IMETHODIMP nsScrollingView :: ComputeContainerSize()
mViewManager->GetDeviceContext(px);
px->GetAppUnitsToDevUnits(scale);
#if 0
ComputeScrollArea(scrolledView, area, 0, 0);
mSizeY = area.YMost();
mSizeX = area.XMost();
#else
scrolledView->GetDimensions(&mSizeX, &mSizeY);
#endif
if (nsnull != mHScrollBarView)
{
@ -1437,33 +1430,3 @@ NS_IMETHODIMP nsScrollingView :: GetScrollPosition(nscoord &aX, nscoord &aY)
return NS_OK;
}
void nsScrollingView :: ComputeScrollArea(nsIView *aView, nsRect &aRect,
nscoord aOffX, nscoord aOffY)
{
nsRect trect, vrect;
aView->GetBounds(vrect);
aOffX += vrect.x;
aOffY += vrect.y;
trect.x = aOffX;
trect.y = aOffY;
trect.width = vrect.width;
trect.height = vrect.height;
if (aRect.IsEmpty() == PR_TRUE)
aRect = trect;
else
aRect.UnionRect(aRect, trect);
PRInt32 numkids;
aView->GetChildCount(numkids);
for (PRInt32 cnt = 0; cnt < numkids; cnt++)
{
nsIView *view;
aView->GetChild(cnt, view);
ComputeScrollArea(view, aRect, aOffX, aOffY);
}
}

Просмотреть файл

@ -70,7 +70,6 @@ public:
NS_IMETHOD GetClipSize(nscoord *aX, nscoord *aY);
//private
void ComputeScrollArea(nsIView *aView, nsRect &aRect, nscoord aOffX, nscoord aOffY);
virtual void HandleScrollEvent(nsGUIEvent *aEvent, PRUint32 aEventFlags);
virtual void AdjustChildWidgets(nsScrollingView *aScrolling, nsIView *aView, nscoord aDx, nscoord aDy, float aScale);