mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 594267. Don't call WillPaint on hidden documents. r=bzbarsky a=roc
This commit is contained in:
parent
447ae6f4c6
commit
b18c3838c6
@ -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,11 +1659,13 @@ nsViewManager::CallWillPaintOnObservers(PRBool aWillSendDidPaint)
|
||||
nsViewManager* vm = (nsViewManager*)gViewManagers->ElementAt(index);
|
||||
if (vm->RootViewManager() == this) {
|
||||
// One of our kids.
|
||||
nsCOMPtr<nsIViewObserver> obs = vm->GetViewObserver();
|
||||
if (obs) {
|
||||
obs->WillPaint(aWillSendDidPaint);
|
||||
NS_ASSERTION(mUpdateBatchCnt == savedUpdateBatchCnt,
|
||||
"Observer did not end view batch?");
|
||||
if (vm->mRootView && vm->mRootView->IsEffectivelyVisible()) {
|
||||
nsCOMPtr<nsIViewObserver> obs = vm->GetViewObserver();
|
||||
if (obs) {
|
||||
obs->WillPaint(aWillSendDidPaint);
|
||||
NS_ASSERTION(mUpdateBatchCnt == savedUpdateBatchCnt,
|
||||
"Observer did not end view batch?");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user