gecko-dev/browser/themes/moz.build
Harry Twyford dbd64d955d Bug 1738325 - Uninstall expired themes from BuiltInThemes.jsm. r=dao
This patch allows us to uninstall expired themes. It includes the uninstall logic in BuiltInThemes.ensureBuiltInThemes(), which runs on idle after startup and when about:addons is opened. It also changes aboutaddons.js so we don't show a blank Colorways section in about:addons if there are none installed. Finally, I removed the hidden pref gate controlling the Colorways feature. I initially included that to account for the possibility that we wouldn't finish the feature in time for 94 and we would've needed to uplift a simple patch to disable the dfeature. Since the feature has now shipped, there is no longer a need for the pref.

After colorways expire, the user gets to keep the one they had installed going into the expiry, if any. This is information that would usually be associated with the profile. However, the themes are built-in (i.e. not in the profile). I get around this by saving a list of retained themes in a pref. This has drawbacks, such as making it possible to recover expired themes in about:config. I ran this by Product, and they're okay with it.

Differential Revision: https://phabricator.services.mozilla.com/D130517
2021-11-17 16:28:15 +00:00

49 lines
1.1 KiB
Python

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
with Files("**"):
BUG_COMPONENT = ("Firefox", "Theme")
with Files("ThemeVariableMap.jsm"):
BUG_COMPONENT = ("WebExtensions", "Themes")
EXTRA_JS_MODULES += [
"BuiltInThemeConfig.jsm",
"BuiltInThemes.jsm",
"ThemeVariableMap.jsm",
]
BROWSER_CHROME_MANIFESTS += [
"test/browser/browser.ini",
]
toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
if toolkit == "windows":
EXTRA_JS_MODULES += [
"Windows8WindowFrameColor.jsm",
]
if toolkit == "cocoa":
DIRS += ["osx"]
elif toolkit == "gtk":
DIRS += ["linux"]
else:
DIRS += ["windows"]
DIRS += [
"addons",
]
with Files("osx/**"):
SCHEDULES.exclusive = ["macosx"]
with Files("linux/**"):
SCHEDULES.exclusive = ["linux"]
with Files("windows/**"):
SCHEDULES.exclusive = ["windows"]