Bug 1471305 - Remove obsolete footerURL code. r=ntim

Removing footerURL code , few of the lines are left , i am not sure how to delete them and what to use instead of them there.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
championshuttler 2018-09-14 17:51:40 +00:00
Родитель 3a3372304e
Коммит c530e7f751
7 изменённых файлов: 2 добавлений и 21 удалений

Просмотреть файл

@ -280,7 +280,6 @@ function spoofTheme(aId, aName, aDesc) {
name: aName,
description: aDesc,
headerURL: "http://lwttest.invalid/a.png",
footerURL: "http://lwttest.invalid/b.png",
textcolor: Math.random().toString(),
accentcolor: Math.random().toString(),
};

Просмотреть файл

@ -197,7 +197,6 @@ LightweightThemeConsumer.prototype = {
this._setExperiment(active, experiment, theme.experimental);
_setImage(root, active, "--lwt-header-image", theme.headerURL);
_setImage(root, active, "--lwt-footer-image", theme.footerURL);
_setImage(root, active, "--lwt-additional-images", theme.additionalBackgrounds);
_setProperties(root, active, theme);
@ -208,11 +207,6 @@ LightweightThemeConsumer.prototype = {
root.removeAttribute("lwthemetextcolor");
}
if (active && theme.footerURL)
root.setAttribute("lwthemefooter", "true");
else
root.removeAttribute("lwthemefooter");
let contentThemeData = _getContentProperties(this._doc, active, theme);
Services.ppmm.sharedData.set(`theme/${this._winId}`, contentThemeData);
},

Просмотреть файл

@ -23,7 +23,7 @@ const DEFAULT_MAX_USED_THEMES_COUNT = 30;
const MAX_PREVIEW_SECONDS = 30;
const MANDATORY = ["id", "name"];
const OPTIONAL = ["headerURL", "footerURL", "textcolor", "accentcolor",
const OPTIONAL = ["headerURL", "textcolor", "accentcolor",
"iconURL", "previewURL", "author", "description",
"homepageURL", "updateURL", "version"];
@ -31,7 +31,6 @@ const PERSIST_ENABLED = true;
const PERSIST_BYPASS_CACHE = false;
const PERSIST_FILES = {
headerURL: "lightweighttheme-header",
footerURL: "lightweighttheme-footer",
};
ChromeUtils.defineModuleGetter(this, "LightweightThemeImageOptimizer",

Просмотреть файл

@ -27,11 +27,6 @@ var LightweightThemeImageOptimizer = {
data.headerURL = ImageCropper.getCroppedImageURL(
data.headerURL, aScreen, ORIGIN_TOP_RIGHT);
if (data.footerURL) {
data.footerURL = ImageCropper.getCroppedImageURL(
data.footerURL, aScreen, ORIGIN_BOTTOM_LEFT);
}
return data;
},

Просмотреть файл

@ -1,5 +1,5 @@
const MANDATORY = ["id", "name"];
const OPTIONAL = ["headerURL", "footerURL", "textcolor", "accentcolor",
const OPTIONAL = ["headerURL", "textcolor", "accentcolor",
"iconURL", "previewURL", "author", "description",
"homepageURL", "updateURL", "version"];
@ -12,7 +12,6 @@ function dummy(id) {
id: id || Math.random().toString(),
name: Math.random().toString(),
headerURL: "http://lwttest.invalid/a.png",
footerURL: "http://lwttest.invalid/b.png",
textcolor: Math.random().toString(),
accentcolor: Math.random().toString(),
};

Просмотреть файл

@ -61,7 +61,6 @@ add_task(async function test_theme_updates() {
version,
updateURL: `http://example.com/${n}`,
headerURL: `http://example.com/${image}`,
footerURL: `http://example.com/${image}`,
textcolor: "#000000",
accentcolor: "#ffffff",
};

Просмотреть файл

@ -1008,7 +1008,6 @@ add_task(async function test_7() {
author: "Mozilla",
homepageURL: "http://example.com/data/index.html",
headerURL: "http://example.com/data/header.png",
footerURL: "http://example.com/data/footer.png",
previewURL: "http://example.com/data/preview.png",
iconURL: "http://example.com/data/icon.png",
updateURL: "http://example.com/data/lwtheme.js",
@ -1034,7 +1033,6 @@ add_task(async function test_7() {
author: "Mozilla",
homepageURL: "http://example.com/data/index2.html",
headerURL: "http://example.com/data/header.png",
footerURL: "http://example.com/data/footer.png",
previewURL: "http://example.com/data/preview.png",
iconURL: "http://example.com/data/icon2.png",
updateURL: "http://example.com/data/lwtheme.js",
@ -1102,7 +1100,6 @@ add_task(async function() {
author: "John Smith",
homepageURL: "http://example.com/data/index3.html?v=3",
headerURL: "http://example.com/data/header.png?v=3",
footerURL: "http://example.com/data/footer.png?v=3",
previewURL: "http://example.com/data/preview.png?v=3",
iconURL: "http://example.com/data/icon2.png?v=3",
updateURL: "https://example.com/data/lwtheme.js?v=3",
@ -1142,7 +1139,6 @@ add_task(async function() {
equal(p1.screenshots[0].url, "http://example.com/data/preview.png?v=3");
equal(p1.iconURL, "http://example.com/data/icon2.png?v=3");
equal(currentTheme.headerURL, "http://example.com/data/header.png?v=3");
equal(currentTheme.footerURL, "http://example.com/data/footer.png?v=3");
equal(currentTheme.updateURL, "https://example.com/data/lwtheme.js?v=3");
equal(p1.installDate.getTime(), gInstallDate);