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
This commit is contained in:
roc+%cs.cmu.edu
2007-10-24 21:44:37 +00:00
parent eb26f2878f
commit f730adcfbe

View File

@@ -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;
}