зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 3 changesets (bug 1354682) for sessionstore browser-chrome bustage
CLOSED TREE Backed out changeset 55405fd328f9 (bug 1354682) Backed out changeset 56b8122e64a3 (bug 1354682) Backed out changeset 9374009a95e5 (bug 1354682) MozReview-Commit-ID: BNVhwID8NwD
This commit is contained in:
Родитель
b9b730fd1f
Коммит
f8d5e6ddf9
|
@ -85,9 +85,6 @@ pref("extensions.geckoProfiler.getSymbolRules", "localBreakpad,remoteBreakpad");
|
|||
pref("extensions.webextensions.base-content-security-policy", "script-src 'self' https://* moz-extension: blob: filesystem: 'unsafe-eval' 'unsafe-inline'; object-src 'self' https://* moz-extension: blob: filesystem:;");
|
||||
pref("extensions.webextensions.default-content-security-policy", "script-src 'self'; object-src 'self';");
|
||||
|
||||
// Extensions that should not be flagged as legacy in about:addons
|
||||
pref("extensions.legacy.exceptions", "{972ce4c6-7e08-4474-a285-3208198ce6fd},testpilot@cliqz.com,@testpilot-containers,jid1-NeEaf3sAHdKHPA@jetpack,@activity-streams,pulse@mozilla.com,@testpilot-addon,@min-vid,tabcentertest1@mozilla.com,snoozetabs@mozilla.com,speaktome@mozilla.com,hoverpad@mozilla.com");
|
||||
|
||||
// Require signed add-ons by default
|
||||
pref("xpinstall.signatures.required", true);
|
||||
pref("xpinstall.signatures.devInfoURL", "https://wiki.mozilla.org/Addons/Extension_Signing");
|
||||
|
|
|
@ -299,16 +299,11 @@ this.XPCOMUtils = {
|
|||
* @param aOnUpdate
|
||||
* A function to call upon update. Receives as arguments
|
||||
* `(aPreference, previousValue, newValue)`
|
||||
* @param aTransform
|
||||
* An optional function to transform the value. If provided,
|
||||
* this function receives the new preference value as an argument
|
||||
* and its return value is used by the getter.
|
||||
*/
|
||||
defineLazyPreferenceGetter: function XPCU_defineLazyPreferenceGetter(
|
||||
aObject, aName, aPreference,
|
||||
aDefaultValue = null,
|
||||
aOnUpdate = null,
|
||||
aTransform = val => val)
|
||||
aOnUpdate = null)
|
||||
{
|
||||
// Note: We need to keep a reference to this observer alive as long
|
||||
// as aObject is alive. This means that all of our getters need to
|
||||
|
@ -328,7 +323,7 @@ this.XPCOMUtils = {
|
|||
// Fetch and cache value.
|
||||
this.value = undefined;
|
||||
let latest = lazyGetter();
|
||||
aOnUpdate.apply(aObject, data, previous, latest);
|
||||
aOnUpdate(data, previous, latest);
|
||||
} else {
|
||||
|
||||
// Empty cache, next call to the getter will cause refetch.
|
||||
|
@ -348,7 +343,7 @@ this.XPCOMUtils = {
|
|||
|
||||
function lazyGetter() {
|
||||
if (observer.value === undefined) {
|
||||
observer.value = aTransform(Preferences.get(aPreference, aDefaultValue));
|
||||
observer.value = Preferences.get(aPreference, aDefaultValue);
|
||||
}
|
||||
return observer.value;
|
||||
}
|
||||
|
|
|
@ -151,18 +151,6 @@ add_test(function test_defineLazyPreferenceGetter()
|
|||
|
||||
equal(obj.pref, "defaultValue", "Should return default value after pref is reset");
|
||||
|
||||
obj = {};
|
||||
XPCOMUtils.defineLazyPreferenceGetter(obj, "pref", PREF, "a,b",
|
||||
null, value => value.split(","));
|
||||
|
||||
deepEqual(obj.pref, ["a", "b"], "transform is applied to default value");
|
||||
|
||||
Preferences.set(PREF, "x,y,z");
|
||||
deepEqual(obj.pref, ["x", "y", "z"], "transform is applied to updated value");
|
||||
|
||||
Preferences.reset(PREF);
|
||||
deepEqual(obj.pref, ["a", "b"], "transform is applied to reset default");
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
|
|
|
@ -188,10 +188,6 @@
|
|||
<!ENTITY addon.details.label "More">
|
||||
<!ENTITY addon.details.tooltip "Show more details about this add-on">
|
||||
<!ENTITY addon.unknownDate "Unknown">
|
||||
<!-- LOCALIZATION NOTE (addon.legacy.label): This appears in a badge next
|
||||
to the add-on name for extensions that are not webextensions, which
|
||||
will stop working in Firefox 57. -->
|
||||
<!ENTITY addon.legacy.label "LEGACY">
|
||||
<!-- LOCALIZATION NOTE (addon.disabled.postfix): This is used in a normal list
|
||||
to signify that an add-on is disabled, in the form
|
||||
"<Addon name> <1.0> (disabled)" -->
|
||||
|
|
|
@ -157,14 +157,12 @@ setting[type="menulist"] {
|
|||
.addon[active="true"] .disabled-postfix,
|
||||
.addon[pending="install"] .update-postfix,
|
||||
.addon[pending="install"] .disabled-postfix,
|
||||
.addon[legacy="false"] .legacy-warning,
|
||||
#detail-view:not([notification="warning"]) .warning,
|
||||
#detail-view:not([notification="error"]) .error,
|
||||
#detail-view:not([notification="info"]) .info,
|
||||
#detail-view:not([pending]) .pending,
|
||||
#detail-view:not([upgrade="true"]) .update-postfix,
|
||||
#detail-view[active="true"] .disabled-postfix,
|
||||
#detail-view[legacy="false"] .legacy-warning,
|
||||
#detail-view[loading] .detail-view-container,
|
||||
#detail-view:not([loading]) .alert-container,
|
||||
.detail-row:not([value]),
|
||||
|
|
|
@ -56,7 +56,6 @@ const PREF_GETADDONS_CACHE_ENABLED = "extensions.getAddons.cache.enabled";
|
|||
const PREF_GETADDONS_CACHE_ID_ENABLED = "extensions.%ID%.getAddons.cache.enabled";
|
||||
const PREF_UI_TYPE_HIDDEN = "extensions.ui.%TYPE%.hidden";
|
||||
const PREF_UI_LASTCATEGORY = "extensions.ui.lastCategory";
|
||||
const PREF_LEGACY_EXCEPTIONS = "extensions.legacy.exceptions";
|
||||
|
||||
const LOADING_MSG_DELAY = 100;
|
||||
|
||||
|
@ -105,10 +104,6 @@ XPCOMUtils.defineLazyGetter(this, "gInlineOptionsStylesheets", () => {
|
|||
return stylesheets;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, "legacyWarningExceptions",
|
||||
PREF_LEGACY_EXCEPTIONS, "",
|
||||
raw => raw.split(","));
|
||||
|
||||
document.addEventListener("load", initialize, true);
|
||||
window.addEventListener("unload", shutdown);
|
||||
|
||||
|
@ -3064,32 +3059,6 @@ var gDetailView = {
|
|||
|
||||
this.node.setAttribute("type", aAddon.type);
|
||||
|
||||
let legacy = false;
|
||||
if (!aAddon.install) {
|
||||
if (aAddon.type == "extension" && !aAddon.isWebExtension) {
|
||||
legacy = true;
|
||||
}
|
||||
if (aAddon.type == "theme") {
|
||||
// The logic here is kind of clunky but we want to mark complete
|
||||
// themes as legacy. There's no explicit flag for complete
|
||||
// themes so explicitly check for new style themes (for which
|
||||
// isWebExtension is true) or lightweight themes (which have
|
||||
// ids that end with @personas.mozilla.org)
|
||||
legacy = !(aAddon.isWebExtension || aAddon.id.endsWith("@personas.mozilla.org"));
|
||||
}
|
||||
|
||||
if (legacy && aAddon.signedStatus == AddonManager.SIGNEDSTATE_PRIVILEGED) {
|
||||
legacy = false;
|
||||
}
|
||||
|
||||
// Exceptions that can slip through above: the default theme plus
|
||||
// test pilot addons until we get SIGNEDSTATE_PRIVILEGED deployed.
|
||||
if (legacy && legacyWarningExceptions.includes(aAddon.id)) {
|
||||
legacy = false;
|
||||
}
|
||||
}
|
||||
this.node.setAttribute("legacy", legacy);
|
||||
|
||||
// If the search category isn't selected then make sure to select the
|
||||
// correct category
|
||||
if (gCategories.selected != "addons://search/")
|
||||
|
|
|
@ -748,38 +748,6 @@
|
|||
<binding id="addon-base"
|
||||
extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
|
||||
<implementation>
|
||||
<property name="isLegacy" readonly="true">
|
||||
<getter><![CDATA[
|
||||
if (this.mAddon.install) {
|
||||
return false;
|
||||
}
|
||||
let legacy = false;
|
||||
if (this.mAddon.type == "extension" && !this.mAddon.isWebExtension) {
|
||||
legacy = true;
|
||||
}
|
||||
if (this.mAddon.type == "theme") {
|
||||
// The logic here is kind of clunky but we want to mark complete
|
||||
// themes as legacy. There's no explicit flag for complete
|
||||
// themes so explicitly check for new style themes (for which
|
||||
// isWebExtension is true) or lightweight themes (which have
|
||||
// ids that end with @personas.mozilla.org)
|
||||
legacy = !(this.mAddon.isWebExtension ||
|
||||
this.mAddon.id.endsWith("@personas.mozilla.org"));
|
||||
}
|
||||
|
||||
if (legacy && this.mAddon.signedStatus == AddonManager.SIGNEDSTATE_PRIVILEGED) {
|
||||
legacy = false;
|
||||
}
|
||||
|
||||
// Exceptions that can slip through above: the default theme plus
|
||||
// test pilot addons until we get SIGNEDSTATE_PRIVILEGED deployed.
|
||||
if (legacy && legacyWarningExceptions.includes(this.mAddon.id)) {
|
||||
legacy = false;
|
||||
}
|
||||
return legacy;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<method name="hasPermission">
|
||||
<parameter name="aPerm"/>
|
||||
<body><![CDATA[
|
||||
|
@ -865,7 +833,6 @@
|
|||
<xul:hbox class="name-container">
|
||||
<xul:label anonid="name" class="name" crop="end" flex="1"
|
||||
tooltip="addonitem-tooltip" xbl:inherits="value=name"/>
|
||||
<xul:label anonid="legacy" class="legacy-warning" value="&addon.legacy.label;"/>
|
||||
<xul:label class="disabled-postfix" value="&addon.disabled.postfix;"/>
|
||||
<xul:label class="update-postfix" value="&addon.update.postfix;"/>
|
||||
<xul:spacer flex="5000"/> <!-- Necessary to make the name crop -->
|
||||
|
@ -1187,8 +1154,6 @@
|
|||
else
|
||||
this._description.hidden = true;
|
||||
|
||||
this.setAttribute("legacy", this.isLegacy);
|
||||
|
||||
if (!("applyBackgroundUpdates" in this.mAddon) ||
|
||||
(this.mAddon.applyBackgroundUpdates == AddonManager.AUTOUPDATE_DISABLE ||
|
||||
(this.mAddon.applyBackgroundUpdates == AddonManager.AUTOUPDATE_DEFAULT &&
|
||||
|
|
|
@ -567,7 +567,6 @@
|
|||
align="start">
|
||||
<label id="detail-name" flex="1"/>
|
||||
<label id="detail-version"/>
|
||||
<label class="legacy-warning" value="&addon.legacy.label;"/>
|
||||
<label class="disabled-postfix" value="&addon.disabled.postfix;"/>
|
||||
<label class="update-postfix" value="&addon.update.postfix;"/>
|
||||
<spacer flex="5000"/> <!-- Necessary to allow the name to wrap -->
|
||||
|
|
|
@ -64,7 +64,6 @@ skip-if = buildapp == 'mulet'
|
|||
skip-if = require_signing
|
||||
[browser_install.js]
|
||||
[browser_installssl.js]
|
||||
[browser_legacy.js]
|
||||
[browser_newaddon.js]
|
||||
[browser_non_mpc.js]
|
||||
[browser_searching.js]
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
|
||||
add_task(async function() {
|
||||
const NAMES = {
|
||||
fullTheme: "Full Theme",
|
||||
newTheme: "New LWT",
|
||||
legacy: "Legacy Extension",
|
||||
webextension: "WebExtension",
|
||||
dictionary: "Dictionary",
|
||||
langpack: "Language Pack",
|
||||
};
|
||||
let addons = [
|
||||
{
|
||||
id: "full-theme@tests.mozilla.org",
|
||||
name: NAMES.fullTheme,
|
||||
type: "theme",
|
||||
isWebExtension: false,
|
||||
},
|
||||
{
|
||||
id: "new-theme@tests.mozilla.org",
|
||||
name: NAMES.newTheme,
|
||||
type: "theme",
|
||||
isWebExtension: true,
|
||||
},
|
||||
{
|
||||
id: "legacy@tests.mozilla.org",
|
||||
name: NAMES.legacy,
|
||||
type: "extension",
|
||||
isWebExtension: false,
|
||||
},
|
||||
{
|
||||
id: "webextension@tests.mozilla.org",
|
||||
name: NAMES.webextension,
|
||||
type: "extension",
|
||||
isWebExtension: true,
|
||||
},
|
||||
{
|
||||
id: "dictionary@tests.mozilla.org",
|
||||
name: NAMES.dictionary,
|
||||
type: "dictionary",
|
||||
},
|
||||
];
|
||||
|
||||
let provider = new MockProvider();
|
||||
provider.createAddons(addons);
|
||||
|
||||
let mgrWin = await open_manager(null);
|
||||
let catUtils = new CategoryUtilities(mgrWin);
|
||||
|
||||
async function check(category, name, isLegacy) {
|
||||
await catUtils.openType(category);
|
||||
|
||||
let document = mgrWin.document;
|
||||
// First find the entry in the list.
|
||||
let item = Array.from(document.getElementById("addon-list").childNodes)
|
||||
.find(i => i.getAttribute("name") == name);
|
||||
|
||||
ok(item, `Found ${name} in list`);
|
||||
item.parentNode.ensureElementIsVisible(item);
|
||||
|
||||
// Check the badge
|
||||
let badge = document.getAnonymousElementByAttribute(item, "class", "legacy-warning");
|
||||
|
||||
if (isLegacy) {
|
||||
is_element_visible(badge, `Legacy badge is visible for ${name}`);
|
||||
} else {
|
||||
is_element_hidden(badge, `Legacy badge is hidden for ${name}`);
|
||||
}
|
||||
|
||||
// Click down to the details page.
|
||||
let detailsButton = document.getAnonymousElementByAttribute(item, "anonid", "details-btn");
|
||||
EventUtils.synthesizeMouseAtCenter(detailsButton, {}, mgrWin);
|
||||
await new Promise(resolve => wait_for_view_load(mgrWin, resolve));
|
||||
|
||||
// And check the badge
|
||||
let elements = document.getElementsByClassName("legacy-warning");
|
||||
is(elements.length, 1, "Found the legacy-warning element");
|
||||
badge = elements[0];
|
||||
|
||||
if (isLegacy) {
|
||||
is_element_visible(badge, `Legacy badge is visible for ${name}`);
|
||||
} else {
|
||||
is_element_hidden(badge, `Legacy badge is hidden for ${name}`);
|
||||
}
|
||||
}
|
||||
|
||||
await check("theme", NAMES.fullTheme, true);
|
||||
await check("theme", NAMES.newTheme, false);
|
||||
await check("extension", NAMES.legacy, true);
|
||||
await check("extension", NAMES.webextension, false);
|
||||
await check("dictionary", NAMES.dictionary, false);
|
||||
|
||||
await close_manager(mgrWin);
|
||||
});
|
|
@ -457,18 +457,6 @@ button.warning {
|
|||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
.legacy-warning {
|
||||
background-color: #FFE900;
|
||||
color: #3E2800;
|
||||
padding: 4px 5px 3px;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#detail-view .legacy-warning {
|
||||
margin-top: 0.78rem;
|
||||
}
|
||||
|
||||
.creator {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче