Bug 1497087 Remove eula support from addons manager r=Gijs,aswan

Differential Revision: https://phabricator.services.mozilla.com/D8149

--HG--
extra : rebase_source : 906a5e7e38ba1293002579e699425c7410601d92
extra : source : 2d0174d68cec998537cb529f688c96cfa729a892
This commit is contained in:
Collin Wing 2018-10-19 21:52:20 +00:00
parent e6bea07157
commit 795a861aad
11 changed files with 4 additions and 174 deletions

View File

@ -13,7 +13,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=292789
<p id="display"></p>
<div id="content" style="display: none">
<script src="chrome://global/content/treeUtils.js"></script>
<script type="application/javascript" src="chrome://mozapps/content/extensions/eula.js"></script>
<script type="application/javascript" src="chrome://mozapps/content/extensions/blocklist.js"></script>
<script id="resjs" type="application/javascript"></script>
</div>
<pre id="test">
@ -45,12 +45,12 @@ function testScriptSrc(aCallback) {
**/
var resjs = document.getElementById("resjs");
resjs.onload = scriptOnload;
resjs.src = "resource://gre/chrome/toolkit/content/mozapps/extensions/eula.js";
resjs.src = "resource://gre/chrome/toolkit/content/mozapps/extensions/blocklist.js";
document.getElementById("content").appendChild(resjs);
function scriptOnload() {
is(typeof Startup, "function",
"extensions.js has not moved unexpectedly");
is(typeof init, "function",
"blocklist.js has not moved unexpectedly");
// trigger the callback
if (aCallback)

View File

@ -128,11 +128,6 @@
<!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…">

View File

@ -91,9 +91,6 @@ 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

View File

@ -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;
}

View File

@ -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>

View File

@ -436,17 +436,6 @@
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");

View File

@ -15,8 +15,6 @@ toolkit.jar:
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)

View File

@ -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;
}

View File

@ -13,7 +13,6 @@ toolkit.jar:
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)

View File

@ -39,7 +39,6 @@
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)

View File

@ -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;
}