Bug 1384387 - Clear frame's invalidation state bits in layers-free mode. r=kats
MozReview-Commit-ID: DRv5IcRQVs0
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -2102,16 +2102,27 @@ already_AddRefed<LayerManager> nsDisplay
return nullptr;
}
}
}
MaybeSetupTransactionIdAllocator(layerManager, presContext);
bool temp = aBuilder->SetIsCompositingCheap(layerManager->IsCompositingCheap());
static_cast<WebRenderLayerManager*>(layerManager.get())->EndTransactionWithoutLayer(this, aBuilder);
+
+ // For layers-free mode, we check the invalidation state bits in the EndTransaction.
+ // So we clear the invalidation state bits after EndTransaction.
+ if (widgetTransaction ||
+ // SVG-as-an-image docs don't paint as part of the retained layer tree,
+ // but they still need the invalidation state bits cleared in order for
+ // invalidation for CSS/SMIL animation to work properly.
+ (document && document->IsBeingUsedAsImage())) {
+ frame->ClearInvalidationStateBits();
+ }
+
aBuilder->SetIsCompositingCheap(temp);
return layerManager.forget();
}
NotifySubDocInvalidationFunc computeInvalidFunc =
presContext->MayHavePaintEventListenerInSubDocument() ? nsPresContext::NotifySubDocInvalidation : 0;
UniquePtr<LayerProperties> props;