Bug 1703274 - Enable Proton Urlbar. r=jaws,extension-reviewers,zombie,rpl

Differential Revision: https://phabricator.services.mozilla.com/D110998
This commit is contained in:
Marco Bonardo 2021-04-09 18:20:21 +00:00
Родитель cfbef4a018
Коммит 2c982d3c01
43 изменённых файлов: 154 добавлений и 146 удалений

Просмотреть файл

@ -947,7 +947,7 @@ var BrowserPageActions = {
if ( if (
!action || !action ||
// In Proton, only extension actions provide a context menu. // In Proton, only extension actions provide a context menu.
(UrlbarPrefs.get("browser.proton.urlbar.enabled") && !action.extensionID) (gProton && !action.extensionID)
) { ) {
this._contextAction = null; this._contextAction = null;
event.preventDefault(); event.preventDefault();

Просмотреть файл

@ -772,7 +772,7 @@ toolbar:not(#TabsToolbar) > #personal-bookmarks {
} }
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
/* The page actions menu is hidden by default, it is only shown in small /* The page actions menu is hidden by default, it is only shown in small
windows as the overflow target of multiple page action buttons */ windows as the overflow target of multiple page action buttons */
#pageActionButton { #pageActionButton {
@ -791,7 +791,7 @@ toolbar:not(#TabsToolbar) > #personal-bookmarks {
display: none; display: none;
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#pageActionButton[multiple-children] { #pageActionButton[multiple-children] {
visibility: visible; visibility: visible;
} }
@ -1424,7 +1424,7 @@ toolbarpaletteitem > #stop-reload-button {
visibility: visible; visibility: visible;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
/* These pin/unpin menu options should be removed after Proton is released */ /* These pin/unpin menu options should be removed after Proton is released */
#pageActionContextMenu[state=builtInPinned] > .pageActionContextMenuItem.builtInPinned, #pageActionContextMenu[state=builtInPinned] > .pageActionContextMenuItem.builtInPinned,
#pageActionContextMenu[state=builtInUnpinned] > .pageActionContextMenuItem.builtInUnpinned, #pageActionContextMenu[state=builtInUnpinned] > .pageActionContextMenuItem.builtInUnpinned,

Просмотреть файл

@ -4203,9 +4203,7 @@ const BrowserSearch = {
* has search engines. * has search engines.
*/ */
updateOpenSearchBadge() { updateOpenSearchBadge() {
// When removing browser.proton.urlbar.enabled change this to only check if (gProton) {
// gProton.
if (gProton && gURLBar.addSearchEngineHelper) {
gURLBar.addSearchEngineHelper.setEnginesFromBrowser( gURLBar.addSearchEngineHelper.setEnginesFromBrowser(
gBrowser.selectedBrowser gBrowser.selectedBrowser
); );

Просмотреть файл

@ -121,6 +121,14 @@ add_task(async function testDeveloperButtonWrongKey() {
// Test activation of the Page actions button from the keyboard. // Test activation of the Page actions button from the keyboard.
// The Page Actions menu should appear and focus should move inside it. // The Page Actions menu should appear and focus should move inside it.
add_task(async function testPageActionsButtonPress() { add_task(async function testPageActionsButtonPress() {
// In Proton the page actions button is not normally visible, so we must
// unhide it.
if (gProton) {
BrowserPageActions.mainButtonNode.style.visibility = "visible";
registerCleanupFunction(() => {
BrowserPageActions.mainButtonNode.style.removeProperty("visibility");
});
}
await BrowserTestUtils.withNewTab("https://example.com", async function() { await BrowserTestUtils.withNewTab("https://example.com", async function() {
let button = document.getElementById("pageActionButton"); let button = document.getElementById("pageActionButton");
forceFocus(button); forceFocus(button);
@ -163,6 +171,10 @@ add_task(async function testBackForwardButtonPress() {
// This is a page action button built at runtime by PageActions. // This is a page action button built at runtime by PageActions.
// The Send Tab to Device menu should appear and focus should move inside it. // The Send Tab to Device menu should appear and focus should move inside it.
add_task(async function testSendTabToDeviceButtonPress() { add_task(async function testSendTabToDeviceButtonPress() {
// There's no Send to Device page action in proton.
if (gProton) {
return;
}
await BrowserTestUtils.withNewTab("https://example.com", async function() { await BrowserTestUtils.withNewTab("https://example.com", async function() {
PageActions.actionForID("sendToDevice").pinnedToUrlbar = true; PageActions.actionForID("sendToDevice").pinnedToUrlbar = true;
let button = document.getElementById("pageAction-urlbar-sendToDevice"); let button = document.getElementById("pageAction-urlbar-sendToDevice");

Просмотреть файл

@ -121,6 +121,15 @@ add_task(async function setup() {
guid: PlacesUtils.bookmarks.toolbarGuid, guid: PlacesUtils.bookmarks.toolbarGuid,
children: bookmarks, children: bookmarks,
}); });
// In Proton the page actions button is not normally visible, so we must
// unhide it.
if (gProton) {
BrowserPageActions.mainButtonNode.style.visibility = "visible";
registerCleanupFunction(() => {
BrowserPageActions.mainButtonNode.style.removeProperty("visibility");
});
}
}); });
// Test tab stops with no page loaded. // Test tab stops with no page loaded.

Просмотреть файл

@ -1,6 +1,6 @@
[DEFAULT] [DEFAULT]
prefs = prefs =
browser.proton.urlbar.enabled=true browser.proton.enabled=true
support-files = support-files =
head.js head.js

Просмотреть файл

@ -1,6 +1,6 @@
[DEFAULT] [DEFAULT]
prefs = prefs =
browser.proton.urlbar.enabled=false browser.proton.enabled=false
support-files = support-files =
head.js head.js

Просмотреть файл

@ -774,12 +774,7 @@ async function runUrlbarTest(
}; };
let urlbarRect = URLBar.textbox.getBoundingClientRect(); let urlbarRect = URLBar.textbox.getBoundingClientRect();
const SHADOW_SIZE = Services.prefs.getBoolPref( const SHADOW_SIZE = gProton ? 14 : 4;
"browser.proton.urlbar.enabled",
false
)
? 10
: 4;
let expectedRects = { let expectedRects = {
filter: rects => { filter: rects => {
// We put text into the urlbar so expect its textbox to change. // We put text into the urlbar so expect its textbox to change.

Просмотреть файл

@ -35,7 +35,7 @@ const TEST_CASES = [
{ {
type: "chrome about page", type: "chrome about page",
testURL: "about:preferences", testURL: "about:preferences",
img_url: UrlbarPrefs.get("browser.proton.urlbar.enabled") img_url: gProton
? `url("chrome://branding/content/icon${ ? `url("chrome://branding/content/icon${
window.devicePixelRatio > 1 ? 32 : 16 window.devicePixelRatio > 1 ? 32 : 16
}.png")` }.png")`

Просмотреть файл

@ -130,6 +130,14 @@ add_task(async function test_main_menu_touch() {
add_task(async function test_page_action_panel_touch() { add_task(async function test_page_action_panel_touch() {
// The page action menu only appears on a web page. // The page action menu only appears on a web page.
await BrowserTestUtils.withNewTab("https://example.com", async function() { await BrowserTestUtils.withNewTab("https://example.com", async function() {
// In Proton the page actions button is not normally visible, so we must
// unhide it.
if (gProton) {
BrowserPageActions.mainButtonNode.style.visibility = "visible";
registerCleanupFunction(() => {
BrowserPageActions.mainButtonNode.style.removeProperty("visibility");
});
}
let target = document.getElementById("pageActionButton"); let target = document.getElementById("pageActionButton");
await openAndCheckLazyMenu("pageActionPanel", target); await openAndCheckLazyMenu("pageActionPanel", target);
}); });

Просмотреть файл

@ -179,7 +179,7 @@ add_task(async function test_hiddenPageActionContextMenu() {
// change the behavior, hiding them. Then this test won't be necessary anymore // change the behavior, hiding them. Then this test won't be necessary anymore
// since the user won't be able to open the context menu on disabled actions. // since the user won't be able to open the context menu on disabled actions.
await SpecialPowers.pushPrefEnv({ await SpecialPowers.pushPrefEnv({
set: [["browser.proton.urlbar.enabled", false]], set: [["browser.proton.enabled", false]],
}); });
const manifest = { const manifest = {
page_action: {}, page_action: {},

Просмотреть файл

@ -5,7 +5,7 @@
add_task(async function setup() { add_task(async function setup() {
// The page action button is hidden by default for proton. // The page action button is hidden by default for proton.
// This tests the use of pageAction when the button is visible. // This tests the use of pageAction when the button is visible.
if (Services.prefs.getBoolPref("browser.proton.urlbar.enabled", false)) { if (gProton) {
BrowserPageActions.mainButtonNode.style.visibility = "visible"; BrowserPageActions.mainButtonNode.style.visibility = "visible";
registerCleanupFunction(() => { registerCleanupFunction(() => {
BrowserPageActions.mainButtonNode.style.removeProperty("visibility"); BrowserPageActions.mainButtonNode.style.removeProperty("visibility");

Просмотреть файл

@ -109,13 +109,14 @@ add_task(async function test_pageAction_pinned() {
await extension.startup(); await extension.startup();
await extension.awaitMessage("page-action-shown"); await extension.awaitMessage("page-action-shown");
let elem = await getPageActionButton(extension);
is(elem && elem.parentNode, null, "pageAction is not pinned to urlbar");
// There are plenty of tests for the main action button, we just verify // There are plenty of tests for the main action button, we just verify
// that we've properly set the pinned value to false. // that we've properly set the pinned value.
let action = PageActions.actionForID(makeWidgetId(extension.id)); let action = PageActions.actionForID(makeWidgetId(extension.id));
ok(action && !action.pinnedToUrlbar, "pageAction is in main pageaction menu"); Assert.equal(
action && action.pinnedToUrlbar,
gProton,
"Check pageAction pinning"
);
await extension.unload(); await extension.unload();
}); });

Просмотреть файл

@ -77,9 +77,14 @@ add_task(async function testAppShutdown() {
await promiseStartupManager(); await promiseStartupManager();
await extension.awaitStartup(); await extension.awaitStartup();
// Get the action. Its pinnedToUrlbar should remain false. // Get the action. In non-proton its pinnedToUrlbar should remain false.
// In Proton there is no meatball menu, thus page actions are directly pinned
// to the urlbar.
action = PageActions.actionForID(actionID); action = PageActions.actionForID(actionID);
Assert.equal(action.pinnedToUrlbar, false); Assert.equal(
action.pinnedToUrlbar,
Services.prefs.getBoolPref("browser.proton.enabled", false)
);
// Now unload the extension and quit the app. // Now unload the extension and quit the app.
await extension.unload(); await extension.unload();

Просмотреть файл

@ -44,6 +44,13 @@ XPCOMUtils.defineLazyServiceGetter(
"nsIClipboardHelper" "nsIClipboardHelper"
); );
XPCOMUtils.defineLazyPreferenceGetter(
this,
"protonEnabled",
"browser.proton.enabled",
false
);
const DEFAULT_FORM_HISTORY_NAME = "searchbar-history"; const DEFAULT_FORM_HISTORY_NAME = "searchbar-history";
const SEARCH_BUTTON_ID = "urlbar-search-button"; const SEARCH_BUTTON_ID = "urlbar-search-button";
@ -201,6 +208,10 @@ class UrlbarInput {
return new UrlbarValueFormatter(this); return new UrlbarValueFormatter(this);
}); });
XPCOMUtils.defineLazyGetter(this, "addSearchEngineHelper", () => {
return new AddSearchEngineHelper(this);
});
// If the toolbar is not visible in this window or the urlbar is readonly, // If the toolbar is not visible in this window or the urlbar is readonly,
// we'll stop here, so that most properties of the input object are valid, // we'll stop here, so that most properties of the input object are valid,
// but we won't handle events. // but we won't handle events.
@ -260,9 +271,6 @@ class UrlbarInput {
this._initCopyCutController(); this._initCopyCutController();
this._initPasteAndGo(); this._initPasteAndGo();
if (UrlbarPrefs.get("browser.proton.urlbar.enabled")) {
this.addSearchEngineHelper = new AddSearchEngineHelper(this);
}
// Tracks IME composition. // Tracks IME composition.
this._compositionState = UrlbarUtils.COMPOSITION.NONE; this._compositionState = UrlbarUtils.COMPOSITION.NONE;
@ -1411,7 +1419,7 @@ class UrlbarInput {
this._hideFocus = false; this._hideFocus = false;
if (this.focused) { if (this.focused) {
this.setAttribute("focused", "true"); this.setAttribute("focused", "true");
if (!UrlbarPrefs.get("browser.proton.urlbar.enabled")) { if (!protonEnabled) {
this.startLayoutExtend(); this.startLayoutExtend();
} }
} }
@ -1651,7 +1659,7 @@ class UrlbarInput {
return; return;
} }
await this._updateLayoutBreakoutDimensions(); await this._updateLayoutBreakoutDimensions();
if (!UrlbarPrefs.get("browser.proton.urlbar.enabled")) { if (!protonEnabled) {
this.startLayoutExtend(); this.startLayoutExtend();
} }
} }
@ -1665,7 +1673,7 @@ class UrlbarInput {
) { ) {
return; return;
} }
if (UrlbarPrefs.get("browser.proton.urlbar.enabled") && !this.view.isOpen) { if (protonEnabled && !this.view.isOpen) {
return; return;
} }
// The Urlbar is unfocused or reduce motion is on and the view is closed. // The Urlbar is unfocused or reduce motion is on and the view is closed.
@ -1714,7 +1722,7 @@ class UrlbarInput {
} }
if ( if (
!UrlbarPrefs.get("browser.proton.urlbar.enabled") && !protonEnabled &&
this.getAttribute("focused") == "true" && this.getAttribute("focused") == "true" &&
(!this.window.gReduceMotion || (!this.window.gReduceMotion ||
!this.window.matchMedia("(prefers-reduced-motion: reduce)").matches) !this.window.matchMedia("(prefers-reduced-motion: reduce)").matches)
@ -2732,7 +2740,7 @@ class UrlbarInput {
}); });
this.removeAttribute("focused"); this.removeAttribute("focused");
if (!UrlbarPrefs.get("browser.proton.urlbar.enabled")) { if (!protonEnabled) {
this.endLayoutExtend(); this.endLayoutExtend();
} }
@ -2811,7 +2819,7 @@ class UrlbarInput {
} }
_on_contextmenu(event) { _on_contextmenu(event) {
if (UrlbarPrefs.get("browser.proton.urlbar.enabled")) { if (protonEnabled) {
this.addSearchEngineHelper.refreshContextMenu(event); this.addSearchEngineHelper.refreshContextMenu(event);
} }
@ -2848,7 +2856,7 @@ class UrlbarInput {
} }
} }
if (!UrlbarPrefs.get("browser.proton.urlbar.enabled")) { if (!protonEnabled) {
this.startLayoutExtend(); this.startLayoutExtend();
} }

Просмотреть файл

@ -207,11 +207,6 @@ const PREF_URLBAR_DEFAULTS = new Map([
]); ]);
const PREF_OTHER_DEFAULTS = new Map([ const PREF_OTHER_DEFAULTS = new Map([
["browser.fixup.dns_first_for_single_words", false], ["browser.fixup.dns_first_for_single_words", false],
// The Proton pref is here so it can follow a browser.proton.* structure like
// the other Proton subprefs, rather than a browser.urlbar.* structure.
// Once the address bar changes are stable, this pref will be replaed by the
// global Proton pref, browser.proton.enabled.
["browser.proton.urlbar.enabled", false],
["browser.search.suggest.enabled", true], ["browser.search.suggest.enabled", true],
["browser.search.suggest.enabled.private", false], ["browser.search.suggest.enabled.private", false],
["keyword.enabled", true], ["keyword.enabled", true],

Просмотреть файл

@ -333,7 +333,7 @@ class UrlbarSearchOneOffs extends SearchOneOffs {
_rebuildEngineList(engines) { _rebuildEngineList(engines) {
super._rebuildEngineList(engines); super._rebuildEngineList(engines);
if (UrlbarPrefs.get("browser.proton.urlbar.enabled")) { if (Services.prefs.getBoolPref("browser.proton.enabled", false)) {
for (let engine of this._webEngines) { for (let engine of this._webEngines) {
let button = this.document.createXULElement("button"); let button = this.document.createXULElement("button");
button.id = this._buttonIDForEngine(engine); button.id = this._buttonIDForEngine(engine);

Просмотреть файл

@ -5,7 +5,6 @@
[DEFAULT] [DEFAULT]
prefs = prefs =
browser.proton.enabled=true browser.proton.enabled=true
browser.proton.urlbar.enabled=true
support-files = support-files =
head.js head.js

Просмотреть файл

@ -24,7 +24,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
BinarySearch: "resource://gre/modules/BinarySearch.jsm", BinarySearch: "resource://gre/modules/BinarySearch.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
Services: "resource://gre/modules/Services.jsm", Services: "resource://gre/modules/Services.jsm",
UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
}); });
const ACTION_ID_BOOKMARK = "bookmark"; const ACTION_ID_BOOKMARK = "bookmark";
@ -36,7 +35,12 @@ const ACTION_ID_TRANSIENT_SEPARATOR = "transientSeparator";
const PREF_PERSISTED_ACTIONS = "browser.pageActions.persistedActions"; const PREF_PERSISTED_ACTIONS = "browser.pageActions.persistedActions";
const PERSISTED_ACTIONS_CURRENT_VERSION = 1; const PERSISTED_ACTIONS_CURRENT_VERSION = 1;
const PROTON_PREF = "browser.proton.urlbar.enabled"; XPCOMUtils.defineLazyPreferenceGetter(
this,
"protonEnabled",
"browser.proton.enabled",
false
);
// Escapes the given raw URL string, and returns an equivalent CSS url() // Escapes the given raw URL string, and returns an equivalent CSS url()
// value for it. // value for it.
@ -266,7 +270,7 @@ var PageActions = {
this._persistedActions.ids.push(action.id); this._persistedActions.ids.push(action.id);
} }
if (UrlbarPrefs.get(PROTON_PREF)) { if (protonEnabled) {
// Actions are always pinned to the urlbar in Proton except for panel // Actions are always pinned to the urlbar in Proton except for panel
// separators. // separators.
action._pinnedToUrlbar = !action.__isSeparator; action._pinnedToUrlbar = !action.__isSeparator;
@ -442,7 +446,7 @@ var PageActions = {
}, },
_migratePersistedActionsProton(actions) { _migratePersistedActionsProton(actions) {
if (UrlbarPrefs.get(PROTON_PREF)) { if (protonEnabled) {
if (actions?.idsInUrlbarPreProton) { if (actions?.idsInUrlbarPreProton) {
// continue with Proton // continue with Proton
} else if (actions) { } else if (actions) {
@ -1252,7 +1256,7 @@ PageActions._initBuiltInActions = function() {
}, },
]; ];
if (UrlbarPrefs.get(PROTON_PREF)) { if (protonEnabled) {
return; return;
} }

Просмотреть файл

@ -79,7 +79,7 @@ add_task(async function simple() {
Assert.equal(action.getIconURL(), iconURL, "iconURL"); Assert.equal(action.getIconURL(), iconURL, "iconURL");
Assert.equal(action.id, id, "id"); Assert.equal(action.id, id, "id");
Assert.equal(action.pinnedToUrlbar, gProtonUrlbar, "pinnedToUrlbar"); Assert.equal(action.pinnedToUrlbar, gProton, "pinnedToUrlbar");
Assert.equal(action.getDisabled(), false, "disabled"); Assert.equal(action.getDisabled(), false, "disabled");
Assert.equal(action.getDisabled(window), false, "disabled in window"); Assert.equal(action.getDisabled(window), false, "disabled in window");
Assert.equal(action.getTitle(), title, "title"); Assert.equal(action.getTitle(), title, "title");
@ -105,7 +105,7 @@ add_task(async function simple() {
); );
Assert.equal( Assert.equal(
onPlacedInUrlbarCallCount, onPlacedInUrlbarCallCount,
gProtonUrlbar ? 1 : 0, gProton ? 1 : 0,
"onPlacedInUrlbarCallCount after adding the action" "onPlacedInUrlbarCallCount after adding the action"
); );
Assert.equal( Assert.equal(
@ -178,7 +178,7 @@ add_task(async function simple() {
Assert.deepEqual( Assert.deepEqual(
PageActions.actionsInUrlbar(window), PageActions.actionsInUrlbar(window),
(gProtonUrlbar ? [action] : []).concat(initialActionsInUrlbar), (gProton ? [action] : []).concat(initialActionsInUrlbar),
"Actions in urlbar after adding the action" "Actions in urlbar after adding the action"
); );
@ -223,7 +223,7 @@ add_task(async function simple() {
); );
let urlbarButtonNode = document.getElementById(urlbarButtonID); let urlbarButtonNode = document.getElementById(urlbarButtonID);
Assert.equal(!!urlbarButtonNode, gProtonUrlbar, "urlbarButtonNode"); Assert.equal(!!urlbarButtonNode, gProton, "urlbarButtonNode");
// Open the panel, click the action's button. // Open the panel, click the action's button.
await promiseOpenPageActionPanel(); await promiseOpenPageActionPanel();
@ -774,7 +774,7 @@ add_task(async function insertBeforeActionID() {
let panelButtonNode = document.getElementById(panelButtonID); let panelButtonNode = document.getElementById(panelButtonID);
Assert.notEqual(panelButtonNode, null, "panelButtonNode"); Assert.notEqual(panelButtonNode, null, "panelButtonNode");
if (!gProtonUrlbar) { if (!gProton) {
let actionIndex = newActions.findIndex(a => a.id == id); let actionIndex = newActions.findIndex(a => a.id == id);
Assert.equal( Assert.equal(
initialBookmarkSeparatorIndex, initialBookmarkSeparatorIndex,
@ -1219,7 +1219,7 @@ add_task(async function transient() {
Assert.equal(onPlacedInPanelCount, 0, "onPlacedInPanelCount should remain 0"); Assert.equal(onPlacedInPanelCount, 0, "onPlacedInPanelCount should remain 0");
Assert.equal( Assert.equal(
onBeforePlacedInWindowCount, onBeforePlacedInWindowCount,
gProtonUrlbar ? 1 : 0, gProton ? 1 : 0,
"onBeforePlacedInWindowCount after adding transient action" "onBeforePlacedInWindowCount after adding transient action"
); );

Просмотреть файл

@ -45,7 +45,7 @@ add_task(async function contextMenu() {
let contextMenuPromise; let contextMenuPromise;
let menuItems; let menuItems;
if (!gProtonUrlbar) { if (!gProton) {
// Open the context menu on the action's button in the main panel. // Open the context menu on the action's button in the main panel.
contextMenuPromise = promisePanelShown("pageActionContextMenu"); contextMenuPromise = promisePanelShown("pageActionContextMenu");
EventUtils.synthesizeMouseAtCenter(panelButton, { EventUtils.synthesizeMouseAtCenter(panelButton, {
@ -109,7 +109,7 @@ add_task(async function contextMenu() {
); );
// Click the "manage extension" context menu item. about:addons should open. // Click the "manage extension" context menu item. about:addons should open.
let manageItemIndex = gProtonUrlbar ? 0 : 2; let manageItemIndex = gProton ? 0 : 2;
contextMenuPromise = promisePanelHidden("pageActionContextMenu"); contextMenuPromise = promisePanelHidden("pageActionContextMenu");
let aboutAddonsPromise = BrowserTestUtils.waitForNewTab( let aboutAddonsPromise = BrowserTestUtils.waitForNewTab(
gBrowser, gBrowser,
@ -128,7 +128,7 @@ add_task(async function contextMenu() {
let urlbarButton; let urlbarButton;
if (!gProtonUrlbar) { if (!gProton) {
// Open the context menu on the action's urlbar button. // Open the context menu on the action's urlbar button.
urlbarButton = BrowserPageActions.urlbarButtonNodeForActionID(actionId); urlbarButton = BrowserPageActions.urlbarButtonNodeForActionID(actionId);
contextMenuPromise = promisePanelShown("pageActionContextMenu"); contextMenuPromise = promisePanelShown("pageActionContextMenu");
@ -342,7 +342,7 @@ function makeContextMenuItemSpecs(actionInUrlbar = false) {
{ label: "Manage Extension\u2026" }, { label: "Manage Extension\u2026" },
{ label: "Remove Extension" }, { label: "Remove Extension" },
]; ];
if (!gProtonUrlbar) { if (!gProton) {
items.unshift( items.unshift(
{ {
label: actionInUrlbar label: actionInUrlbar

Просмотреть файл

@ -5,7 +5,7 @@
"use strict"; "use strict";
const PROTON_PREF = "browser.proton.urlbar.enabled"; const PROTON_PREF = "browser.proton.enabled";
const PERSISTED_ACTIONS_PREF = "browser.pageActions.persistedActions"; const PERSISTED_ACTIONS_PREF = "browser.pageActions.persistedActions";
const TEST_ACTION_ID = "browser_PageActions_proton"; const TEST_ACTION_ID = "browser_PageActions_proton";

Просмотреть файл

@ -116,7 +116,7 @@ add_task(async function toolbarButtons() {
click(document.querySelector("#PlacesToolbarItems .bookmark-item")); click(document.querySelector("#PlacesToolbarItems .bookmark-item"));
// Page action panel is removed in proton // Page action panel is removed in proton
if (Services.prefs.getBoolPref("browser.proton.urlbar.enabled", false)) { if (gProton) {
click(customButton); click(customButton);
assertInteractionScalars({ assertInteractionScalars({

Просмотреть файл

@ -454,7 +454,7 @@ add_task(async function contextMenus() {
add_task(async function pageActions() { add_task(async function pageActions() {
// Built-in page actions are removed in Proton. // Built-in page actions are removed in Proton.
if (Services.prefs.getBoolPref("browser.proton.urlbar.enabled", false)) { if (gProton) {
return; return;
} }

Просмотреть файл

@ -12,10 +12,6 @@ ChromeUtils.defineModuleGetter(
const SINGLE_TRY_TIMEOUT = 100; const SINGLE_TRY_TIMEOUT = 100;
const NUMBER_OF_TRIES = 30; const NUMBER_OF_TRIES = 30;
const PROTON_URLBAR_PREF = "browser.proton.urlbar.enabled";
let gProtonUrlbar = Services.prefs.getBoolPref(PROTON_URLBAR_PREF, false);
function waitForConditionPromise( function waitForConditionPromise(
condition, condition,
timeoutMsg, timeoutMsg,
@ -332,8 +328,7 @@ async function initPageActionsTest() {
const addon = await AddonManager.getAddonByID("screenshots@mozilla.org"); const addon = await AddonManager.getAddonByID("screenshots@mozilla.org");
await addon.disable({ allowSystemAddons: true }); await addon.disable({ allowSystemAddons: true });
gProtonUrlbar = Services.prefs.getBoolPref(PROTON_URLBAR_PREF, false); if (gProton) {
if (gProtonUrlbar) {
// Make the main button visible. It's not unless the window is narrow. This // Make the main button visible. It's not unless the window is narrow. This
// test isn't concerned with that behavior. We have other tests for that. // test isn't concerned with that behavior. We have other tests for that.
BrowserPageActions.mainButtonNode.style.visibility = "visible"; BrowserPageActions.mainButtonNode.style.visibility = "visible";

Просмотреть файл

@ -211,7 +211,7 @@ menuitem.bookmark-item {
--autocomplete-popup-highlight-color: HighlightText; --autocomplete-popup-highlight-color: HighlightText;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
:root:not(:-moz-lwtheme) { :root:not(:-moz-lwtheme) {
--urlbar-popup-url-color: -moz-nativehyperlinktext; --urlbar-popup-url-color: -moz-nativehyperlinktext;
} }

Просмотреть файл

@ -242,7 +242,7 @@
%include ../shared/urlbar-searchbar.inc.css %include ../shared/urlbar-searchbar.inc.css
@media not (prefers-contrast) { @media not (prefers-contrast) {
@media (-moz-proton-urlbar) { @media (-moz-proton) {
:root:not(:-moz-lwtheme) #urlbar:not([focused="true"]) { :root:not(:-moz-lwtheme) #urlbar:not([focused="true"]) {
--urlbar-box-bgcolor: white; --urlbar-box-bgcolor: white;
} }

Просмотреть файл

@ -8,7 +8,7 @@
border-radius: 4px; border-radius: 4px;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.search-panel-current-engine { .search-panel-current-engine {
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
} }

Просмотреть файл

@ -46,11 +46,7 @@
--tab-selected-bgcolor: rgb(255,255,255); --tab-selected-bgcolor: rgb(255,255,255);
--tabs-border-color: transparent; --tabs-border-color: transparent;
--toolbar-color: rgb(21,20,26); --toolbar-color: rgb(21,20,26);
}
} /** END Proton **/
@media (-moz-proton-urlbar) {
:root:not(:-moz-lwtheme) {
--urlbar-popup-action-color: rgb(21,20,26); --urlbar-popup-action-color: rgb(21,20,26);
--urlbar-popup-url-color: rgb(0,97,224); --urlbar-popup-url-color: rgb(0,97,224);

Просмотреть файл

@ -68,7 +68,7 @@
--urlbar-icon-padding: 7px; /* (34px - 2px border - 2px padding - 16px icon) / 2 */ --urlbar-icon-padding: 7px; /* (34px - 2px border - 2px padding - 16px icon) / 2 */
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
:root { :root {
--urlbar-min-height: 30px; --urlbar-min-height: 30px;
--urlbar-icon-padding: 6px; /* (30px - 2px border - 16px icon) / 2 */ --urlbar-icon-padding: 6px; /* (30px - 2px border - 16px icon) / 2 */
@ -107,9 +107,7 @@
--focus-outline-color: #00DDFF; --focus-outline-color: #00DDFF;
} }
} }
} /*** END proton ***/
@media (-moz-proton-urlbar) {
:root[lwt-toolbar-field-focus-brighttext] { :root[lwt-toolbar-field-focus-brighttext] {
--lwt-popup-brighttext-url-color: #00ddff; --lwt-popup-brighttext-url-color: #00ddff;
} }

Просмотреть файл

@ -11,7 +11,7 @@
--autocomplete-popup-background: #2A2A2E !important; --autocomplete-popup-background: #2A2A2E !important;
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#urlbar:not([focused="true"]) { #urlbar:not([focused="true"]) {
--urlbar-box-bgcolor: var(--lwt-toolbar-field-focus); --urlbar-box-bgcolor: var(--lwt-toolbar-field-focus);
} }

Просмотреть файл

@ -10,7 +10,7 @@
margin-inline-end: var(--identity-box-margin-inline); margin-inline-end: var(--identity-box-margin-inline);
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#identity-box { #identity-box {
margin-inline-start: var(--identity-box-margin-inline); margin-inline-start: var(--identity-box-margin-inline);
} }
@ -37,7 +37,7 @@
} }
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#identity-box[pageproxystate="invalid"] { #identity-box[pageproxystate="invalid"] {
margin-inline-end: calc(var(--identity-box-margin-inline) + 2px); margin-inline-end: calc(var(--identity-box-margin-inline) + 2px);
} }
@ -68,7 +68,7 @@
background-color: hsla(0,0%,70%,.3); background-color: hsla(0,0%,70%,.3);
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.identity-box-button:hover:not([open=true]), .identity-box-button:hover:not([open=true]),
.identity-box-button:hover:active, .identity-box-button:hover:active,
.identity-box-button[open=true], .identity-box-button[open=true],
@ -91,7 +91,7 @@
border-radius: var(--toolbarbutton-border-radius); border-radius: var(--toolbarbutton-border-radius);
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.identity-box-button { .identity-box-button {
padding-inline: calc(var(--urlbar-icon-padding) / 2); padding-inline: calc(var(--urlbar-icon-padding) / 2);
border-radius: 0; border-radius: 0;
@ -127,7 +127,7 @@
border-radius: var(--toolbarbutton-border-radius); border-radius: var(--toolbarbutton-border-radius);
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#identity-box[pageproxystate="valid"].notSecureText > .identity-box-button, #identity-box[pageproxystate="valid"].notSecureText > .identity-box-button,
#identity-box[pageproxystate="valid"].chromeUI > .identity-box-button, #identity-box[pageproxystate="valid"].chromeUI > .identity-box-button,
#identity-box[pageproxystate="valid"].extensionPage > .identity-box-button, #identity-box[pageproxystate="valid"].extensionPage > .identity-box-button,
@ -155,7 +155,7 @@
pointer-events: none; pointer-events: none;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#identity-box[pageproxystate="valid"].notSecureText, #identity-box[pageproxystate="valid"].notSecureText,
#identity-box[pageproxystate="valid"].chromeUI, #identity-box[pageproxystate="valid"].chromeUI,
#identity-box[pageproxystate="valid"].extensionPage, #identity-box[pageproxystate="valid"].extensionPage,
@ -230,7 +230,7 @@
} }
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#identity-box[pageproxystate="valid"].chromeUI #identity-icon { #identity-box[pageproxystate="valid"].chromeUI #identity-icon {
list-style-image: url(chrome://branding/content/identity-icons-brand.svg); list-style-image: url(chrome://branding/content/identity-icons-brand.svg);
} }
@ -335,7 +335,7 @@
position: relative; position: relative;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#tracking-protection-icon-container { #tracking-protection-icon-container {
border-radius: 0; border-radius: 0;
/* Separator */ /* Separator */

Просмотреть файл

@ -46,7 +46,7 @@
padding-inline: 8px; padding-inline: 8px;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.search-panel-header { .search-panel-header {
padding-block: 3px; padding-block: 3px;
} }
@ -87,7 +87,7 @@
border-radius: var(--toolbarbutton-border-radius); border-radius: var(--toolbarbutton-border-radius);
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.searchbar-engine-one-off-item { .searchbar-engine-one-off-item {
border-radius: 0; border-radius: 0;
min-width: 48px; min-width: 48px;
@ -129,7 +129,7 @@
padding: 0 10px; padding: 0 10px;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.addengine-item { .addengine-item {
border-radius: 0; border-radius: 0;
} }
@ -237,7 +237,7 @@
display: none; display: none;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.search-setting-button { .search-setting-button {
border-top: 1px solid var(--panel-separator-color); border-top: 1px solid var(--panel-separator-color);
border-radius: 0; border-radius: 0;

Просмотреть файл

@ -12,7 +12,7 @@
--toolbar-field-border-color: hsla(240,5%,5%,.25); --toolbar-field-border-color: hsla(240,5%,5%,.25);
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
:root { :root {
--toolbar-field-focus-border-color: -moz-accent-color; --toolbar-field-focus-border-color: -moz-accent-color;
/* px because it's used in calc */ /* px because it's used in calc */
@ -20,7 +20,7 @@
} }
} /*** END !proton ***/ } /*** END !proton ***/
@media (-moz-proton-urlbar) { @media (-moz-proton) {
:root { :root {
--toolbar-field-focus-border-color: var(--focus-outline-color); --toolbar-field-focus-border-color: var(--focus-outline-color);
--urlbar-container-padding: 1px; --urlbar-container-padding: 1px;
@ -68,7 +68,7 @@
border-radius: var(--toolbarbutton-border-radius); border-radius: var(--toolbarbutton-border-radius);
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#urlbar-background, #urlbar-background,
#searchbar { #searchbar {
border-color: transparent; border-color: transparent;
@ -81,7 +81,7 @@
} }
} /*** END proton ***/ } /*** END proton ***/
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#urlbar-background, #urlbar-background,
#searchbar { #searchbar {
box-shadow: 0 1px 4px rgba(0,0,0,.05); box-shadow: 0 1px 4px rgba(0,0,0,.05);
@ -106,7 +106,7 @@
outline: none; outline: none;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#urlbar:not([focused="true"]):hover > #urlbar-background, #urlbar:not([focused="true"]):hover > #urlbar-background,
#searchbar:not(:focus-within):hover { #searchbar:not(:focus-within):hover {
border-color: @fieldHoverBorderColor@; border-color: @fieldHoverBorderColor@;
@ -119,7 +119,7 @@
} }
} /*** END !proton ***/ } /*** END !proton ***/
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#urlbar[focused="true"]:not([suppress-focus-border]) > #urlbar-background { #urlbar[focused="true"]:not([suppress-focus-border]) > #urlbar-background {
border: var(--focus-outline); border: var(--focus-outline);
/* We used --focus-outline above to inherit its width and style properties, /* We used --focus-outline above to inherit its width and style properties,
@ -278,7 +278,7 @@
width: calc(100% + 2 * @urlbarMarginInline@ + 2 * @urlbarBreakoutExtend@); width: calc(100% + 2 * @urlbarMarginInline@ + 2 * @urlbarBreakoutExtend@);
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#urlbar[breakout][breakout-extend] { #urlbar[breakout][breakout-extend] {
top: 0; top: 0;
left: -@urlbarMarginInline@; left: -@urlbarMarginInline@;
@ -286,7 +286,7 @@
} }
} /*** END proton ***/ } /*** END proton ***/
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#urlbar[breakout][breakout-extend] > #urlbar-background { #urlbar[breakout][breakout-extend] > #urlbar-background {
box-shadow: 0 3px 8px 0 rgba(0,0,0,.15) box-shadow: 0 3px 8px 0 rgba(0,0,0,.15)
} }
@ -302,7 +302,7 @@
padding-inline: calc(@urlbarMarginInline@ + @urlbarBreakoutExtend@); padding-inline: calc(@urlbarMarginInline@ + @urlbarBreakoutExtend@);
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#urlbar[breakout][breakout-extend] > #urlbar-input-container { #urlbar[breakout][breakout-extend] > #urlbar-input-container {
height: var(--urlbar-toolbar-height); height: var(--urlbar-toolbar-height);
padding-block: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2 + var(--urlbar-container-padding)); padding-block: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2 + var(--urlbar-container-padding));
@ -370,7 +370,7 @@
padding-inline: 8px 3px; padding-inline: 8px 3px;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#urlbar-search-mode-indicator { #urlbar-search-mode-indicator {
-moz-outline-radius: 2px; -moz-outline-radius: 2px;
min-width: 16px; /* So the close button never causes motion */ min-width: 16px; /* So the close button never causes motion */
@ -406,7 +406,7 @@
padding-inline: 0 4px; padding-inline: 0 4px;
opacity: var(--identity-box-label-opacity); opacity: var(--identity-box-label-opacity);
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#urlbar-search-mode-indicator-title { #urlbar-search-mode-indicator-title {
padding-inline: 5px; padding-inline: 5px;
opacity: 1; opacity: 1;
@ -424,7 +424,7 @@
fill: var(--lwt-toolbar-field-focus-color); fill: var(--lwt-toolbar-field-focus-color);
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#urlbar-search-mode-indicator-close { #urlbar-search-mode-indicator-close {
height: 16px; height: 16px;
border-radius: var(--toolbarbutton-border-radius); border-radius: var(--toolbarbutton-border-radius);
@ -444,14 +444,14 @@
fill: FieldText; fill: FieldText;
fill-opacity: 1.0; fill-opacity: 1.0;
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#urlbar-search-mode-indicator-close { #urlbar-search-mode-indicator-close {
fill: HighlightText; fill: HighlightText;
} }
} /*** END proton ***/ } /*** END proton ***/
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#urlbar-search-mode-indicator-close { #urlbar-search-mode-indicator-close {
display: none; display: none;
margin-inline-start: -16px; margin-inline-start: -16px;
@ -565,14 +565,14 @@
/* URL bar and page action buttons */ /* URL bar and page action buttons */
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#pageActionSeparator { #pageActionSeparator {
/* Just remove this element once Proton is released */ /* Just remove this element once Proton is released */
display: none; display: none;
} }
} /*** END proton ***/ } /*** END proton ***/
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#pageActionSeparator { #pageActionSeparator {
/* This draws the separator the same way that #urlbar-label-box draws its /* This draws the separator the same way that #urlbar-label-box draws its
left and right borders, which end up looking like separators. It might not left and right borders, which end up looking like separators. It might not
@ -617,7 +617,7 @@
margin-inline: 1px; margin-inline: 1px;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.urlbar-icon { .urlbar-icon {
width: calc(var(--urlbar-min-height) - 2px); width: calc(var(--urlbar-min-height) - 2px);
height: calc(var(--urlbar-min-height) - 2px); height: calc(var(--urlbar-min-height) - 2px);
@ -921,7 +921,7 @@
animation-duration: 250ms; animation-duration: 250ms;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
#urlbar-zoom-button { #urlbar-zoom-button {
background-color: hsla(0,0%,0%,.05); background-color: hsla(0,0%,0%,.05);
border: 1px solid hsla(210,4%,50%,.3); border: 1px solid hsla(210,4%,50%,.3);

Просмотреть файл

@ -33,13 +33,13 @@
--urlbarView-item-inline-padding: calc(var(--urlbar-icon-padding) / 2 + 3px); --urlbarView-item-inline-padding: calc(var(--urlbar-icon-padding) / 2 + 3px);
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
:root { :root {
--urlbar-popup-url-color: hsl(210, 77%, 47%); --urlbar-popup-url-color: hsl(210, 77%, 47%);
} }
} /*** END !proton ***/ } /*** END !proton ***/
@media (-moz-proton-urlbar) { @media (-moz-proton) {
:root:-moz-lwtheme { :root:-moz-lwtheme {
--urlbar-popup-url-color: rgb(0,97,224); --urlbar-popup-url-color: rgb(0,97,224);
} }
@ -55,7 +55,7 @@
--urlbarView-button-background-active: rgba(249, 249, 250, 0.2); --urlbarView-button-background-active: rgba(249, 249, 250, 0.2);
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
:root { :root {
--urlbarView-item-inline-padding: var(--urlbar-icon-padding); --urlbarView-item-inline-padding: var(--urlbar-icon-padding);
} }
@ -93,7 +93,7 @@
border-inline: 1px solid transparent; border-inline: 1px solid transparent;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.urlbarView { .urlbarView {
margin-inline: calc(4px + var(--identity-box-margin-inline)); margin-inline: calc(4px + var(--identity-box-margin-inline));
width: calc(100% - 2 * (4px + var(--identity-box-margin-inline))); width: calc(100% - 2 * (4px + var(--identity-box-margin-inline)));
@ -135,7 +135,7 @@
padding-block: 2px; padding-block: 2px;
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
:root:not([uidensity=compact]) .urlbarView-row:not([type=tip], [type=dynamic]) { :root:not([uidensity=compact]) .urlbarView-row:not([type=tip], [type=dynamic]) {
min-height: 32px; min-height: 32px;
padding-block: 4px; padding-block: 4px;
@ -153,7 +153,7 @@
padding-block: 6px; padding-block: 6px;
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
.urlbarView-row-inner { .urlbarView-row-inner {
border-radius: var(--toolbarbutton-border-radius); border-radius: var(--toolbarbutton-border-radius);
} }
@ -178,7 +178,7 @@
justify-content: start; justify-content: start;
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
.urlbarView-row-inner, .urlbarView-row-inner,
.urlbarView-no-wrap { .urlbarView-no-wrap {
align-items: center; align-items: center;
@ -295,7 +295,7 @@
-moz-context-properties: fill, fill-opacity; -moz-context-properties: fill, fill-opacity;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.urlbarView-favicon { .urlbarView-favicon {
/* 2px is from identity-block.inc.css */ /* 2px is from identity-block.inc.css */
margin-inline-end: calc(var(--urlbar-icon-padding) / 2 + var(--identity-box-margin-inline) + 2px); margin-inline-end: calc(var(--urlbar-icon-padding) / 2 + var(--identity-box-margin-inline) + 2px);
@ -360,7 +360,7 @@
stroke: rgb(50,49,60); stroke: rgb(50,49,60);
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.urlbarView-row[type=bookmark] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-type-icon { .urlbarView-row[type=bookmark] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-type-icon {
color: #0060df; /* Blue-60 */ color: #0060df; /* Blue-60 */
} }
@ -412,7 +412,7 @@
-moz-context-properties: fill, fill-opacity; -moz-context-properties: fill, fill-opacity;
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
.urlbarView-help { .urlbarView-help {
border-radius: var(--toolbarbutton-border-radius); border-radius: var(--toolbarbutton-border-radius);
} }
@ -482,7 +482,7 @@
margin-inline-end: 4px; margin-inline-end: 4px;
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
.urlbarView-tip-button { .urlbarView-tip-button {
border-radius: var(--toolbarbutton-border-radius); border-radius: var(--toolbarbutton-border-radius);
} }
@ -634,7 +634,7 @@
display: none; display: none;
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
/* Switch-to-tab action text is styled as a chiclet. */ /* Switch-to-tab action text is styled as a chiclet. */
.urlbarView-row:is([type=switchtab], [type=remotetab]) > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-action { .urlbarView-row:is([type=switchtab], [type=remotetab]) > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-action {
background-color: var(--urlbar-box-bgcolor); background-color: var(--urlbar-box-bgcolor);
@ -695,7 +695,7 @@
border-top: 1px solid var(--panel-separator-color); border-top: 1px solid var(--panel-separator-color);
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#urlbar .search-one-offs:not([hidden]) { #urlbar .search-one-offs:not([hidden]) {
padding-block: 10px; padding-block: 10px;
border-top-color: var(--urlbar-separator-color); border-top-color: var(--urlbar-separator-color);
@ -727,7 +727,7 @@
margin-inline-end: 8px; margin-inline-end: 8px;
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#urlbar .searchbar-engine-one-off-item { #urlbar .searchbar-engine-one-off-item {
border-radius: var(--toolbarbutton-border-radius); border-radius: var(--toolbarbutton-border-radius);
} }
@ -784,7 +784,7 @@
fill-opacity: .9; fill-opacity: .9;
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
.urlbarView-row[source="bookmarks"] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-favicon, .urlbarView-row[source="bookmarks"] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-favicon,
#urlbar-engine-one-off-item-bookmarks { #urlbar-engine-one-off-item-bookmarks {
fill: #0060df; /* Blue-60 */ fill: #0060df; /* Blue-60 */
@ -815,7 +815,7 @@
border-color: var(--arrowpanel-border-color); border-color: var(--arrowpanel-border-color);
} }
@media (-moz-proton-urlbar) { @media (-moz-proton) {
#PopupSearchAutoComplete { #PopupSearchAutoComplete {
border: 1px solid var(--arrowpanel-border-color); border: 1px solid var(--arrowpanel-border-color);
/* Remove the top border since the panel is flush with the input. */ /* Remove the top border since the panel is flush with the input. */

Просмотреть файл

@ -535,7 +535,7 @@ menuitem.bookmark-item {
%include ../shared/urlbar-searchbar.inc.css %include ../shared/urlbar-searchbar.inc.css
@media not (prefers-contrast) { @media not (prefers-contrast) {
@media (-moz-proton-urlbar) { @media (-moz-proton) {
:root:not(:-moz-lwtheme) #urlbar:not([focused="true"]) { :root:not(:-moz-lwtheme) #urlbar:not([focused="true"]) {
--urlbar-box-bgcolor: white; --urlbar-box-bgcolor: white;
} }
@ -589,7 +589,7 @@ menuitem.bookmark-item {
} }
} }
@media not (-moz-proton-urlbar) { @media not (-moz-proton) {
:root:not(:-moz-lwtheme) { :root:not(:-moz-lwtheme) {
--urlbar-popup-url-color: -moz-nativehyperlinktext; --urlbar-popup-url-color: -moz-nativehyperlinktext;
} }

Просмотреть файл

@ -8,7 +8,7 @@
outline: none; outline: none;
} }
@media (-moz-proton-urlbar) and (-moz-os-version: windows-win10) { @media (-moz-proton) and (-moz-os-version: windows-win10) {
#PopupSearchAutoComplete { #PopupSearchAutoComplete {
/* A border is necessary because the shadow is bottom-right */ /* A border is necessary because the shadow is bottom-right */
border-color: var(--menu-border-color); border-color: var(--menu-border-color);

Просмотреть файл

@ -27,7 +27,6 @@ const CHROME_ONLY_TOGGLES = [
"-moz-gtk-csd-close-button", "-moz-gtk-csd-close-button",
"-moz-gtk-csd-reversed-placement", "-moz-gtk-csd-reversed-placement",
"-moz-proton", "-moz-proton",
"-moz-proton-urlbar",
"-moz-proton-contextmenus", "-moz-proton-contextmenus",
"-moz-proton-modals", "-moz-proton-modals",
"-moz-proton-doorhangers", "-moz-proton-doorhangers",

Просмотреть файл

@ -1153,12 +1153,6 @@
mirror: always mirror: always
rust: true rust: true
- name: browser.proton.urlbar.enabled
type: RelaxedAtomicBool
value: false
mirror: always
rust: true
- name: browser.proton.modals.enabled - name: browser.proton.modals.enabled
type: RelaxedAtomicBool type: RelaxedAtomicBool
value: false value: false

Просмотреть файл

@ -624,7 +624,7 @@ macro_rules! bool_pref_feature {
/// to support new types in these entries and (2) ensuring that either /// to support new types in these entries and (2) ensuring that either
/// nsPresContext::MediaFeatureValuesChanged is called when the value that /// nsPresContext::MediaFeatureValuesChanged is called when the value that
/// would be returned by the evaluator function could change. /// would be returned by the evaluator function could change.
pub static MEDIA_FEATURES: [MediaFeatureDescription; 63] = [ pub static MEDIA_FEATURES: [MediaFeatureDescription; 62] = [
feature!( feature!(
atom!("width"), atom!("width"),
AllowsRanges::Yes, AllowsRanges::Yes,
@ -860,7 +860,6 @@ pub static MEDIA_FEATURES: [MediaFeatureDescription; 63] = [
lnf_int_feature!(atom!("-moz-system-dark-theme"), SystemUsesDarkTheme), lnf_int_feature!(atom!("-moz-system-dark-theme"), SystemUsesDarkTheme),
bool_pref_feature!(atom!("-moz-proton"), "browser.proton.enabled"), bool_pref_feature!(atom!("-moz-proton"), "browser.proton.enabled"),
bool_pref_feature!(atom!("-moz-proton-urlbar"), "browser.proton.urlbar.enabled"),
bool_pref_feature!(atom!("-moz-proton-modals"), "browser.proton.modals.enabled"), bool_pref_feature!(atom!("-moz-proton-modals"), "browser.proton.modals.enabled"),
bool_pref_feature!(atom!("-moz-proton-contextmenus"), "browser.proton.contextmenus.enabled"), bool_pref_feature!(atom!("-moz-proton-contextmenus"), "browser.proton.contextmenus.enabled"),
bool_pref_feature!(atom!("-moz-proton-doorhangers"), "browser.proton.doorhangers.enabled"), bool_pref_feature!(atom!("-moz-proton-doorhangers"), "browser.proton.doorhangers.enabled"),

Просмотреть файл

@ -1,10 +1,5 @@
"use strict"; "use strict";
let gProtonUrlbar = Services.prefs.getBoolPref(
"browser.proton.urlbar.enabled",
false
);
// This test checks whether applied WebExtension themes that attempt to change // This test checks whether applied WebExtension themes that attempt to change
// popup properties are applied correctly to the autocomplete bar. // popup properties are applied correctly to the autocomplete bar.
const POPUP_COLOR = "#85A400"; const POPUP_COLOR = "#85A400";
@ -13,10 +8,10 @@ const POPUP_TEXT_COLOR_BRIGHT = "#ffffff";
const POPUP_SELECTED_COLOR = "#9400ff"; const POPUP_SELECTED_COLOR = "#9400ff";
const POPUP_SELECTED_TEXT_COLOR = "#09b9a6"; const POPUP_SELECTED_TEXT_COLOR = "#09b9a6";
const POPUP_URL_COLOR_DARK = gProtonUrlbar ? "#0061e0" : "#1c78d4"; const POPUP_URL_COLOR_DARK = gProton ? "#0061e0" : "#1c78d4";
const POPUP_ACTION_COLOR_DARK = gProtonUrlbar ? "#15141a" : "#008f8a"; const POPUP_ACTION_COLOR_DARK = gProton ? "#15141a" : "#008f8a";
const POPUP_URL_COLOR_BRIGHT = gProtonUrlbar ? "#00ddff" : "#74c0ff"; const POPUP_URL_COLOR_BRIGHT = gProton ? "#00ddff" : "#74c0ff";
const POPUP_ACTION_COLOR_BRIGHT = gProtonUrlbar ? "#bfbfc9" : "#30e60b"; const POPUP_ACTION_COLOR_BRIGHT = gProton ? "#bfbfc9" : "#30e60b";
const SEARCH_TERM = "urlbar-reflows-" + Date.now(); const SEARCH_TERM = "urlbar-reflows-" + Date.now();

Просмотреть файл

@ -418,7 +418,6 @@ void nsXPLookAndFeel::OnPrefChanged(const char* aPref, void* aClosure) {
static constexpr nsLiteralCString kBoolMediaQueryPrefs[] = { static constexpr nsLiteralCString kBoolMediaQueryPrefs[] = {
"browser.proton.enabled"_ns, "browser.proton.enabled"_ns,
"browser.proton.urlbar.enabled"_ns,
"browser.proton.contextmenus.enabled"_ns, "browser.proton.contextmenus.enabled"_ns,
"browser.proton.modals.enabled"_ns, "browser.proton.modals.enabled"_ns,
"browser.proton.doorhangers.enabled"_ns, "browser.proton.doorhangers.enabled"_ns,

Просмотреть файл

@ -2220,7 +2220,6 @@ STATIC_ATOMS = [
Atom("_moz_gtk_csd_reversed_placement", "-moz-gtk-csd-reversed-placement"), Atom("_moz_gtk_csd_reversed_placement", "-moz-gtk-csd-reversed-placement"),
Atom("_moz_proton", "-moz-proton"), Atom("_moz_proton", "-moz-proton"),
Atom("_moz_proton_contextmenus", "-moz-proton-contextmenus"), Atom("_moz_proton_contextmenus", "-moz-proton-contextmenus"),
Atom("_moz_proton_urlbar", "-moz-proton-urlbar"),
Atom("_moz_proton_doorhangers", "-moz-proton-doorhangers"), Atom("_moz_proton_doorhangers", "-moz-proton-doorhangers"),
Atom("_moz_proton_modals", "-moz-proton-modals"), Atom("_moz_proton_modals", "-moz-proton-modals"),
Atom("_moz_proton_infobars", "-moz-proton-infobars"), Atom("_moz_proton_infobars", "-moz-proton-infobars"),