mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 653839. Don't call DidPaint on hidden documents. This just does for DidPaint what bug 594267 did for WillPaint. r=roc
This commit is contained in:
parent
b2f344a841
commit
f18d13c30e
@ -7361,6 +7361,10 @@ PresShell::WillPaint(PRBool aWillSendDidPaint)
|
||||
NS_IMETHODIMP_(void)
|
||||
PresShell::DidPaint()
|
||||
{
|
||||
if (mPaintingSuppressed || !mIsActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsRootPresContext* rootPresContext = mPresContext->GetRootPresContext();
|
||||
if (!rootPresContext) {
|
||||
return;
|
||||
|
@ -1694,9 +1694,11 @@ nsViewManager::CallDidPaintOnObservers()
|
||||
nsViewManager* vm = (nsViewManager*)gViewManagers->ElementAt(index);
|
||||
if (vm->RootViewManager() == this) {
|
||||
// One of our kids.
|
||||
nsCOMPtr<nsIViewObserver> obs = vm->GetViewObserver();
|
||||
if (obs) {
|
||||
obs->DidPaint();
|
||||
if (vm->mRootView && vm->mRootView->IsEffectivelyVisible()) {
|
||||
nsCOMPtr<nsIViewObserver> obs = vm->GetViewObserver();
|
||||
if (obs) {
|
||||
obs->DidPaint();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user