Bug 1588867 - Remove support for the carbon plugin api in SeaMonkey. r=IanN a=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Sun, 20 Oct 2019 19:16:52 +0200
changeset 32340 12d79f02f34aeb2e2172a9a226de69c5b4bb0208
parent 32339 b71fa9ec6a48eed6fca505fbe4c744c4a6e7bfea
child 32341 726f4cc0e25ea45b2f161bda2644aeea522ba3f2
push id223
push userfrgrahl@gmx.net
push dateSun, 20 Oct 2019 17:30:42 +0000
treeherdercomm-esr60@726f4cc0e25e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1588867, 850925
Bug 1588867 - Remove support for the carbon plugin api in SeaMonkey. r=IanN a=IanN Port Bug 850925 "Remove front-end UI for unused npapi-carbon-event-model-failure plugin error".
suite/app/profile/suite-prefs.js
suite/components/bindings/notification.xml
suite/locales/en-US/chrome/common/notification.properties
suite/themes/classic/communicator/communicator.css
suite/themes/classic/linux/communicator/communicator.css
suite/themes/classic/mac/communicator/communicator.css
suite/themes/modern/communicator/communicator.css
--- a/suite/app/profile/suite-prefs.js
+++ b/suite/app/profile/suite-prefs.js
@@ -765,17 +765,16 @@ pref("dom.ipc.plugins.nativeCursorSuppor
 pref("dom.ipc.plugins.enabled", true);
 #endif
 
 // plugin finder service url
 pref("pfs.datasource.url", "https://pfs.mozilla.org/plugins/PluginFinderService.php?mimetype=%PLUGIN_MIMETYPE%&appID=%APP_ID%&appVersion=%APP_VERSION%&clientOS=%CLIENT_OS%&chromeLocale=%CHROME_LOCALE%");
 pref("plugins.update.url", "https://www.mozilla.org/%LOCALE%/plugincheck/");
 pref("plugins.update.notifyUser", false);
 pref("plugins.hide_infobar_for_outdated_plugin", false);
-pref("plugins.hide_infobar_for_carbon_failure_plugin", false);
 pref("plugins.hide_infobar_for_missing_plugin", false);
 pref("plugins.click_to_play", true);
 pref("plugin.disable", false);
 
 // Digital Rights Management, Encrypted Media Extensions
 pref("media.eme.enabled", false);
 
 // Turn off WebRTC by default (bug 1419507)
--- a/suite/components/bindings/notification.xml
+++ b/suite/components/bindings/notification.xml
@@ -471,25 +471,16 @@
                   if (!Services.prefs.getBoolPref(aData))
                     return;
 
                   var outdatedNotification = this.getNotificationWithValue("outdated-plugins");
                   if (outdatedNotification)
                     this.removeNotification(outdatedNotification);
                 }
 
