Bug 807664 Port |Bug 752461 - First time after choosing to "Never activate plugins for this site" the video is still playing| r=mcsmurf.
This commit is contained in:
Родитель
9e8268de35
Коммит
2bff58c895
|
@ -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();
|
||||
|
|
|
@ -580,7 +580,7 @@
|
|||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
|
||||
<method name="activateSinglePlugin">
|
||||
<parameter name="aPlugin"/>
|
||||
<body>
|
||||
|
@ -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 @@
|
|||
</body>
|
||||
</method>
|
||||
|
||||
<method name="removeClickToPlayOverlays">
|
||||
<body>
|
||||
<![CDATA[
|
||||
var doc = this.activeBrowser.contentWindow.document;
|
||||
var plugins = this.contentWindowUtils.plugins;
|
||||
for (let plugin of plugins) {
|
||||
let overlay = doc.getAnonymousElementByAttribute(plugin, "class", "mainBox");
|
||||
overlay.style.visibility = "hidden";
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="showGeolocationPrompt">
|
||||
<parameter name="file"/>
|
||||
<parameter name="site"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче