Bug 934503 - Activated hidden plugins should not show the hidden plugin notification icon, r=jaws
☠☠ backed out by b0bce439c6e2 ☠ ☠
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 04 Nov 2013 16:47:29 -0500
changeset 153430 a8131d677d9b5d640e18cb3cab06f669a2175050
parent 153429 94a672274c2b319732713e02527a542e6b63ae1b
child 153431 f631148645b39315c1065c8bf19749c367b7e98b
push id3332
push userbsmedberg@mozilla.com
push dateMon, 04 Nov 2013 21:47:55 +0000
treeherderfx-team@f631148645b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs934503
milestone28.0a1
Bug 934503 - Activated hidden plugins should not show the hidden plugin notification icon, r=jaws
browser/base/content/browser-plugins.js
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -898,22 +898,29 @@ var gPluginHandler = {
 
     iconClasses.remove("plugin-blocked");
 
     let contentWindow = aBrowser.contentWindow;
     let contentDoc = aBrowser.contentDocument;
     let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                            .getInterface(Ci.nsIDOMWindowUtils);
     for (let plugin of cwu.plugins) {
-      let fallbackType = plugin.pluginFallbackType;
-      if (fallbackType != Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY) {
+      let info = this._getPluginInfo(plugin);
+      if (!actions.has(info.permissionString)) {
         continue;
       }
-      let info = this._getPluginInfo(plugin);
-      if (!actions.has(info.permissionString)) {
+      let fallbackType = info.fallbackType;
+      if (fallbackType == Ci.nsIObjectLoadingContent.PLUGIN_ACTIVE) {
+        actions.delete(info.permissionString);
+        if (actions.size == 0) {
+          break;
+        }
+        continue;
+      }
+      if (fallbackType != Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY) {
         continue;
       }
       let overlay = this.getPluginUI(plugin, "main");
       if (!overlay) {
         continue;
       }
       if (!this.isTooSmall(plugin, overlay)) {
         actions.delete(info.permissionString);