-                if (aData == "plugins.hide_infobar_for_carbon_failure_plugin") {
-                  if (!Services.prefs.getBoolPref(aData))
-                    return;
-
-                  var carbonfailureNotification = this.getNotificationWithValue("carbon-failure-plugins");
-                  if (carbonfailureNotification)
-                    this.removeNotification(carbonfailureNotification);
-                }
-
                 if (aData == "plugins.hide_infobar_for_missing_plugin") {
                   if (!Services.prefs.getBoolPref(aData))
                     return;
 
                   var missingNotification = this.getNotificationWithValue("missing-plugins");
                   if (missingNotification)
                     this.removeNotification(missingNotification);
 
@@ -602,17 +593,16 @@
             if (Services.prefs.getBoolPref(aPref || "plugins.hide_infobar_for_missing_plugin"))
               return;
 
             var notification;
             var notifications = [
               "blocked-plugins",
               "disabled-plugins",
               "missing-plugins",
-              "carbon-failure-plugins",
               "outdated-plugins",
             ];
 
             // Remove lower priority notifications.
             for (var i = 0; notifications[i] != aNotification; i++) {
               notification = this.getNotificationWithValue(notifications[i]);
               if (notification)
                 notification.close();
@@ -1893,17 +1883,16 @@
           Services.obs.addObserver(this, "addon-install-disabled");
           Services.obs.addObserver(this, "addon-install-failed");
           Services.obs.addObserver(this, "addon-install-started");
           Services.obs.addObserver(this, "offline-cache-update-completed");
           Services.obs.addObserver(this, "perm-changed");
           Services.obs.addObserver(this, "formsubmit");
 
           Services.prefs.addObserver("plugins.hide_infobar_for_outdated_plugin", this);
-          Services.prefs.addObserver("plugins.hide_infobar_for_carbon_failure_plugin", this);
           Services.prefs.addObserver("plugins.hide_infobar_for_missing_plugin", this);
           Services.prefs.addObserver("privacy.popups.showBrowserMessage", this);
           Services.prefs.addObserver("dom.disable_open_during_load", this);
 
           this.addProgressListener();
 
           if ("nsICrashReporter" in Ci)
             ChromeUtils.import("resource://gre/modules/CrashSubmit.jsm", this);
@@ -1966,19 +1955,16 @@
             try {
               Services.obs.removeObserver(this, "formsubmit");
             } catch (ex) {}
 
             try {
               Services.prefs.removeObserver("plugins.hide_infobar_for_outdated_plugin", this);
             } catch (ex) {}
             try {
-              Services.prefs.removeObserver("plugins.hide_infobar_for_carbon_failure_plugin", this);
-            } catch (ex) {}
-            try {
               Services.prefs.removeObserver("plugins.hide_infobar_for_missing_plugin", this);
             } catch (ex) {}
             try {
               Services.prefs.removeObserver("privacy.popups.showBrowserMessage", this);
             } catch (ex) {}
             try {
               Services.prefs.removeObserver("dom.disable_open_during_load", this);
             } catch (ex) {}
@@ -2271,65 +2257,16 @@
             // If another plugin on the page was large enough to show our UI, we don't
             // want to show a notification bar.
             if (!this.crashNotified)
               this.showPluginCrashedNotification(pluginDumpID, browserDumpID, messageString);
           }
         ]]>
       </handler>
 
