From f730adcfbebfdc682ced77af9b352ac96b34c332 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Wed, 24 Oct 2007 21:44:37 +0000 Subject: [PATCH] Bug 400208. Don't leak mScrollCnt when we take an early exit from UpdateViewAfterScroll. r+sr=bzbarsky,a=beltzner git-svn-id: svn://10.0.0.236/trunk@238097 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/view/src/nsViewManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mozilla/view/src/nsViewManager.cpp b/mozilla/view/src/nsViewManager.cpp index 665590edafe..58339df6ae4 100644 --- a/mozilla/view/src/nsViewManager.cpp +++ b/mozilla/view/src/nsViewManager.cpp @@ -728,6 +728,8 @@ nsViewManager::UpdateViewAfterScroll(nsView *aView, const nsRegion& aUpdateRegio // in which case we don't need to worry about invalidating the clipped-out part. nsRect damageRect = aView->GetDimensions(); if (damageRect.IsEmpty()) { + // Don't forget to undo mScrollCnt! + --RootViewManager()->mScrollCnt; return; } nsPoint offset = ComputeViewOffset(aView); @@ -736,6 +738,8 @@ nsViewManager::UpdateViewAfterScroll(nsView *aView, const nsRegion& aUpdateRegio // if this is a floating view, it isn't covered by any widgets other than // its children, which are handled by the widget scroller. if (aView->GetFloating()) { + // Don't forget to undo mScrollCnt! + --RootViewManager()->mScrollCnt; return; }