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(); }