Bug 385222: Topmost overlapping div does not scroll within the bounded area of the underlying div. r+sr=roc.

This commit is contained in:
sharparrow1@yahoo.com 2007-07-02 13:56:30 -07:00
Родитель 072a3ed8d5
Коммит 58b8743821
1 изменённых файлов: 15 добавлений и 0 удалений

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

@ -724,7 +724,22 @@ nsViewManager::UpdateViewAfterScroll(nsView *aView, const nsRegion& aUpdateRegio
{
NS_ASSERTION(RootViewManager()->mScrollCnt > 0,
"Someone forgot to call WillBitBlit()");
// Look at the view's clipped rect. It may be that part of the view is clipped out
// in which case we don't need to worry about invalidating the clipped-out part.
nsRect damageRect = aView->GetDimensions();
if (damageRect.IsEmpty()) {
return;
}
nsPoint offset = ComputeViewOffset(aView);
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()) {
return;
}
UpdateWidgetArea(RootViewManager()->GetRootView(), 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.