Bug 1307445 part A - Don't ever show "A plugin is needed to display this content." or "This plugin is disabled." - Just always use fallback content or empty content. r=mconley+sebastian

MozReview-Commit-ID: ClnOkK3sWIK

--HG--
extra : rebase_source : 0325b830088bef3a7ee5a506041c8eafafbf50e2
This commit is contained in:
Benjamin Smedberg 2016-10-18 08:42:12 -04:00
parent 5b99355518
commit ed2a6c5769
19 changed files with 0 additions and 131 deletions

View File

@ -65,7 +65,6 @@ skip-if = !crashreporter
[browser_blocking.js] [browser_blocking.js]
[browser_plugins_added_dynamically.js] [browser_plugins_added_dynamically.js]
[browser_pluginnotification.js] [browser_pluginnotification.js]
[browser_plugin_infolink.js]
[browser_plugin_reloading.js] [browser_plugin_reloading.js]
[browser_blocklist_content.js] [browser_blocklist_content.js]
skip-if = !e10s skip-if = !e10s

View File

@ -19,8 +19,6 @@ add_task(function* () {
gBrowser.selectedTab = gBrowser.addTab(); gBrowser.selectedTab = gBrowser.addTab();
gTestBrowser = gBrowser.selectedBrowser; gTestBrowser = gBrowser.selectedBrowser;
let bindingPromise = waitForEvent(gTestBrowser, "PluginBindingAttached", null, true, true);
let consoleService = Cc["@mozilla.org/consoleservice;1"] let consoleService = Cc["@mozilla.org/consoleservice;1"]
.getService(Ci.nsIConsoleService); .getService(Ci.nsIConsoleService);
let errorListener = { let errorListener = {
@ -33,8 +31,6 @@ add_task(function* () {
yield promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_bug797677.html"); yield promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_bug797677.html");
yield bindingPromise;
let pluginInfo = yield promiseForPluginInfo("plugin"); let pluginInfo = yield promiseForPluginInfo("plugin");
is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_UNSUPPORTED, "plugin should not have been found."); is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_UNSUPPORTED, "plugin should not have been found.");

View File

@ -1,48 +0,0 @@
var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
var gPluginHost = Components.classes["@mozilla.org/plugin/host;1"].getService(Components.interfaces.nsIPluginHost);
var oldBrowserOpenAddonsMgr = window.BrowserOpenAddonsMgr;
registerCleanupFunction(function* cleanup() {
clearAllPluginPermissions();
Services.prefs.clearUserPref("plugins.click_to_play");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
window.BrowserOpenAddonsMgr = oldBrowserOpenAddonsMgr;
window.focus();
});
add_task(function* test_clicking_manage_link_in_plugin_overlay_should_open_about_addons() {
Services.prefs.setBoolPref("plugins.click_to_play", true);
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_DISABLED, "Test Plug-in");
let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, gTestRoot + "plugin_test.html");
let browser = tab.linkedBrowser;
yield promiseUpdatePluginBindings(browser);
let pluginInfo = yield promiseForPluginInfo("test", browser);
is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_DISABLED,
"plugin fallback type should be PLUGIN_DISABLED");
let awaitBrowserOpenAddonsMgr = new Promise(resolve => {
window.BrowserOpenAddonsMgr = function(view) {
resolve(view);
}
});
yield ContentTask.spawn(browser, null, function* () {
let pluginNode = content.document.getElementById("test");
let manageLink = content.document.getAnonymousElementByAttribute(pluginNode, "anonid", "managePluginsLink");
let bounds = manageLink.getBoundingClientRect();
let left = (bounds.left + bounds.right) / 2;
let top = (bounds.top + bounds.bottom) / 2;
let utils = content.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
Assert.ok(true, "click on manage link");
});
let requestedView = yield awaitBrowserOpenAddonsMgr;
is(requestedView, "addons://list/plugin", "The Add-ons Manager should open the plugin view");
yield BrowserTestUtils.removeTab(tab);
});

View File

@ -200,17 +200,6 @@ var PluginHelper = {
break; break;
} }
case "PluginNotFound": {
// On devices where we don't support Flash, there will be a
// "Learn More..." link in the missing plugin error message.
let learnMoreLink = doc.getAnonymousElementByAttribute(plugin, "class", "unsupportedLearnMoreLink");
let learnMoreUrl = Services.urlFormatter.formatURLPref("app.support.baseURL");
learnMoreUrl += "mobile-flash-unsupported";
learnMoreLink.href = learnMoreUrl;
overlay.classList.add("visible");
break;
}
} }
}, },

View File

