mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 883404 (UI portion) - Disable running plugins on the current page when the user chooses "Block", r=jaws
This commit is contained in:
parent
3eff95c503
commit
ea88e835c9
@ -731,10 +731,6 @@ var gPluginHandler = {
|
||||
let principal = contentWindow.document.nodePrincipal;
|
||||
Services.perms.addFromPrincipal(principal, aPluginInfo.permissionString,
|
||||
permission, expireType, expireTime);
|
||||
|
||||
if (aNewState == "block") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Manually activate the plugins that would have been automatically
|
||||
@ -752,19 +748,23 @@ var gPluginHandler = {
|
||||
}
|
||||
if (aPluginInfo.permissionString == pluginHost.getPermissionStringForType(plugin.actualType)) {
|
||||
pluginFound = true;
|
||||
if (gPluginHandler.canActivatePlugin(plugin)) {
|
||||
let overlay = this.getPluginUI(plugin, "main");
|
||||
if (overlay) {
|
||||
overlay.removeEventListener("click", gPluginHandler._overlayClickListener, true);
|
||||
if (aNewState == "block") {
|
||||
plugin.reload(true);
|
||||
} else {
|
||||
if (gPluginHandler.canActivatePlugin(plugin)) {
|
||||
let overlay = this.getPluginUI(plugin, "main");
|
||||
if (overlay) {
|
||||
overlay.removeEventListener("click", gPluginHandler._overlayClickListener, true);
|
||||
}
|
||||
plugin.playPlugin();
|
||||
}
|
||||
plugin.playPlugin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If there are no instances of the plugin on the page any more, what the
|
||||
// user probably needs is for us to allow and then refresh.
|
||||
if (!pluginFound) {
|
||||
if (aNewState != "block" && !pluginFound) {
|
||||
browser.reload();
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user