Bug 1497087 Remove eula support from addons manager r=Gijs,aswan
☠☠ backed out by c141c2c31ca1 ☠ ☠
authorCollin Wing <masterkrombi@gmail.com>
Fri, 19 Oct 2018 21:52:20 +0000
changeset 490781 2d0174d68cec998537cb529f688c96cfa729a892
parent 490780 178100c1204ca777a4d263f6d92dfca94333570a
child 490782 7f6a5b37d2ca21ea84379c6edf675f15b99d4e5e
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersGijs, aswan
bugs1497087
milestone64.0a1
Bug 1497087 Remove eula support from addons manager r=Gijs,aswan Differential Revision: https://phabricator.services.mozilla.com/D8149
toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
toolkit/mozapps/extensions/content/eula.js
toolkit/mozapps/extensions/content/eula.xul
toolkit/mozapps/extensions/content/extensions.xml
toolkit/mozapps/extensions/jar.mn
toolkit/themes/osx/mozapps/extensions/eula.css
toolkit/themes/osx/mozapps/jar.mn
toolkit/themes/shared/non-mac.jar.inc.mn
toolkit/themes/windows/mozapps/extensions/eula.css
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
+++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
@@ -192,21 +192,16 @@
 <!ENTITY addon.updateAvailable.label          "An update is available">
 <!ENTITY addon.checkingForUpdates.label       "Checking for updates…">
 <!ENTITY addon.releaseNotes.label             "Release Notes:">
 <!ENTITY addon.loadingReleaseNotes.label      "Loading…">
 <!ENTITY addon.errorLoadingReleaseNotes.label "Sorry, but there was an error loading the release notes.">
 
 <!ENTITY addon.createdBy.label                "By ">
 
-<!ENTITY eula.title                           "End-User License Agreement">
-<!ENTITY eula.width                           "560px">
-<!ENTITY eula.height                          "400px">
-<!ENTITY eula.accept                          "Accept and Install…">
-
 <!ENTITY settings.path.button.label           "Browse…">
 
 <!ENTITY setting.learnmore "Learn More…">
 
 <!ENTITY disabledUnsigned.heading "Some add-ons have been disabled">
 <!-- LOCALIZATION NOTE (disabledUnsigned.description.start, disabledUnsigned.description.findAddonsLink, disabledUnsigned.description.end):
      These entities form a sentence, with
      disabledUnsigned.description.findAddonsLink being a link to an external site. -->
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
+++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
@@ -86,19 +86,16 @@ details.notification.gmpPending=%1$S wil
 
 installFromFile.dialogTitle=Select add-on to install
 installFromFile.filterName=Add-ons
 
 uninstallAddonTooltip=Uninstall this add-on
 enableAddonTooltip=Enable this add-on
 disableAddonTooltip=Disable this add-on
 
-#LOCALIZATION NOTE (eulaHeader) %S is name of the add-on asking the user to agree to the EULA
-eulaHeader=%S requires that you accept the following End User License Agreement before installation can proceed:
-
 type.extension.name=Extensions
 type.themes.name=Themes
 type.locale.name=Languages
 type.plugin.name=Plugins
 type.dictionary.name=Dictionaries
 type.service.name=Services
 type.legacy.name=Legacy Extensions
 type.unsupported.name=Unsupported
deleted file mode 100644
--- a/toolkit/mozapps/extensions/content/eula.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
-
-/* 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/. */
-
-"use strict";
-
-/* exported Startup */
-
-ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
-
-function Startup() {
-  var bundle = document.getElementById("extensionsStrings");
-  var addon = window.arguments[0].addon;
-
-  document.documentElement.setAttribute("addontype", addon.type);
-
-  var iconURL = AddonManager.getPreferredIconURL(addon, 48, window);
-  if (iconURL)
-    document.getElementById("icon").src = iconURL;
-
-  var label = document.createTextNode(bundle.getFormattedString("eulaHeader", [addon.name]));
-  document.getElementById("heading").appendChild(label);
-  document.getElementById("eula").value = addon.eula;
-}
deleted file mode 100644
--- a/toolkit/mozapps/extensions/content/eula.xul
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.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/. -->
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://mozapps/skin/extensions/eula.css" type="text/css"?>
-
-<!DOCTYPE window [
-<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
-%brandDTD;
-<!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/extensions.dtd">
-%extensionsDTD;
-]>
-
-<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        title="&eula.title;" width="&eula.width;" height="&eula.height;"
-        buttons="accept,cancel" buttonlabelaccept="&eula.accept;"
-        ondialogaccept="window.arguments[0].accepted = true"
-        onload="Startup();">
-
-  <script type="application/javascript" src="chrome://mozapps/content/extensions/eula.js"/>
-  
-  <stringbundleset id="extensionsSet">
-    <stringbundle id="extensionsStrings" src="chrome://mozapps/locale/extensions/extensions.properties"/>
-  </stringbundleset>
-
-  <hbox id="heading-container">
-    <image id="icon"/>
-    <label id="heading" flex="1"/>
-  </hbox>
-  
-  <textbox id="eula" multiline="true" readonly="true" flex="1"/>
-</dialog>
--- a/toolkit/mozapps/extensions/content/extensions.xml
+++ b/toolkit/mozapps/extensions/content/extensions.xml
@@ -431,27 +431,16 @@
         ]]></body>
       </method>
 
       <method name="installRemote">
         <body><![CDATA[
           if (this.mControl.getAttribute("remote") != "true")
             return;
 
-          if (this.mControl.mAddon.eula) {
-            var data = {
-              addon: this.mControl.mAddon,
-              accepted: false,
-            };
-            window.openDialog("chrome://mozapps/content/extensions/eula.xul", "_blank",
-                              "chrome,dialog,modal,centerscreen,resizable=no", data);
-            if (!data.accepted)
-              return;
-          }
-
           delete this.mControl.mAddon;
           this.mControl.mInstall = this.mInstall;
           this.mControl.setAttribute("status", "installing");
           let prompt = Services.prefs.getBoolPref("extensions.webextPermissionPrompts", false);
           if (prompt) {
             this.mInstall.promptHandler = info => new Promise((resolve, reject) => {
               // Skip prompts for non-webextensions
               if (!info.addon.userPermissions) {
--- a/toolkit/mozapps/extensions/jar.mn
+++ b/toolkit/mozapps/extensions/jar.mn
@@ -10,14 +10,12 @@ toolkit.jar:
   content/mozapps/extensions/extensions.css                     (content/extensions.css)
   content/mozapps/extensions/extensions.js                      (content/extensions.js)
 * content/mozapps/extensions/extensions.xml                     (content/extensions.xml)
   content/mozapps/extensions/updateinfo.xsl                     (content/updateinfo.xsl)
   content/mozapps/extensions/blocklist.xul                      (content/blocklist.xul)
   content/mozapps/extensions/blocklist.js                       (content/blocklist.js)
   content/mozapps/extensions/blocklist.css                      (content/blocklist.css)
   content/mozapps/extensions/blocklist.xml                      (content/blocklist.xml)
-  content/mozapps/extensions/eula.xul                           (content/eula.xul)
-  content/mozapps/extensions/eula.js                            (content/eula.js)
   content/mozapps/extensions/pluginPrefs.xul                    (content/pluginPrefs.xul)
   content/mozapps/extensions/pluginPrefs.js                     (content/pluginPrefs.js)
   content/mozapps/extensions/OpenH264-license.txt               (content/OpenH264-license.txt)
 #endif
deleted file mode 100644
--- a/toolkit/themes/osx/mozapps/extensions/eula.css
+++ /dev/null
@@ -1,43 +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/. */
-
-#icon {
-  list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.svg");
-  max-width: 48px;
-  max-height: 48px;
-  margin-inline-end: 6px;
-}
-
-#eula-dialog[addontype="theme"] #icon {
-  list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.svg");
-}
-
-#eula-dialog[addontype="locale"] #icon {
-  list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.svg");
-}
-
-#eula-dialog[addontype="plugin"] #icon {
-  list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.svg");
-}
-
-#eula-dialog[addontype="dictionary"] #icon {
-  list-style-image: url("chrome://mozapps/skin/extensions/dictionaryGeneric.svg");
-}
-
-#heading-container {
-  -moz-box-align: center;
-}
-
-#heading {
-  font-size: 120%;
-}
-
-#eula {
-  -moz-appearance: none;
-  color: -moz-FieldText;
-  background-color: -moz-Field;
-  margin: 1em;
-  border: 1px solid ActiveBorder;
-}
-
--- a/toolkit/themes/osx/mozapps/jar.mn
+++ b/toolkit/themes/osx/mozapps/jar.mn
@@ -8,15 +8,14 @@ toolkit.jar:
   skin/classic/mozapps/downloads/unknownContentType.css           (downloads/unknownContentType.css)
   skin/classic/mozapps/extensions/discover-logo.png               (extensions/discover-logo.png)
   skin/classic/mozapps/extensions/rating-won.png                  (extensions/rating-won.png)
   skin/classic/mozapps/extensions/rating-not-won.png              (extensions/rating-not-won.png)
   skin/classic/mozapps/extensions/cancel.png                      (extensions/cancel.png)
   skin/classic/mozapps/extensions/toolbarbutton-dropmarker.png    (extensions/toolbarbutton-dropmarker.png)
   skin/classic/mozapps/extensions/heart.png                       (extensions/heart.png)
 * skin/classic/mozapps/extensions/extensions.css                  (extensions/extensions.css)