@ -2,21 +2,10 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this - 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/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!-- LOCALIZATION NOTE (unsupportedPlatform.pre): Mobile only. Flash (the only plugin available on mobile)
is not supported on some devices. Include a trailing space as needed. -->
<!ENTITY unsupportedPlatform.pre "Were very sorry, but &brandShortName; cant play Flash on this device. ">
<!-- LOCALIZATION NOTE (unsupportedPlatform.learnMore): Mobile only. This text is used to link to a SUMO page explaining why Flash is not
supported on this device. Use the unicode ellipsis char, \u2026, or use "..." if \u2026 doesnt suit traditions in your locale. -->
<!ENTITY unsupportedPlatform.learnMore "Learn More…">
<!-- LOCALIZATION NOTE (unsupportedPlatform.post): Mobile only. Include text here if needed for your locale. -->
<!ENTITY unsupportedPlatform.post "">
<!ENTITY missingPlugin "A plugin is needed to display this content.">
<!-- LOCALIZATION NOTE (tapToPlayPlugin): Mobile (used for touch interfaces) only has one type of plugin possible. --> <!-- LOCALIZATION NOTE (tapToPlayPlugin): Mobile (used for touch interfaces) only has one type of plugin possible. -->
<!ENTITY tapToPlayPlugin "Tap here to activate plugin."> <!ENTITY tapToPlayPlugin "Tap here to activate plugin.">
<!ENTITY clickToActivatePlugin "Activate plugin."> <!ENTITY clickToActivatePlugin "Activate plugin.">
<!ENTITY checkForUpdates "Check for updates…"> <!ENTITY checkForUpdates "Check for updates…">
<!ENTITY disabledPlugin "This plugin is disabled.">
<!ENTITY blockedPlugin.label "This plugin has been blocked for your protection."> <!ENTITY blockedPlugin.label "This plugin has been blocked for your protection.">
<!ENTITY hidePluginBtn.label "Hide plugin"> <!ENTITY hidePluginBtn.label "Hide plugin">
<!ENTITY managePlugins "Manage plugins…"> <!ENTITY managePlugins "Manage plugins…">

View File

