Bug 1201660 - When layer tree updates get dropped, hide plugins associated with the tree. Fixes a bug where we were hiding all plugins associated with the window. r=matt.woodrow
authorJim Mathies <jmathies@mozilla.com>
Fri, 04 Sep 2015 16:18:55 -0500
changeset 293647 17acd5b4446fcb3f5f22d4c19454cc842818efb9
parent 293646 a677282b7646114eaa0493834b83eb74801b3f0e
child 293648 4cd826f4b033f0cf1c93bfa5066ea1f14d77c6ef
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmatt
bugs1201660
milestone43.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 1201660 - When layer tree updates get dropped, hide plugins associated with the tree. Fixes a bug where we were hiding all plugins associated with the window. r=matt.woodrow
gfx/layers/ipc/CompositorParent.cpp
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -2074,18 +2074,25 @@ UpdatePluginWindowState(uint64_t aId)
       } else {
         shouldHidePlugin = true;
       }
     }
   }
 
   // Hide all of our plugins, this remote layer tree is no longer active.
   if (shouldHidePlugin) {
-    uintptr_t parentWidget = (uintptr_t)lts.mParent->GetWidget();
-    unused << lts.mParent->SendHideAllPlugins(parentWidget);
+    for (uint32_t pluginsIdx = 0; pluginsIdx < lts.mPluginData.Length();
+         pluginsIdx++) {
+      lts.mPluginData[pluginsIdx].visible() = false;
+    }
+    nsIntPoint offset;
+    nsIntRegion region;
+    unused << lts.mParent->SendUpdatePluginConfigurations(offset,
+                                                          region,
+                                                          lts.mPluginData);
     // Clear because there's no recovering from this until we receive
     // new shadow layer plugin data in ShadowLayersUpdated.
     lts.mPluginData.Clear();
   }
 }
 #endif // #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
 
 void