diff --git a/browser/base/content/browser-plugins.js b/browser/base/content/browser-plugins.js index 44d1d92793fe..79c47f6ca1a4 100644 --- a/browser/base/content/browser-plugins.js +++ b/browser/base/content/browser-plugins.js @@ -313,7 +313,7 @@ var gPluginHandler = { break; } - // Show the in-content UI if it's not too big. The crashed plugin handler already did this. + // Hide the in-content UI if it's too big. The crashed plugin handler already did this. if (eventType != "PluginCrashed" && eventType != "PluginRemoved") { let overlay = this.getPluginUI(plugin, "main"); if (overlay != null) { @@ -989,12 +989,12 @@ var gPluginHandler = { if (this.isTooSmall(plugin, overlay)) { // Hide the overlay's contents. Use visibility style, so that it doesn't // collapse down to 0x0. + overlay.style.visibility = "hidden"; isShowing = false; } } if (isShowing) { - overlay.style.visibility = "visible"; // If a previous plugin on the page was too small and resulted in adding a // notification bar, then remove it because this plugin instance it big // enough to serve as in-content notification. diff --git a/toolkit/mozapps/plugins/content/pluginProblemBinding.css b/toolkit/mozapps/plugins/content/pluginProblemBinding.css index abf4b00a0204..cb51bf542a13 100644 --- a/toolkit/mozapps/plugins/content/pluginProblemBinding.css +++ b/toolkit/mozapps/plugins/content/pluginProblemBinding.css @@ -26,6 +26,9 @@ object:-moz-handler-playpreview, object:-moz-handler-vulnerable-updatable, object:-moz-handler-vulnerable-no-update { display: inline-block; + /* Initialize the overlay with visibility:hidden to prevent flickering if + * the plugin is too small to show the overlay */ + visibility: hidden; overflow: hidden; opacity: 1 !important; -moz-binding: url('chrome://mozapps/content/plugins/pluginProblem.xml#pluginProblem') !important; diff --git a/toolkit/mozapps/plugins/content/pluginProblemContent.css b/toolkit/mozapps/plugins/content/pluginProblemContent.css index 52346f8eb69d..21787cb5cbce 100644 --- a/toolkit/mozapps/plugins/content/pluginProblemContent.css +++ b/toolkit/mozapps/plugins/content/pluginProblemContent.css @@ -42,9 +42,6 @@ html|applet:not([height]), html|applet[height=""] { .mainBox { width: inherit; height: inherit; - /* Initialize the overlay with visibility:hidden to prevent flickering if - * the plugin is too small to show the overlay */ - visibility: hidden; overflow: hidden; direction: ltr; unicode-bidi: embed;