зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1680069 - proton root attribute and pref work, r=jaws,mconley
Differential Revision: https://phabricator.services.mozilla.com/D98375
This commit is contained in:
Родитель
50d1ac156c
Коммит
5e6f13744e
|
@ -825,6 +825,8 @@ pref("browser.preferences.defaultPerformanceSettings.enabled", true);
|
|||
|
||||
pref("browser.preferences.exposeHTTPSOnly", true);
|
||||
|
||||
pref("browser.proton.enabled", false);
|
||||
|
||||
pref("browser.download.show_plugins_in_list", true);
|
||||
pref("browser.download.hide_plugins_without_extensions", true);
|
||||
|
||||
|
|
|
@ -552,6 +552,16 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
false
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"gProton",
|
||||
"browser.proton.enabled",
|
||||
false,
|
||||
(pref, oldValue, newValue) => {
|
||||
document.documentElement.toggleAttribute("proton", newValue);
|
||||
}
|
||||
);
|
||||
|
||||
customElements.setElementCreationCallback("translation-notification", () => {
|
||||
Services.scriptloader.loadSubScript(
|
||||
"chrome://browser/content/translation-notification.js",
|
||||
|
@ -1698,6 +1708,8 @@ var gBrowserInit = {
|
|||
document.documentElement.setAttribute("icon", "main-window");
|
||||
}
|
||||
|
||||
document.documentElement.toggleAttribute("proton", gProton);
|
||||
|
||||
// Call this after we set attributes that might change toolbars' computed
|
||||
// text color.
|
||||
ToolbarIconColor.init();
|
||||
|
|
Загрузка…
Ссылка в новой задаче