fune/browser/components/moz.build
Harry Twyford 8b8efc8503 Bug 1731146 - Manage built-in themes from BuiltInThemes.jsm and use it to defer installing colorway themes. r=dao,mixedpuppy
This creates a centralized place to manage built in themes. The main motivation for this is that we want to defer intalling built-in themes until after UI startup, but we need to ensure those themes are installed when about:addons is visited. This module is called from both BrowserGlue (for installation) and aboutaddons.js (to ensure installation). Also, built in themes handing is all over the place right now, and this centralizes it, which is nice.

This also creates a more-permanent pref for colorway themes. The rationale is that I could see Product wanting a ripcord on this project and I want to build that in from the start.

This approach has serious performance improvements over the baseline. Here is perfherder for the current approach of installing before UI startup: https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=82baacf0b728add88c7e262ecb68d3fbcd1bda5e&newProject=try&newRevision=169edd7e48e5a051e5d3cbfbd6caaab4c496cd98&framework=1&page=1&showOnlyImportant=1 and again for an early version of the approach in this patch (installation after UI startup, but before I moved things to LightweightThemeConsumer): https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=82baacf0b728add88c7e262ecb68d3fbcd1bda5e&newProject=try&newRevision=6c200f35430a6af87401bd21c8db95e28a568964&framework=1&page=1&showOnlyImportant=1.

Differential Revision: https://phabricator.services.mozilla.com/D126549
2021-09-29 23:08:45 +00:00

108 lines
2.3 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", "General")
with Files("distribution.js"):
BUG_COMPONENT = ("Firefox", "Distributions")
with Files("tests/**"):
BUG_COMPONENT = ("Firefox", "General")
with Files("tests/browser/browser_contentpermissionprompt.js"):
BUG_COMPONENT = ("Firefox", "Site Permissions")
with Files("tests/unit/test_distribution.js"):
BUG_COMPONENT = ("Firefox", "Distributions")
with Files("safebrowsing/**"):
BUG_COMPONENT = ("Toolkit", "Safe Browsing")
with Files("controlcenter/**"):
BUG_COMPONENT = ("Firefox", "General")
DIRS += [
"about",
"aboutlogins",
"attribution",
"contextualidentity",
"customizableui",
"doh",
"downloads",
"enterprisepolicies",
"extensions",
"pagedata",
"migration",
"newtab",
"originattributes",
"ion",
"places",
"pocket",
"preferences",
"privatebrowsing",
"prompts",
"protections",
"protocolhandler",
"resistfingerprinting",
"screenshots",
"search",
"sessionstore",
"shell",
"syncedtabs",
"tabunloader",
"themes",
"translation",
"uitour",
"urlbar",
]
DIRS += ["build"]
if CONFIG["NIGHTLY_BUILD"]:
DIRS += [
"payments",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
DIRS += ["touchbar"]
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
DIRS += ["installerprefs"]
XPIDL_SOURCES += [
"nsIBrowserHandler.idl",
]
XPIDL_MODULE = "browsercompsbase"
XPCOM_MANIFESTS += [
"components.conf",
]
EXTRA_COMPONENTS += [
"BrowserComponents.manifest",
"tests/startupRecorder.js",
"tests/testComponents.manifest",
]
EXTRA_JS_MODULES += [
"BrowserContentHandler.jsm",
"BrowserGlue.jsm",
"distribution.js",
]
BROWSER_CHROME_MANIFESTS += [
"safebrowsing/content/test/browser.ini",
"tests/browser/browser.ini",
]
if CONFIG["MOZ_UPDATER"]:
BROWSER_CHROME_MANIFESTS += [
"tests/browser/whats_new_page/browser.ini",
]
XPCSHELL_TESTS_MANIFESTS += ["tests/unit/xpcshell.ini"]