Propagate SetBounds to mPreviousViewer so that resizes work correctly during paint suppression, which is especially important for Firefox infobar. b=290991 r=bzbarsky sr=roc a=bsmedberg

This commit is contained in:
dbaron%dbaron.org 2005-08-02 20:19:19 +00:00
Родитель 5e2f34ea7b
Коммит 6699b9a74c
1 изменённых файлов: 11 добавлений и 0 удалений

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

@ -1674,6 +1674,17 @@ DocumentViewerImpl::SetBounds(const nsRect& aBounds)
mWindow->Resize(aBounds.x, aBounds.y, aBounds.width, aBounds.height,
PR_FALSE);
}
// If there's a previous viewer, it's the one that's actually showing,
// so be sure to resize it as well so it paints over the right area.
// This may slow down the performance of the new page load, but resize
// during load is also probably a relatively unusual condition
// relating to things being hidden while something is loaded. It so
// happens that Firefox does this a good bit with its infobar, and it
// looks ugly if we don't do this.
if (mPreviousViewer)
mPreviousViewer->SetBounds(aBounds);
return NS_OK;
}