From 7fd48a6bec2ddc3d8b75fc49e76e9e77d2029da6 Mon Sep 17 00:00:00 2001 From: "pierre%netscape.com" Date: Tue, 19 Jan 1999 19:29:43 +0000 Subject: [PATCH] fixed Scroll() in case the caller passes a null clipRect --- widget/src/mac/nsWindow.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/widget/src/mac/nsWindow.cpp b/widget/src/mac/nsWindow.cpp index 75fb3fe4ba8..f835ca18368 100644 --- a/widget/src/mac/nsWindow.cpp +++ b/widget/src/mac/nsWindow.cpp @@ -785,8 +785,17 @@ NS_IMETHODIMP nsWindow::Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect) { // scroll the rect StartDraw(); + nsRect scrollRect; + if (aClipRect) + scrollRect = *aClipRect; + else + { + scrollRect = mBounds; + scrollRect.x = scrollRect.y = 0; + } + Rect macRect; - nsRectToMacRect(*aClipRect, macRect); + nsRectToMacRect(scrollRect, macRect); RgnHandle updateRgn = ::NewRgn(); if (updateRgn == nil)