Bug 594267. Don't call WillPaint on hidden documents. r=bzbarsky a=roc

This commit is contained in:
Timothy Nikkel 2010-09-11 13:24:50 -05:00
Родитель 447ae6f4c6
Коммит b18c3838c6
2 изменённых файлов: 10 добавлений и 8 удалений

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

@ -7189,9 +7189,9 @@ PresShell::ShouldIgnoreInvalidation()
NS_IMETHODIMP_(void)
PresShell::WillPaint(PRBool aWillSendDidPaint)
{
// Don't bother doing anything if some viewmanager in our tree is
// painting while we still have painting suppressed.
if (mPaintingSuppressed) {
// Don't bother doing anything if some viewmanager in our tree is painting
// while we still have painting suppressed or we are not active.
if (mPaintingSuppressed || !mIsActive) {
return;
}

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

@ -1659,6 +1659,7 @@ nsViewManager::CallWillPaintOnObservers(PRBool aWillSendDidPaint)
nsViewManager* vm = (nsViewManager*)gViewManagers->ElementAt(index);
if (vm->RootViewManager() == this) {
// One of our kids.
if (vm->mRootView && vm->mRootView->IsEffectivelyVisible()) {
nsCOMPtr<nsIViewObserver> obs = vm->GetViewObserver();
if (obs) {
obs->WillPaint(aWillSendDidPaint);
@ -1668,6 +1669,7 @@ nsViewManager::CallWillPaintOnObservers(PRBool aWillSendDidPaint)
}
}
}
}
void
nsViewManager::CallDidPaintOnObservers()