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

This commit is contained in:
roc+@cs.cmu.edu 2008-04-01 15:15:43 -07:00
Родитель 7eb9d4fe30
Коммит dcb9b58ab1
1 изменённых файлов: 5 добавлений и 11 удалений

Просмотреть файл

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