-  skin/classic/mozapps/extensions/eula.css                        (extensions/eula.css)
   skin/classic/mozapps/extensions/blocklist.css                   (extensions/blocklist.css)
   skin/classic/mozapps/plugins/pluginHelp-16.png                  (plugins/pluginHelp-16.png)
   skin/classic/mozapps/profile/profileSelection.css               (profile/profileSelection.css)
   skin/classic/mozapps/update/buttons.png                         (update/buttons.png)
 * skin/classic/mozapps/update/updates.css                         (update/updates.css)
   skin/classic/mozapps/handling/handling.css                      (handling/handling.css)
--- a/toolkit/themes/shared/non-mac.jar.inc.mn
+++ b/toolkit/themes/shared/non-mac.jar.inc.mn
@@ -34,15 +34,14 @@
 
   skin/classic/mozapps/downloads/downloadButtons.png         (../../windows/mozapps/downloads/downloadButtons.png)
   skin/classic/mozapps/downloads/unknownContentType.css      (../../windows/mozapps/downloads/unknownContentType.css)
   skin/classic/mozapps/extensions/blocklist.css              (../../windows/mozapps/extensions/blocklist.css)
   skin/classic/mozapps/extensions/discover-logo.png          (../../windows/mozapps/extensions/discover-logo.png)
   skin/classic/mozapps/extensions/rating-won.png             (../../windows/mozapps/extensions/rating-won.png)
   skin/classic/mozapps/extensions/rating-not-won.png         (../../windows/mozapps/extensions/rating-not-won.png)
   skin/classic/mozapps/extensions/cancel.png                 (../../windows/mozapps/extensions/cancel.png)
-  skin/classic/mozapps/extensions/eula.css                   (../../windows/mozapps/extensions/eula.css)
   skin/classic/mozapps/handling/handling.css                 (../../windows/mozapps/handling/handling.css)
   skin/classic/mozapps/plugins/pluginHelp-16.png             (../../windows/mozapps/plugins/pluginHelp-16.png)
   skin/classic/mozapps/profile/profileSelection.css          (../../windows/mozapps/profile/profileSelection.css)
   skin/classic/mozapps/update/downloadButtons.png            (../../windows/mozapps/update/downloadButtons.png)
 
 % override chrome://mozapps/skin/xpinstall/xpinstallItemGeneric.png       chrome://mozapps/skin/extensions/extensionGeneric.svg
deleted file mode 100644
--- a/toolkit/themes/windows/mozapps/extensions/eula.css
+++ /dev/null
@@ -1,43 +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/. */
-
-#icon {
-  list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.svg");
-  max-width: 48px;
-  max-height: 48px;
-  margin-inline-end: 6px;
-}
-
-#eula-dialog[addontype="theme"] #icon {
-  list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.svg");
-}
-
-#eula-dialog[addontype="locale"] #icon {
-  list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.svg");
-}
-
-#eula-dialog[addontype="plugin"] #icon {
-  list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.svg");
-}
-
-#eula-dialog[addontype="dictionary"] #icon {
-  list-style-image: url("chrome://mozapps/skin/extensions/dictionaryGeneric.svg");
-}
-
-#heading-container {
-  -moz-box-align: center;
-}
-
-#heading {
-  font-size: 120%;
-}
-
-#eula {
-  -moz-appearance: none;
-  color: -moz-FieldText;
-  background-color: -moz-Field;
-  margin: 1em;
-  border: 1px solid ActiveBorder;
-}
-