Bug 1719939 - Remove last fragments of code manually checking the browser.proton.enabled pref. r=mhowell

Differential Revision: https://phabricator.services.mozilla.com/D125345
This commit is contained in:
Junjie Ying 2021-09-21 00:03:49 +00:00
parent 824d0d8d1a
commit 9b3839d3ba
15 changed files with 12 additions and 97 deletions

View File

@ -931,11 +931,7 @@ var BookmarksEventHandler = {
return false;
}
if (
gProtonPlacesTooltip &&
tooltipNode &&
!tooltipNode.closest("menupopup")
) {
if (tooltipNode && !tooltipNode.closest("menupopup")) {
aEvent.target.setAttribute("position", "after_start");
aEvent.target.moveToAnchor(tooltipNode, "after_start");
}

View File

@ -530,16 +530,6 @@ XPCOMUtils.defineLazyPreferenceGetter(
false
);
/* 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. */
XPCOMUtils.defineLazyPreferenceGetter(
this,
"gProtonPlacesTooltip",
"browser.proton.places-tooltip.enabled",
false
);
customElements.setElementCreationCallback("translation-notification", () => {
Services.scriptloader.loadSubScript(
"chrome://browser/content/translation-notification.js",

View File

@ -278,21 +278,7 @@ function initPage() {
var err = gErrorCode;
// List of error pages with an illustration.
let illustratedErrors = [
"malformedURI",
"dnsNotFound",
"connectionFailure",
"netInterrupt",
"netTimeout",
"netReset",
"netOffline",
];
if (
illustratedErrors.includes(err) &&
!RPMGetBoolPref("browser.proton.enabled")
) {
document.body.classList.add("illustrated", err);
}
if (err == "blockedByPolicy") {
document.body.classList.add("blocked");
}

View File

@ -5417,11 +5417,6 @@
label = this.getTabTooltip(tab);
}
if (!gProtonPlacesTooltip) {
event.target.setAttribute("label", label);
return;
}
if (alignToTab) {
event.target.setAttribute("position", "after_start");
event.target.moveToAnchor(tab, "after_start");

View File

@ -4073,9 +4073,6 @@ BrowserGlue.prototype = {
const dialogVersion = 89;
const dialogVersionPref = "browser.startup.upgradeDialog.version";
const dialogReason = await (async () => {
if (!Services.prefs.getBoolPref("browser.proton.enabled", true)) {
return "no-proton";
}
if (!BrowserHandler.majorUpgrade) {
return "not-major";
}

View File

@ -23,14 +23,6 @@ Testing instructions: Set `browser.aboutwelcome.enabled` to `false` in about:con
A full-page multistep experience that shows a large splash screen and several subsequent screens. See [Default experience variations](#default-experience-variations) for more information.
##### Legacy (non-proton)
An older multi-stage experience that has been available since Fx80 but was deprecated in Fx89 and support removed in Fx92.
Testing instructions:
- In Fx89, set `browser.proton.enabled` as `false` in about:config.
- In Fx90+, set `browser.aboutwelcome.protonDesign` as `false` in about:config
##### Return to AMO (RTAMO)
Special custom onboarding experience shown to users when they try to download an addon from addons.mozilla.org but dont have Firefox installed. This experience allows them to install the addon they were trying to install directly from a button on RTAMO.

View File

@ -13,13 +13,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
Services: "resource://gre/modules/Services.jsm",
});
XPCOMUtils.defineLazyPreferenceGetter(
this,
"PROTON_ENABLED",
"browser.proton.enabled",
false
);
class InfoBarNotification {
constructor(message, dispatch) {
this._dispatch = dispatch;
@ -46,11 +39,7 @@ class InfoBarNotification {
notificationContainer = gBrowser.getNotificationBox(browser);
}
let priority =
content.priority ||
(PROTON_ENABLED
? notificationContainer.PRIORITY_SYSTEM
: notificationContainer.PRIORITY_INFO_MEDIUM);
let priority = content.priority || notificationContainer.PRIORITY_SYSTEM;
this.notification = notificationContainer.appendNotification(
this.message.id,

View File

@ -13,7 +13,6 @@
*/
const { Cu } = require("chrome");
const Services = require("Services");
const { LocalizationHelper } = require("devtools/shared/l10n");
const MENUS_L10N = new LocalizationHelper(
"devtools/client/locales/menus.properties"
@ -293,15 +292,11 @@ function addTopLevelItems(doc) {
menu.insertBefore(pageSourceMenu, extensionsForDevelopersMenu);
const taskManagerMenu = doc.getElementById("menu_taskManager");
if (Services.prefs.getBoolPref("browser.proton.enabled", false)) {
const remoteDebuggingMenu = doc.getElementById(
"menu_devtools_remotedebugging"
);
menu.insertBefore(taskManagerMenu, remoteDebuggingMenu);
} else {
// When proton is preffed off, this is in the "more" section instead.
taskManagerMenu.hidden = true;
}
const remoteDebuggingMenu = doc.getElementById(
"menu_devtools_remotedebugging"
);
menu.insertBefore(taskManagerMenu, remoteDebuggingMenu);
}
/**

View File

@ -5283,8 +5283,7 @@ nscolor PresShell::GetDefaultBackgroundColorToDraw() {
doc->PrefersColorScheme(Document::IgnoreRFP::Yes) ==
StylePrefersColorScheme::Dark) {
// Use --in-content-page-background for prefers-color-scheme: dark.
return StaticPrefs::browser_proton_enabled() ? NS_RGB(0x1C, 0x1B, 0x22)
: NS_RGB(0x2A, 0x2A, 0x2E);
return NS_RGB(0x1C, 0x1B, 0x22);
}
return backgroundColor;

View File

@ -1222,12 +1222,6 @@
mirror: always
rust: true
# Enable Proton restyle. Requires restart.
- name: browser.proton.enabled
type: RelaxedAtomicBool
value: true
mirror: always
rust: true
- name: browser.proton.places-tooltip.enabled
type: RelaxedAtomicBool

View File

@ -222,16 +222,8 @@ var Heartbeat = class {
this.ratingContainer.appendChild(ratingElement);
}
if (Services.prefs.getBoolPref("browser.proton.enabled")) {
// This will append if there aren't any .text-link elements.
this.notice.buttonContainer.append(this.ratingContainer);
} else {
this.notice.messageText.flex = 0;
this.notice.messageDetails.insertBefore(
this.ratingContainer,
this.notice.spacer
);
}
// This will append if there aren't any .text-link elements.
this.notice.buttonContainer.append(this.ratingContainer);
}
// Let the consumer know the notification was shown.

View File

@ -14,7 +14,6 @@ let { PromptUtils } = ChromeUtils.import(
const AdjustableTitle = {
_cssSnippet: `
#titleContainer {
display: flex; /* Try removing me when browser.proton.enabled goes away. */
flex-shrink: 0;
flex-direction: row;

View File

@ -92,7 +92,6 @@ let RemotePageAccessManager = {
"security.certerrors.tls.version.show-override",
"security.xfocsp.errorReporting.automatic",
"security.xfocsp.errorReporting.enabled",
"browser.proton.enabled",
],
RPMSetBoolPref: [
"security.tls.version.enable-deprecated",

View File

@ -848,14 +848,6 @@ class PanelList extends HTMLElement {
let leftOffset;
let leftAlignX = anchorLeft;
let rightAlignX = anchorLeft + anchorWidth - panelWidth;
if (!Services.prefs.getBoolPref("browser.proton.enabled")) {
// NOTE: Remove arrow from HTML template when this branch is removed.
// The tip of the arrow is 25px from the edge of the panel,
// but 26px looks right.
let arrowOffset = 26;
leftAlignX += anchorWidth / 2 - arrowOffset;
rightAlignX += -anchorWidth / 2 + arrowOffset;
}
if (Services.locale.isAppLocaleRTL) {
// Prefer aligning on the right.

View File

@ -26,7 +26,7 @@ already_AddRefed<NativeMenu> NativeMenuSupport::CreateNativeContextMenu(dom::Ele
}
bool NativeMenuSupport::ShouldUseNativeContextMenus() {
return StaticPrefs::widget_macos_native_context_menus() && StaticPrefs::browser_proton_enabled();
return StaticPrefs::widget_macos_native_context_menus();
}
} // namespace mozilla::widget