Bug 339548. Part 10: Simplify widget parameters to UpdateWidgetArea.

This commit is contained in:
Robert O'Callahan 2009-07-22 12:45:01 +12:00
Родитель dce2b0d98a
Коммит 40f2d5e5f2
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -576,7 +576,7 @@ void nsViewManager::ProcessPendingUpdates(nsView* aView, PRBool aDoInvalidate)
nsRegion r = *dirtyRegion; nsRegion r = *dirtyRegion;
r.MoveBy(aView->GetOffsetTo(nearestViewWithWidget)); r.MoveBy(aView->GetOffsetTo(nearestViewWithWidget));
UpdateWidgetArea(nearestViewWithWidget, UpdateWidgetArea(nearestViewWithWidget,
nearestViewWithWidget->GetNearestWidget(nsnull), r, nsnull); nearestViewWithWidget->GetWidget(), r, nsnull);
dirtyRegion->SetEmpty(); dirtyRegion->SetEmpty();
} }
} }
@ -683,14 +683,14 @@ nsViewManager::UpdateViewAfterScroll(nsView *aView, const nsRegion& aUpdateRegio
nsPoint offset = aView->GetOffsetTo(displayRoot); nsPoint offset = aView->GetOffsetTo(displayRoot);
damageRect.MoveBy(offset); damageRect.MoveBy(offset);
UpdateWidgetArea(displayRoot, displayRoot->GetNearestWidget(nsnull), UpdateWidgetArea(displayRoot, displayRoot->GetWidget(),
nsRegion(damageRect), aView); nsRegion(damageRect), aView);
if (!aUpdateRegion.IsEmpty()) { if (!aUpdateRegion.IsEmpty()) {
// XXX We should update the region, not the bounds rect, but that requires // XXX We should update the region, not the bounds rect, but that requires
// a little more work. Fix this when we reshuffle this code. // a little more work. Fix this when we reshuffle this code.
nsRegion update(aUpdateRegion); nsRegion update(aUpdateRegion);
update.MoveBy(offset); update.MoveBy(offset);
UpdateWidgetArea(displayRoot, displayRoot->GetNearestWidget(nsnull), UpdateWidgetArea(displayRoot, displayRoot->GetWidget(),
update, nsnull); update, nsnull);
// FlushPendingInvalidates(); // FlushPendingInvalidates();
} }
@ -851,7 +851,7 @@ NS_IMETHODIMP nsViewManager::UpdateView(nsIView *aView, const nsRect &aRect, PRU
// can overlap each other and be translucent. So we have to possibly // can overlap each other and be translucent. So we have to possibly
// invalidate our rect in each of the widgets we have lying about. // invalidate our rect in each of the widgets we have lying about.
damagedRect.MoveBy(view->GetOffsetTo(displayRoot)); damagedRect.MoveBy(view->GetOffsetTo(displayRoot));
UpdateWidgetArea(displayRoot, displayRoot->GetNearestWidget(nsnull), UpdateWidgetArea(displayRoot, displayRoot->GetWidget(),
nsRegion(damagedRect), nsnull); nsRegion(damagedRect), nsnull);
RootViewManager()->IncrementUpdateCount(); RootViewManager()->IncrementUpdateCount();