mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1471305 - Remove obsolete footerURL code. r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D5795 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3b20596ca5
commit
3f49150d4c
@ -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",
|
||||
|
@ -15,7 +15,6 @@ ChromeUtils.defineModuleGetter(this, "FileUtils",
|
||||
"resource://gre/modules/FileUtils.jsm");
|
||||
|
||||
const ORIGIN_TOP_RIGHT = 1;
|
||||
const ORIGIN_BOTTOM_LEFT = 2;
|
||||
|
||||
var LightweightThemeImageOptimizer = {
|
||||
optimize(aThemeData, aScreen) {
|
||||
@ -27,11 +26,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);
|
||||
|
Loading…
Reference in New Issue
Block a user