mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
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:
parent
824d0d8d1a
commit
9b3839d3ba
@ -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");
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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");
|
||||
|
@ -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";
|
||||
}
|
||||
|
@ -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 don’t have Firefox installed. This experience allows them to install the addon they were trying to install directly from a button on RTAMO.
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Let the consumer know the notification was shown.
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user