Bug 1078005 - Skip sending MozAfterPaint events to hidden PresShells. r=roc

This commit is contained in:
Matt Woodrow 2014-10-21 21:59:59 +13:00
Родитель 9940acb270
Коммит 1218998a7e
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -2524,6 +2524,11 @@ nsPresContext::NotifyDidPaintForSubtree(uint32_t aFlags)
return;
}
}
if (!PresShell()->IsVisible() && !mFireAfterPaintEvents) {
return;
}
// Non-root prescontexts fire MozAfterPaint to all their descendants
// unconditionally, even if no invalidations have been collected. This is
// because we don't want to eat the cost of collecting invalidations for