Bug 1711519 - remove tabbrowser non-proton code and gProton global browser window property, r=jaws

Differential Revision: https://phabricator.services.mozilla.com/D116632
This commit is contained in:
Gijs Kruitbosch
2021-06-03 11:41:55 +00:00
parent fc906b8227
commit 3a8f64863a
13 changed files with 39 additions and 540 deletions

View File

@@ -536,22 +536,6 @@ XPCOMUtils.defineLazyPreferenceGetter(
false
);
/* Work around the pref callback being run after the document has been unlinked.
See bug 1543537. */
var docWeak = Cu.getWeakReference(document);
XPCOMUtils.defineLazyPreferenceGetter(
this,
"gProton",
"browser.proton.enabled",
false,
(pref, oldValue, newValue) => {
let doc = docWeak.get();
if (doc) {
doc.documentElement.toggleAttribute("proton", newValue);
}
}
);
/* Temporary pref while the dust settles around the updated tooltip design
for tabs and bookmarks toolbar. This will eventually be removed and
browser.proton.enabled will be used instead. */
@@ -1682,8 +1666,6 @@ 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();