Bug 790483 - click-to-play plugins fail to show placeholder after resizing. r=jaws
This commit is contained in:
@@ -316,8 +316,21 @@ var gPluginHandler = {
|
||||
// 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 && this.isTooSmall(plugin, overlay))
|
||||
overlay.style.visibility = "hidden";
|
||||
if (overlay != null) {
|
||||
if (!this.isTooSmall(plugin, overlay))
|
||||
overlay.style.visibility = "visible";
|
||||
|
||||
plugin.addEventListener("overflow", function(event) {
|
||||
overlay.style.visibility = "hidden";
|
||||
});
|
||||
plugin.addEventListener("underflow", function(event) {
|
||||
// this is triggered if only one dimension underflows,
|
||||
// the other dimension might still overflow
|
||||
if (!gPluginHandler.isTooSmall(plugin, overlay)) {
|
||||
overlay.style.visibility = "visible";
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Only show the notification after we've done the isTooSmall check, so
|
||||
|
||||
Reference in New Issue
Block a user