@ -98,8 +98,6 @@ add_task(function*() {
pluginTab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, gHttpTestRoot + "plugin_test.html"); pluginTab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, gHttpTestRoot + "plugin_test.html");
pluginBrowser = pluginTab.linkedBrowser; pluginBrowser = pluginTab.linkedBrowser;
condition = () => PopupNotifications.getNotification("click-to-play-plugins", pluginBrowser);
yield BrowserTestUtils.waitForCondition(condition, "part7: disabled plugins still show a notification");
yield ContentTask.spawn(pluginTab.linkedBrowser, null, function*() { yield ContentTask.spawn(pluginTab.linkedBrowser, null, function*() {
let testPlugin = content.document.getElementById("test"); let testPlugin = content.document.getElementById("test");
ok(testPlugin, "part7: should have a plugin element in the page"); ok(testPlugin, "part7: should have a plugin element in the page");

View File

@ -1,18 +0,0 @@
/* 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/. */
@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
/* This binding is specified separately from the others so that Linux distros can
override the default Mozilla plugin finder service with their own mechanism. */
embed:-moz-type-unsupported,
applet:-moz-type-unsupported,
object:-moz-type-unsupported,
embed:-moz-type-unsupported-platform,
applet:-moz-type-unsupported-platform,
object:-moz-type-unsupported-platform {
display: inline-block;
overflow: hidden;
-moz-binding: url('chrome://pluginproblem/content/pluginProblem.xml#pluginProblem') !important;
}

View File

@ -31,9 +31,6 @@
<html:div class="msg msgClickToPlay" anonid="clickToPlay">&clickToActivatePlugin;</html:div> <html:div class="msg msgClickToPlay" anonid="clickToPlay">&clickToActivatePlugin;</html:div>
</html:label> </html:label>
<html:div class="msg msgUnsupported">&missingPlugin;</html:div>
<html:div class="msg msgUnsupportedPlatform">&unsupportedPlatform.pre;<html:a class="unsupportedLearnMoreLink" href="" target="_blank">&unsupportedPlatform.learnMore;</html:a>&unsupportedPlatform.post;</html:div>
<html:div class="msg msgDisabled">&disabledPlugin;</html:div>
<html:div class="msg msgBlocked">&blockedPlugin.label;</html:div> <html:div class="msg msgBlocked">&blockedPlugin.label;</html:div>
<html:div class="msg msgCrashed"> <html:div class="msg msgCrashed">
<html:div class="msgCrashedText" anonid="crashedText"><!-- set at runtime --></html:div> <html:div class="msgCrashedText" anonid="crashedText"><!-- set at runtime --></html:div>

View File

@ -4,19 +4,16 @@
@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */ @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
embed:-moz-handler-disabled,
embed:-moz-handler-blocked, embed:-moz-handler-blocked,
embed:-moz-handler-crashed, embed:-moz-handler-crashed,
embed:-moz-handler-clicktoplay, embed:-moz-handler-clicktoplay,
embed:-moz-handler-vulnerable-updatable, embed:-moz-handler-vulnerable-updatable,
embed:-moz-handler-vulnerable-no-update, embed:-moz-handler-vulnerable-no-update,
applet:-moz-handler-disabled,
applet:-moz-handler-blocked, applet:-moz-handler-blocked,
applet:-moz-handler-crashed, applet:-moz-handler-crashed,
applet:-moz-handler-clicktoplay, applet:-moz-handler-clicktoplay,
applet:-moz-handler-vulnerable-updatable, applet:-moz-handler-vulnerable-updatable,
applet:-moz-handler-vulnerable-no-update, applet:-moz-handler-vulnerable-no-update,
object:-moz-handler-disabled,
object:-moz-handler-blocked, object:-moz-handler-blocked,
object:-moz-handler-crashed, object:-moz-handler-crashed,
object:-moz-handler-clicktoplay, object:-moz-handler-clicktoplay,

View File

@ -21,22 +21,16 @@ html|applet:not([height]), html|applet[height=""] {
} }
a .mainBox, a .mainBox,
:-moz-type-unsupported .mainBox,
:-moz-type-unsupported-platform .mainBox,
:-moz-handler-clicktoplay .mainBox, :-moz-handler-clicktoplay .mainBox,
:-moz-handler-vulnerable-updatable .mainBox, :-moz-handler-vulnerable-updatable .mainBox,
:-moz-handler-vulnerable-no-update .mainBox, :-moz-handler-vulnerable-no-update .mainBox,
:-moz-handler-disabled .mainBox,
:-moz-handler-blocked .mainBox { :-moz-handler-blocked .mainBox {
-moz-user-focus: normal; -moz-user-focus: normal;
} }
a .mainBox:focus, a .mainBox:focus,
:-moz-type-unsupported .mainBox:focus,
:-moz-type-unsupported-platform .mainBox:focus,
:-moz-handler-clicktoplay .mainBox:focus, :-moz-handler-clicktoplay .mainBox:focus,
:-moz-handler-vulnerable-updatable .mainBox:focus, :-moz-handler-vulnerable-updatable .mainBox:focus,
:-moz-handler-vulnerable-no-update .mainBox:focus, :-moz-handler-vulnerable-no-update .mainBox:focus,
:-moz-handler-disabled .mainBox:focus,
:-moz-handler-blocked .mainBox:focus { :-moz-handler-blocked .mainBox:focus {
outline: 1px dotted; outline: 1px dotted;
} }
@ -93,8 +87,6 @@ a .hoverBox,
a .msgClickToPlay, a .msgClickToPlay,
a .msgTapToPlay, a .msgTapToPlay,
:-moz-type-unsupported .msgUnsupported,
:-moz-type-unsupported-platform .msgUnsupportedPlatform,
:-moz-handler-clicktoplay .msgClickToPlay, :-moz-handler-clicktoplay .msgClickToPlay,
:-moz-handler-vulnerable-updatable .msgVulnerabilityStatus, :-moz-handler-vulnerable-updatable .msgVulnerabilityStatus,
:-moz-handler-vulnerable-updatable .msgCheckForUpdates, :-moz-handler-vulnerable-updatable .msgCheckForUpdates,
@ -102,8 +94,6 @@ a .msgTapToPlay,
:-moz-handler-vulnerable-no-update .msgVulnerabilityStatus, :-moz-handler-vulnerable-no-update .msgVulnerabilityStatus,
:-moz-handler-vulnerable-no-update .msgClickToPlay, :-moz-handler-vulnerable-no-update .msgClickToPlay,
:-moz-handler-clicktoplay .msgTapToPlay, :-moz-handler-clicktoplay .msgTapToPlay,
:-moz-handler-disabled .msgDisabled,
:-moz-handler-disabled .msgManagePlugins,
:-moz-handler-blocked .msgBlocked, :-moz-handler-blocked .msgBlocked,
:-moz-handler-crashed .msgCrashed { :-moz-handler-crashed .msgCrashed {
display: block; display: block;

View File

@ -1,2 +1 @@
category agent-style-sheets pluginGlue-pluginFinder chrome://pluginproblem/content/pluginFinderBinding.css
category agent-style-sheets pluginGlue-pluginProblem chrome://pluginproblem/content/pluginProblemBinding.css category agent-style-sheets pluginGlue-pluginProblem chrome://pluginproblem/content/pluginProblemBinding.css

View File

@ -52,7 +52,4 @@ toolkit.jar:
skin/classic/mozapps/plugins/contentPluginBlocked.png (mozapps/plugins/contentPluginBlocked.png) skin/classic/mozapps/plugins/contentPluginBlocked.png (mozapps/plugins/contentPluginBlocked.png)
skin/classic/mozapps/plugins/contentPluginClose.png (mozapps/plugins/contentPluginClose.png) skin/classic/mozapps/plugins/contentPluginClose.png (mozapps/plugins/contentPluginClose.png)
skin/classic/mozapps/plugins/contentPluginCrashed.png (mozapps/plugins/contentPluginCrashed.png) skin/classic/mozapps/plugins/contentPluginCrashed.png (mozapps/plugins/contentPluginCrashed.png)
skin/classic/mozapps/plugins/contentPluginDisabled.png (mozapps/plugins/contentPluginDisabled.png)
skin/classic/mozapps/plugins/contentPluginDownload.png (mozapps/plugins/contentPluginDownload.png)
skin/classic/mozapps/plugins/contentPluginMissing.png (mozapps/plugins/contentPluginMissing.png)
skin/classic/mozapps/plugins/contentPluginStripe.png (mozapps/plugins/contentPluginStripe.png) skin/classic/mozapps/plugins/contentPluginStripe.png (mozapps/plugins/contentPluginStripe.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -63,13 +63,6 @@ html|a {
margin-bottom: 6px; margin-bottom: 6px;
} }
:-moz-type-unsupported .icon,
:-moz-type-unsupported-platform .icon {
background-image: url(chrome://mozapps/skin/plugins/contentPluginMissing.png);
}
:-moz-type-unsupported .icon[installable] {
background-image: url(chrome://mozapps/skin/plugins/contentPluginDownload.png);
}
:-moz-handler-vulnerable-updatable .icon, :-moz-handler-vulnerable-updatable .icon,
:-moz-handler-vulnerable-no-update .icon { :-moz-handler-vulnerable-no-update .icon {
background-image: url(chrome://mozapps/skin/plugins/contentPluginBlocked.png); background-image: url(chrome://mozapps/skin/plugins/contentPluginBlocked.png);
@ -82,9 +75,6 @@ html|a {
background-image: url(chrome://mozapps/skin/plugins/contentPluginActivate.png); background-image: url(chrome://mozapps/skin/plugins/contentPluginActivate.png);
-moz-user-focus: normal; -moz-user-focus: normal;
} }
:-moz-handler-disabled .icon {
background-image: url(chrome://mozapps/skin/plugins/contentPluginDisabled.png);
}
:-moz-handler-crashed .icon { :-moz-handler-crashed .icon {
background-image: url(chrome://mozapps/skin/plugins/contentPluginCrashed.png); background-image: url(chrome://mozapps/skin/plugins/contentPluginCrashed.png);
} }

View File

@ -25,7 +25,4 @@
skin/classic/mozapps/plugins/contentPluginBlocked.png (../../shared/plugins/contentPluginBlocked.png) skin/classic/mozapps/plugins/contentPluginBlocked.png (../../shared/plugins/contentPluginBlocked.png)
skin/classic/mozapps/plugins/contentPluginClose.png (../../shared/plugins/contentPluginClose.png) skin/classic/mozapps/plugins/contentPluginClose.png (../../shared/plugins/contentPluginClose.png)
skin/classic/mozapps/plugins/contentPluginCrashed.png (../../shared/plugins/contentPluginCrashed.png) skin/classic/mozapps/plugins/contentPluginCrashed.png (../../shared/plugins/contentPluginCrashed.png)
skin/classic/mozapps/plugins/contentPluginDisabled.png (../../shared/plugins/contentPluginDisabled.png)
skin/classic/mozapps/plugins/contentPluginDownload.png (../../shared/plugins/contentPluginDownload.png)
skin/classic/mozapps/plugins/contentPluginMissing.png (../../shared/plugins/contentPluginMissing.png)
skin/classic/mozapps/plugins/contentPluginStripe.png (../../shared/plugins/contentPluginStripe.png) skin/classic/mozapps/plugins/contentPluginStripe.png (../../shared/plugins/contentPluginStripe.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -83,9 +83,6 @@ a .icon,
background-image: url(chrome://mozapps/skin/plugins/contentPluginActivate.png); background-image: url(chrome://mozapps/skin/plugins/contentPluginActivate.png);
-moz-user-focus: normal; -moz-user-focus: normal;
} }
:-moz-handler-disabled .icon {
background-image: url(chrome://mozapps/skin/plugins/contentPluginDisabled.png);
}
:-moz-handler-crashed .icon { :-moz-handler-crashed .icon {
background-image: url(chrome://mozapps/skin/plugins/contentPluginCrashed.png); background-image: url(chrome://mozapps/skin/plugins/contentPluginCrashed.png);
} }