Bug 1390437 - Add NotifyInvalidation after EndTransaction for layers-free mode. r=kats
For layers-free mode, we still need to call NotifyInvalidation to trigger
FireDOMPaintEvent. It should be fine to pass an empty rect since we always
take full snapshot for WR.
MozReview-Commit-ID: EzzQi2C5aRQ
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -2131,16 +2131,21 @@ already_AddRefed<LayerManager> nsDisplay
frame->ClearInvalidationStateBits();
}
aBuilder->SetIsCompositingCheap(temp);
if (document && widgetTransaction) {
TriggerPendingAnimations(document, layerManager->GetAnimationReadyTime());
}
+ // TODO: make sure this gets fired at the right times
+ if (view && presContext->IsChrome()) {
+ presContext->NotifyInvalidation(layerManager->GetLastTransactionId(), nsIntRect());
+ }
+
return layerManager.forget();
}
NotifySubDocInvalidationFunc computeInvalidFunc =
presContext->MayHavePaintEventListenerInSubDocument() ? nsPresContext::NotifySubDocInvalidation : 0;
UniquePtr<LayerProperties> props;
RefPtr<ContainerLayer> root;