Bug 1581868 - Black page sometimes when restoring geckoview_example/fenix with webrender enabled. r=jnicol
authorKris Taeleman <ktaeleman@mozilla.com>
Mon, 02 Dec 2019 08:01:37 +0000
changeset 505685 01679b21503d67157064840b22bafecec880dfa7
parent 505684 cb6ec14a123ad63a9c0e2fc9f86427902dbe5c79
child 505686 b89936db7178260311cbd3438497ed16d0b5be55
push id36886
push usernbeleuzu@mozilla.com
push dateFri, 06 Dec 2019 04:43:57 +0000
treeherdermozilla-central@10160518ddc8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjnicol
bugs1581868
milestone73.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1581868 - Black page sometimes when restoring geckoview_example/fenix with webrender enabled. r=jnicol Differential Revision: https://phabricator.services.mozilla.com/D55338
layout/base/PresShell.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -10447,16 +10447,29 @@ nsresult PresShell::SetIsActive(bool aIs
 #if defined(MOZ_WIDGET_ANDROID)
   if (changed && !aIsActive && presContext &&
       presContext->IsRootContentDocumentCrossProcess()) {
     if (BrowserChild* browserChild = BrowserChild::GetFrom(this)) {
       // Reset the dynamic toolbar offset state.
       presContext->UpdateDynamicToolbarOffset(0);
     }
   }
+
+  // When the PresShell is being reactivated, make sure that we repaint
+  // This is needed for pages living in the parent process (like about:support).
+  // Content pages are refreshed by the BrowserHost, which does not exist
+  // in parent process pages
+  if (aIsActive) {
+    if (nsIFrame* root = GetRootFrame()) {
+      FrameLayerBuilder::InvalidateAllLayersForFrame(
+          nsLayoutUtils::GetDisplayRootFrame(root));
+      root->SchedulePaint();
+    }
+  }
+
 #endif
 
   return rv;
 }
 
 RefPtr<MobileViewportManager> PresShell::GetMobileViewportManager() const {
   return mMobileViewportManager;
 }