From b554cff84e94262cb5c198fe7ab7efafcf8c8fdf Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Tue, 1 Apr 2008 22:15:43 +0000 Subject: [PATCH] Bug 408955. UpdateViewAfterScroll shouldn't just bail out for content in popups. Instead we should do the invalidation but limit it to the correct displayRoot. r+sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@248972 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/view/src/nsViewManager.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/mozilla/view/src/nsViewManager.cpp b/mozilla/view/src/nsViewManager.cpp index 1660671ae2b..fcc40e62544 100644 --- a/mozilla/view/src/nsViewManager.cpp +++ b/mozilla/view/src/nsViewManager.cpp @@ -742,24 +742,18 @@ nsViewManager::UpdateViewAfterScroll(nsView *aView, const nsRegion& aUpdateRegio --RootViewManager()->mScrollCnt; return; } - nsPoint offset = ComputeViewOffset(aView); + + nsView* displayRoot = GetDisplayRootFor(aView); + nsPoint offset = aView->GetOffsetTo(displayRoot); damageRect.MoveBy(offset); - // 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; - } - - UpdateWidgetArea(RootViewManager()->GetRootView(), nsRegion(damageRect), aView); + UpdateWidgetArea(displayRoot, nsRegion(damageRect), aView); if (!aUpdateRegion.IsEmpty()) { // XXX We should update the region, not the bounds rect, but that requires // a little more work. Fix this when we reshuffle this code. nsRegion update(aUpdateRegion); update.MoveBy(offset); - UpdateWidgetArea(RootViewManager()->GetRootView(), update, nsnull); + UpdateWidgetArea(displayRoot, update, nsnull); // FlushPendingInvalidates(); }