mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 594267. Don't call WillPaint on hidden documents. r=bzbarsky a=roc
This commit is contained in:
parent
bb07e18e5b
commit
5be08ac8ee
@ -7189,9 +7189,9 @@ PresShell::ShouldIgnoreInvalidation()
|
|||||||
NS_IMETHODIMP_(void)
|
NS_IMETHODIMP_(void)
|
||||||
PresShell::WillPaint(PRBool aWillSendDidPaint)
|
PresShell::WillPaint(PRBool aWillSendDidPaint)
|
||||||
{
|
{
|
||||||
// Don't bother doing anything if some viewmanager in our tree is
|
// Don't bother doing anything if some viewmanager in our tree is painting
|
||||||
// painting while we still have painting suppressed.
|
// while we still have painting suppressed or we are not active.
|
||||||
if (mPaintingSuppressed) {
|
if (mPaintingSuppressed || !mIsActive) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1659,11 +1659,13 @@ nsViewManager::CallWillPaintOnObservers(PRBool aWillSendDidPaint)
|
|||||||
nsViewManager* vm = (nsViewManager*)gViewManagers->ElementAt(index);
|
nsViewManager* vm = (nsViewManager*)gViewManagers->ElementAt(index);
|
||||||
if (vm->RootViewManager() == this) {
|
if (vm->RootViewManager() == this) {
|
||||||
// One of our kids.
|
// One of our kids.
|
||||||
nsCOMPtr<nsIViewObserver> obs = vm->GetViewObserver();
|
if (vm->mRootView && vm->mRootView->IsEffectivelyVisible()) {
|
||||||
if (obs) {
|
nsCOMPtr<nsIViewObserver> obs = vm->GetViewObserver();
|
||||||
obs->WillPaint(aWillSendDidPaint);
|
if (obs) {
|
||||||
NS_ASSERTION(mUpdateBatchCnt == savedUpdateBatchCnt,
|
obs->WillPaint(aWillSendDidPaint);
|
||||||
"Observer did not end view batch?");
|
NS_ASSERTION(mUpdateBatchCnt == savedUpdateBatchCnt,
|
||||||
|
"Observer did not end view batch?");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user