-      <handler event="npapi-carbon-event-model-failure" phase="capturing">
-        <![CDATA[
-          var plugin = event.target;
-          // Force a style flush, so that we ensure our binding is attached.
-          plugin.clientTop;
-
-          function callback() {
-            // Notify all windows that an application quit has been requested.
-            var cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
-                               .createInstance(Ci.nsISupportsPRBool);
-            Services.obs.notifyObservers(cancelQuit,
-                                         "quit-application-requested");
-
-            // Something aborted the quit process.
-            if (cancelQuit.data)
-              return;
-
-            var nsIAppStartup = Ci.nsIAppStartup;
-            Cc["@mozilla.org/toolkit/app-startup;1"]
-              .getService(nsIAppStartup)
-              .quit(nsIAppStartup.eAttemptQuit |
-                            nsIAppStartup.eRestart |
-                            nsIAppStartup.eRestarti386);
-          }
-
-          var notification = "carbon-failure-plugins";
-          var pref = "plugins.hide_infobar_for_carbon_failure_plugin";
-          if ("@mozilla.org/xpcom/mac-utils;1" in Cc &&
-              !Cc["@mozilla.org/xpcom/mac-utils;1"]
-                 .getService(Ci.nsIMacUtils)
-                 .isUniversalBinary) {
-            pref = null;
-            notification = "missing-plugins";
-            callback = this.openURLPref.bind(this, "plugins.update.url");
-          }
-
-          var prefix = notification.replace(/-/g, "");
-          var message = this._stringBundle.GetStringFromName(prefix + "Message.title");
-          var buttons = [{
-            label: this._stringBundle.GetStringFromName(prefix + "Message.button.label"),
-            accessKey: this._stringBundle.GetStringFromName(prefix + "Message.button.accesskey"),
-            popup: null,
-            callback: callback
-          }];
-
-          this.pluginUnavailable(plugin, notification, message, buttons, pref);
-        ]]>
-      </handler>
-
       <handler event="MozApplicationManifest" phase="capturing">
         <![CDATA[
           if (!Services.prefs.getBoolPref("browser.offline-apps.notify"))
             return;
 
           try {
             if (Services.prefs.getBoolPref("offline-apps.allow_by_default"))
               return;
--- a/suite/locales/en-US/chrome/common/notification.properties
+++ b/suite/locales/en-US/chrome/common/notification.properties
@@ -1,25 +1,16 @@
 # 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/.
 
 outdatedpluginsMessage.title=Some plugins used by this page are out of date.
 outdatedpluginsMessage.button.label=Update Plugins…
 outdatedpluginsMessage.button.accesskey=U
 
-# LOCALIZATION NOTE (carbonfailurepluginsMessage.title):
-# The English form of this string used to use the word "requires" but it was
-# later thought that this word felt too aggressive and we now use "requests".
-# Localizers can use use a word corresponding to "requests" or "requires"
-# or both, depending on what matches the language best.
-carbonfailurepluginsMessage.title=This page requests a plugin that can only run in 32-bit mode.
-carbonfailurepluginsMessage.button.label=Restart in 32-bit mode
-carbonfailurepluginsMessage.button.accesskey=R
-
 missingpluginsMessage.title=Additional plugins are required to display all the media on this page.
 missingpluginsMessage.button.label=Preferences
 missingpluginsMessage.button.accesskey=P
 
 blockedpluginsMessage.title=Some plugins required by this page have been blocked for your protection.
 blockedpluginsMessage.infoButton.label=Details…
 blockedpluginsMessage.infoButton.accesskey=D
 
--- a/suite/themes/classic/communicator/communicator.css
+++ b/suite/themes/classic/communicator/communicator.css
@@ -156,17 +156,16 @@ treecols:-moz-lwtheme {
 
 /* ::::: notification bars ::::: */
 
 .messageImage[value="refresh-blocked"] {
   list-style-image: url("chrome://communicator/skin/icons/application.png");
 }
 
 .messageImage[value="blocked-plugins"],
-.messageImage[value="carbon-failure-plugins"],
 .messageImage[value="disabled-plugins"],
 .messageImage[value="missing-plugins"],
 .messageImage[value="outdated-plugins"],
 .messageImage[value="click-to-play-plugins"],
 .messageImage[value="plugin-crashed"] {
   list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric-16.png");
 }
 
--- a/suite/themes/classic/linux/communicator/communicator.css
+++ b/suite/themes/classic/linux/communicator/communicator.css
@@ -170,17 +170,16 @@ treecols:-moz-lwtheme {
 
 /* ::::: notification bars ::::: */
 
 .messageImage[value="refresh-blocked"] {
   list-style-image: url("chrome://communicator/skin/icons/application.png");
 }
 
 .messageImage[value="blocked-plugins"],
-.messageImage[value="carbon-failure-plugins"],
 .messageImage[value="disabled-plugins"],
 .messageImage[value="missing-plugins"],
 .messageImage[value="outdated-plugins"],
 .messageImage[value="click-to-play-plugins"],
 .messageImage[value="plugin-crashed"] {
   list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric-16.png");
 }
 
--- a/suite/themes/classic/mac/communicator/communicator.css
+++ b/suite/themes/classic/mac/communicator/communicator.css
@@ -166,17 +166,16 @@ treecols:-moz-lwtheme {
 
 /* ::::: notification bars ::::: */
 
 .messageImage[value="refresh-blocked"] {
   list-style-image: url("chrome://communicator/skin/icons/application.png");
 }
 
 .messageImage[value="blocked-plugins"],
-.messageImage[value="carbon-failure-plugins"],
 .messageImage[value="disabled-plugins"],
 .messageImage[value="missing-plugins"],
 .messageImage[value="outdated-plugins"],
 .messageImage[value="click-to-play-plugins"],
 .messageImage[value="plugin-crashed"] {
   list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric-16.png");
 }
 
--- a/suite/themes/modern/communicator/communicator.css
+++ b/suite/themes/modern/communicator/communicator.css
@@ -118,17 +118,16 @@ toolbar[iconsize="small"] > #print-butto
 
 /* ::::: notification bars ::::: */
 
 .messageImage[value="refresh-blocked"] {
   list-style-image: url("chrome://communicator/skin/icons/application.png");
 }
 
 .messageImage[value="blocked-plugins"],
-.messageImage[value="carbon-failure-plugins"],
 .messageImage[value="disabled-plugins"],
 .messageImage[value="missing-plugins"],
 .messageImage[value="outdated-plugins"],
 .messageImage[value="click-to-play-plugins"],
 .messageImage[value="plugin-crashed"] {
   list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric-16.png");
 }