mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 744745 - Prevent overlay being made transparent from site CSS. r=jaws
This commit is contained in:
parent
69be3b2cf0
commit
fb55032094
@ -254,6 +254,7 @@ _BROWSER_FILES = \
|
||||
plugin_add_dynamically.html \
|
||||
plugin_clickToPlayAllow.html \
|
||||
plugin_clickToPlayDeny.html \
|
||||
plugin_bug744745.html \
|
||||
plugin_bug749455.html \
|
||||
plugin_bug797677.html \
|
||||
plugin_bug818009.html \
|
||||
@ -283,6 +284,7 @@ _BROWSER_FILES = \
|
||||
browser_tabDrop.js \
|
||||
browser_lastAccessedTab.js \
|
||||
browser_bug734076.js \
|
||||
browser_bug744745.js \
|
||||
browser_bug812562.js \
|
||||
browser_bug818009.js \
|
||||
browser_bug818118.js \
|
||||
|
42
browser/base/content/test/browser_bug744745.js
Normal file
42
browser/base/content/test/browser_bug744745.js
Normal file
@ -0,0 +1,42 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var gTestBrowser = null;
|
||||
var gNumPluginBindingsAttached = 0;
|
||||
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
registerCleanupFunction(function() {
|
||||
Services.prefs.clearUserPref("plugins.click_to_play");
|
||||
gTestBrowser.removeEventListener("PluginBindingAttached", pluginBindingAttached, true, true);
|
||||
gBrowser.removeCurrentTab();
|
||||
window.focus();
|
||||
});
|
||||
|
||||
Services.prefs.setBoolPref("plugins.click_to_play", true);
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gTestBrowser = gBrowser.selectedBrowser;
|
||||
gTestBrowser.addEventListener("PluginBindingAttached", pluginBindingAttached, true, true);
|
||||
var gHttpTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
|
||||
gTestBrowser.contentWindow.location = gHttpTestRoot + "plugin_bug744745.html";
|
||||
}
|
||||
|
||||
function pluginBindingAttached() {
|
||||
gNumPluginBindingsAttached++;
|
||||
|
||||
if (gNumPluginBindingsAttached == 1) {
|
||||
var doc = gTestBrowser.contentDocument;
|
||||
var testplugin = doc.getElementById("test");
|
||||
ok(testplugin, "should have test plugin");
|
||||
var style = getComputedStyle(testplugin);
|
||||
ok('opacity' in style, "style should have opacity set");
|
||||
is(style.opacity, 1, "opacity should be 1");
|
||||
finish();
|
||||
} else {
|
||||
ok(false, "if we've gotten here, something is quite wrong");
|
||||
}
|
||||
}
|
12
browser/base/content/test/plugin_bug744745.html
Normal file
12
browser/base/content/test/plugin_bug744745.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><meta charset="utf-8"/></head>
|
||||
<body>
|
||||
<style>
|
||||
.x {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<object id="test" class="x" type="application/x-test" width=200 height=200></object>
|
||||
</body>
|
||||
</html>
|
@ -27,5 +27,6 @@ object:-moz-handler-vulnerable-updatable,
|
||||
object:-moz-handler-vulnerable-no-update {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
opacity: 1 !important;
|
||||
-moz-binding: url('chrome://mozapps/content/plugins/pluginProblem.xml#pluginProblem') !important;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user