mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 400208. Don't leak mScrollCnt when we take an early exit from UpdateViewAfterScroll. r+sr=bzbarsky,a=beltzner
This commit is contained in:
parent
4b80cff404
commit
a69e97ef2b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user