From c85b133efa2573fb713ab722c7d1f15f55c913d4 Mon Sep 17 00:00:00 2001 From: "michaelp%netscape.com" Date: Fri, 16 Apr 1999 19:53:53 +0000 Subject: [PATCH] we no longer recurse into clip views. shoot me troy. so long folks. --- view/src/nsView.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/view/src/nsView.cpp b/view/src/nsView.cpp index b528dca6095b..9c8a102f1229 100644 --- a/view/src/nsView.cpp +++ b/view/src/nsView.cpp @@ -34,11 +34,13 @@ #include "nsGfxCIID.h" #include "nsIBlender.h" #include "nsIRegion.h" +#include "nsIClipView.h" //mmptemp static NS_DEFINE_IID(kIViewIID, NS_IVIEW_IID); static NS_DEFINE_IID(kIScrollableViewIID, NS_ISCROLLABLEVIEW_IID); +static NS_DEFINE_IID(kIClipViewIID, NS_ICLIPVIEW_IID); static nsEventStatus PR_CALLBACK HandleEvent(nsGUIEvent *aEvent); @@ -1374,9 +1376,10 @@ NS_IMETHODIMP nsView :: GetScratchPoint(nsPoint **aPoint) static void calc_extents(nsIView *view, nsRect *extents, nscoord ox, nscoord oy) { - nsIView *kid; - PRInt32 numkids, cnt; - nsRect bounds; + nsIView *kid; + PRInt32 numkids, cnt; + nsRect bounds; + nsIClipView *cview; view->GetChildCount(numkids); @@ -1390,7 +1393,12 @@ static void calc_extents(nsIView *view, nsRect *extents, nscoord ox, nscoord oy) extents->UnionRect(*extents, bounds); - calc_extents(kid, extents, bounds.x, bounds.y); + cview = nsnull; + + kid->QueryInterface(kIClipViewIID, (void **)&cview); + + if (!cview) + calc_extents(kid, extents, bounds.x, bounds.y); } }