From 2bff58c895c0e27c5c0339726f0d12690fd369ed Mon Sep 17 00:00:00 2001 From: Philip Chee Date: Tue, 29 Jan 2013 22:47:42 +0800 Subject: [PATCH] Bug 807664 Port |Bug 752461 - First time after choosing to "Never activate plugins for this site" the video is still playing| r=mcsmurf. --- .../test/browser/browser_pluginnotification.js | 4 +--- suite/common/bindings/notification.xml | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/suite/browser/test/browser/browser_pluginnotification.js b/suite/browser/test/browser/browser_pluginnotification.js index cc63c8deb1..e728169df9 100644 --- a/suite/browser/test/browser/browser_pluginnotification.js +++ b/suite/browser/test/browser/browser_pluginnotification.js @@ -76,7 +76,6 @@ function finishTest() { finish(); } - function handleBindingAttached(evt) { if (evt.target instanceof Ci.nsIObjectLoadingContent && evt.target.pluginFallbackType == Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY) @@ -436,8 +435,7 @@ function test13b() { var objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent); ok(!objLoadingContent.activated, "Test 13b, Plugin should not be activated"); var overlay = gTestBrowser.contentDocument.getAnonymousElementByAttribute(plugin, "class", "mainBox"); - // See Bug 807644 on this - todo(overlay.style.visibility == "hidden", "Test 13b, Plugin should not have visible overlay"); + ok(overlay.style.visibility == "hidden", "Test 13b, Plugin should not have visible overlay"); gNextTest = test13c; gTestBrowser.reload(); diff --git a/suite/common/bindings/notification.xml b/suite/common/bindings/notification.xml index d41620b131..2ae77c8de9 100644 --- a/suite/common/bindings/notification.xml +++ b/suite/common/bindings/notification.xml @@ -580,7 +580,7 @@ ]]> - + @@ -588,7 +588,7 @@ var objLoadingContent = aPlugin.QueryInterface(Components.interfaces.nsIObjectLoadingContent); if (this.canActivatePlugin(objLoadingContent)) objLoadingContent.playPlugin(); - + var haveUnplayedPlugins = this.contentWindowUtils.plugins.some(function(plugin) { var hupObjLoadingContent = plugin.QueryInterface(Components.interfaces.nsIObjectLoadingContent); return plugin != aPlugin && this.canActivatePlugin(hupObjLoadingContent); @@ -2278,6 +2278,7 @@ this.activeBrowser); if (notification) notification.remove(); + this.removeClickToPlayOverlays(); }).bind(this) }]; var options = { @@ -2290,6 +2291,19 @@ + + + + + +