Bug 800859. Part 4 alternative: unconditionally dispatch MozAfterPaint to all subdocuments. r=mattwoodrow

--HG--
extra : rebase_source : 2cc3125aff27b55daf6d306a2c391a9587a70101
This commit is contained in:
Robert O'Callahan 2012-10-23 14:52:48 +13:00
parent 117a471483
commit a4d67cf238

View File

@ -2275,11 +2275,16 @@ nsPresContext::NotifyDidPaintForSubtree(uint32_t aFlags)
{
if (IsRoot()) {
static_cast<nsRootPresContext*>(this)->CancelDidPaintTimer();
}
if (!mFireAfterPaintEvents) {
return;
if (!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
// every subdocument (which would require putting every subdocument in its
// own layer).
if (aFlags & nsIPresShell::PAINT_LAYERS) {
mUndeliveredInvalidateRequestsBeforeLastPaint.TakeFrom(