Bug 1390437 - Add NotifyInvalidation after EndTransaction for layers-free mode. r=kats draft
authorEthan Lin <ethlin@mozilla.com>
Tue, 15 Aug 2017 16:54:12 +0800
changeset 648159 6b2167c58ec0a29cb1c79a7c4da632f011e543cb
parent 646265 b95b1638db48fc3d450b95b98da6bcd2f9326d2f
child 726731 59c5e2333b256fe8bb2401bde21112137ab7c105
push id74651
push userbmo:ethlin@mozilla.com
push dateThu, 17 Aug 2017 09:55:02 +0000
reviewerskats
bugs1390437
milestone57.0a1
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
layout/painting/nsDisplayList.cpp
--- 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;