diff --git a/browser/actors/AboutPrivateBrowsingParent.jsm b/browser/actors/AboutPrivateBrowsingParent.jsm index 9639f5ecdf4a..b64655462bf7 100644 --- a/browser/actors/AboutPrivateBrowsingParent.jsm +++ b/browser/actors/AboutPrivateBrowsingParent.jsm @@ -57,14 +57,23 @@ class AboutPrivateBrowsingParent extends JSWindowActorParent { break; } case "SearchHandoff": { + let searchAlias = ""; + let searchEngine = Services.search.defaultPrivateEngine; + let searchAliases = searchEngine.aliases; + if (searchAliases && searchAliases.length) { + searchAlias = `${searchAliases[0]} `; + } let urlBar = win.gURLBar; let isFirstChange = true; if (!aMessage.data || !aMessage.data.text) { urlBar.setHiddenFocus(); } else { - // Pass the provided text to the awesomebar - urlBar.search(aMessage.data.text); + // Pass the provided text to the awesomebar. Prepend the @engine shortcut. + urlBar.search(`${searchAlias}${aMessage.data.text}`, { + searchEngine, + searchModeEntry: "handoff", + }); isFirstChange = false; } @@ -75,8 +84,11 @@ class AboutPrivateBrowsingParent extends JSWindowActorParent { if (isFirstChange) { isFirstChange = false; urlBar.removeHiddenFocus(); - urlBar.search(""); - this.sendAsyncMessage("DisableSearch"); + urlBar.search(searchAlias, { + searchEngine, + searchModeEntry: "handoff", + }); + this.sendAsyncMessage("HideSearch"); urlBar.removeEventListener("compositionstart", checkFirstChange); urlBar.removeEventListener("paste", checkFirstChange); } @@ -112,13 +124,6 @@ class AboutPrivateBrowsingParent extends JSWindowActorParent { urlBar.addEventListener("paste", checkFirstChange); break; } - case "ShouldShowSearch": { - return new Promise(resolve => { - Services.search.getDefaultPrivate().then(engine => { - resolve(engine.isAppProvided ? engine.name : null); - }); - }); - } case "ShouldShowSearchBanner": { // If this is a pre-loaded private browsing new tab, then we don't want // to display the banner - it might never get displayed to the user diff --git a/browser/components/newtab/common/Actions.jsm b/browser/components/newtab/common/Actions.jsm index c7386fb91f20..558ad06a4197 100644 --- a/browser/components/newtab/common/Actions.jsm +++ b/browser/components/newtab/common/Actions.jsm @@ -43,7 +43,6 @@ for (const type of [ "DELETE_HISTORY_URL", "DIALOG_CANCEL", "DIALOG_OPEN", - "DISABLE_SEARCH", "DISCOVERY_STREAM_COLLECTION_DISMISSIBLE_TOGGLE", "DISCOVERY_STREAM_CONFIG_CHANGE", "DISCOVERY_STREAM_CONFIG_RESET", @@ -77,6 +76,7 @@ for (const type of [ "FILL_SEARCH_TERM", "HANDOFF_SEARCH_TO_AWESOMEBAR", "HIDE_PRIVACY_INFO", + "HIDE_SEARCH", "INIT", "NEW_TAB_INIT", "NEW_TAB_INITIAL_STATE", diff --git a/browser/components/newtab/common/Reducers.jsm b/browser/components/newtab/common/Reducers.jsm index f631c714f16f..cfb96a33c2aa 100644 --- a/browser/components/newtab/common/Reducers.jsm +++ b/browser/components/newtab/common/Reducers.jsm @@ -808,12 +808,12 @@ function DiscoveryStream(prevState = INITIAL_STATE.DiscoveryStream, action) { function Search(prevState = INITIAL_STATE.Search, action) { switch (action.type) { - case at.DISABLE_SEARCH: - return Object.assign({ ...prevState, disable: true }); + case at.HIDE_SEARCH: + return Object.assign({ ...prevState, hide: true }); case at.FAKE_FOCUS_SEARCH: return Object.assign({ ...prevState, fakeFocus: true }); case at.SHOW_SEARCH: - return Object.assign({ ...prevState, disable: false, fakeFocus: false }); + return Object.assign({ ...prevState, hide: false, fakeFocus: false }); default: return prevState; } diff --git a/browser/components/newtab/content-src/components/Search/Search.jsx b/browser/components/newtab/content-src/components/Search/Search.jsx index 26758857d925..6274280b880d 100644 --- a/browser/components/newtab/content-src/components/Search/Search.jsx +++ b/browser/components/newtab/content-src/components/Search/Search.jsx @@ -42,7 +42,7 @@ export class _Search extends React.PureComponent { this.props.dispatch({ type: at.FAKE_FOCUS_SEARCH }); this.props.dispatch(ac.UserEvent({ event: "SEARCH_HANDOFF" })); if (text) { - this.props.dispatch({ type: at.DISABLE_SEARCH }); + this.props.dispatch({ type: at.HIDE_SEARCH }); } } @@ -106,41 +106,12 @@ export class _Search extends React.PureComponent { onInputMountHandoff(input) { if (input) { - // The handoff UI controller helps us set the search icon and reacts to + // The handoff UI controller helps usset the search icon and reacts to // changes to default engine to keep everything in sync. this._handoffSearchController = new ContentSearchHandoffUIController(); } } - getDefaultEngineName() { - // _handoffSearchController will manage engine names once it is initialized. - return this.props.Prefs.values["urlbar.placeholderName"]; - } - - getHandoffInputL10nAttributes() { - let defaultEngineName = this.getDefaultEngineName(); - return defaultEngineName - ? { - "data-l10n-id": "newtab-search-box-handoff-input", - "data-l10n-args": `{"engine": "${defaultEngineName}"}`, - } - : { - "data-l10n-id": "newtab-search-box-handoff-input-no-engine", - }; - } - - getHandoffTextL10nAttributes() { - let defaultEngineName = this.getDefaultEngineName(); - return defaultEngineName - ? { - "data-l10n-id": "newtab-search-box-handoff-text", - "data-l10n-args": `{"engine": "${defaultEngineName}"}`, - } - : { - "data-l10n-id": "newtab-search-box-handoff-text-no-engine", - }; - } - onSearchHandoffButtonMount(button) { // Keep a reference to the button for use during "paste" event handling. this._searchHandoffButton = button; @@ -154,7 +125,7 @@ export class _Search extends React.PureComponent { render() { const wrapperClassName = [ "search-wrapper", - this.props.disable && "search-disabled", + this.props.hide && "search-hidden", this.props.fakeFocus && "fake-focus", ] .filter(v => v) @@ -196,14 +167,22 @@ export class _Search extends React.PureComponent {
diff --git a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js index 3792bcbefbd0..b16077beb846 100644 --- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js +++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js @@ -89,59 +89,31 @@ document.addEventListener("DOMContentLoaded", function() { openSearchOptions.addEventListener("click", openSearchOptionsEvtHandler); openSearchOptions.addEventListener("keypress", openSearchOptionsEvtHandler); - // Load contentSearchUI so it sets the search engine icon and name for us. - new window.ContentSearchHandoffUIController(); - // Setup the search hand-off box. let btn = document.getElementById("search-handoff-button"); - RPMSendQuery("ShouldShowSearch", {}).then(engineName => { - let input = document.querySelector(".fake-textbox"); - if (engineName) { - document.l10n.setAttributes(btn, "about-private-browsing-handoff", { - engine: engineName, - }); - document.l10n.setAttributes( - input, - "about-private-browsing-handoff-text", - { - engine: engineName, - } - ); - } else { - document.l10n.setAttributes( - btn, - "about-private-browsing-handoff-no-engine" - ); - document.l10n.setAttributes( - input, - "about-private-browsing-handoff-text-no-engine" - ); - } - }); - let editable = document.getElementById("fake-editable"); - let DISABLE_SEARCH_TOPIC = "DisableSearch"; + let HIDE_SEARCH_TOPIC = "HideSearch"; let SHOW_SEARCH_TOPIC = "ShowSearch"; let SEARCH_HANDOFF_TOPIC = "SearchHandoff"; function showSearch() { btn.classList.remove("focused"); - btn.classList.remove("disabled"); + btn.classList.remove("hidden"); RPMRemoveMessageListener(SHOW_SEARCH_TOPIC, showSearch); } - function disableSearch() { - btn.classList.add("disabled"); + function hideSearch() { + btn.classList.add("hidden"); } function handoffSearch(text) { RPMSendAsyncMessage(SEARCH_HANDOFF_TOPIC, { text }); RPMAddMessageListener(SHOW_SEARCH_TOPIC, showSearch); if (text) { - disableSearch(); + hideSearch(); } else { btn.classList.add("focused"); - RPMAddMessageListener(DISABLE_SEARCH_TOPIC, disableSearch); + RPMAddMessageListener(HIDE_SEARCH_TOPIC, hideSearch); } } btn.addEventListener("focus", function() { @@ -163,4 +135,7 @@ document.addEventListener("DOMContentLoaded", function() { ev.preventDefault(); handoffSearch(ev.clipboardData.getData("Text")); }); + + // Load contentSearchUI so it sets the search engine icon for us. + new window.ContentSearchHandoffUIController(); }); diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js index a53ada7a1a15..5cb3de6b51f2 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js @@ -109,7 +109,7 @@ add_task(async function test_search_handoff_on_keydown() { btn.click(); ok(btn.classList.contains("focused"), "in-content search has focus styles"); }); - ok(urlBarHasHiddenFocus(win), "Urlbar has hidden focus"); + ok(urlBarHasHiddenFocus(win), "url bar has hidden focused"); // Expect two searches, one to enter search mode and then another in search // mode. @@ -120,15 +120,21 @@ add_task(async function test_search_handoff_on_keydown() { ok( content.document .getElementById("search-handoff-button") - .classList.contains("disabled"), - "in-content search is disabled" + .classList.contains("hidden"), + "in-content search is hidden" ); }); await searchPromise; - ok(urlBarHasNormalFocus(win), "Urlbar has normal focus"); + ok(urlBarHasNormalFocus(win), "url bar has normal focused"); + await UrlbarTestUtils.assertSearchMode(win, { + engineName: "DuckDuckGo", + source: UrlbarUtils.RESULT_SOURCE.SEARCH, + entry: "handoff", + }); is(win.gURLBar.value, "f", "url bar has search text"); // Close the popup. + await UrlbarTestUtils.exitSearchMode(win); await UrlbarTestUtils.promisePopupClose(win); // Hitting ESC should reshow the in-content search @@ -137,8 +143,8 @@ add_task(async function test_search_handoff_on_keydown() { ok( !content.document .getElementById("search-handoff-button") - .classList.contains("disabled"), - "in-content search is not disabled" + .classList.contains("hidden"), + "in-content search is not hidden" ); }); @@ -154,11 +160,11 @@ add_task(async function test_search_handoff_on_composition_start() { await SpecialPowers.spawn(tab, [], async function() { content.document.getElementById("search-handoff-button").click(); }); - ok(urlBarHasHiddenFocus(win), "Urlbar has hidden focus"); + ok(urlBarHasHiddenFocus(win), "url bar has hidden focused"); await new Promise(r => EventUtils.synthesizeComposition({ type: "compositionstart" }, win, r) ); - ok(urlBarHasNormalFocus(win), "Urlbar has normal focus"); + ok(urlBarHasNormalFocus(win), "url bar has normal focused"); await BrowserTestUtils.closeWindow(win); }); @@ -172,7 +178,7 @@ add_task(async function test_search_handoff_on_paste() { await SpecialPowers.spawn(tab, [], async function() { content.document.getElementById("search-handoff-button").click(); }); - ok(urlBarHasHiddenFocus(win), "Urlbar has hidden focus"); + ok(urlBarHasHiddenFocus(win), "url bar has hidden focused"); var helper = SpecialPowers.Cc[ "@mozilla.org/widget/clipboardhelper;1" ].getService(SpecialPowers.Ci.nsIClipboardHelper); @@ -188,8 +194,13 @@ add_task(async function test_search_handoff_on_paste() { await searchPromise; - ok(urlBarHasNormalFocus(win), "Urlbar has normal focus"); - is(win.gURLBar.value, "words", "Urlbar has search text"); + ok(urlBarHasNormalFocus(win), "url bar has normal focused"); + await UrlbarTestUtils.assertSearchMode(win, { + engineName: "DuckDuckGo", + source: UrlbarUtils.RESULT_SOURCE.SEARCH, + entry: "handoff", + }); + is(win.gURLBar.value, "words", "url bar has search text"); await BrowserTestUtils.closeWindow(win); }); diff --git a/browser/components/search/content/contentSearchHandoffUI.js b/browser/components/search/content/contentSearchHandoffUI.js index a7d60afe5774..01d94450fa2c 100644 --- a/browser/components/search/content/contentSearchHandoffUI.js +++ b/browser/components/search/content/contentSearchHandoffUI.js @@ -20,29 +20,24 @@ ContentSearchHandoffUIController.prototype = { } }, - get defaultEngine() { - return this._defaultEngine; - }, - _onMsgEngine({ isPrivateWindow, engine }) { this._isPrivateWindow = isPrivateWindow; - this._updateEngine(engine); + this._updateEngineIcon(engine); }, _onMsgCurrentEngine(engine) { if (!this._isPrivateWindow) { - this._updateEngine(engine); + this._updateEngineIcon(engine); } }, _onMsgCurrentPrivateEngine(engine) { if (this._isPrivateWindow) { - this._updateEngine(engine); + this._updateEngineIcon(engine); } }, - _updateEngine(engine) { - this._defaultEngine = engine; + _updateEngineIcon(engine) { if (this._engineIcon) { URL.revokeObjectURL(this._engineIcon); } @@ -61,42 +56,6 @@ ContentSearchHandoffUIController.prototype = { "--newtab-search-icon", "url(" + this._engineIcon + ")" ); - - let fakeButton = document.querySelector(".search-handoff-button"); - let fakeInput = document.querySelector(".fake-textbox"); - if (!engine.isAppProvided) { - document.l10n.setAttributes( - fakeButton, - this._isPrivateWindow - ? "about-private-browsing-handoff-no-engine" - : "newtab-search-box-handoff-input-no-engine" - ); - document.l10n.setAttributes( - fakeInput, - this._isPrivateWindow - ? "about-private-browsing-handoff-text-no-engine" - : "newtab-search-box-handoff-text-no-engine" - ); - } else { - document.l10n.setAttributes( - fakeButton, - this._isPrivateWindow - ? "about-private-browsing-handoff" - : "newtab-search-box-handoff-input", - { - engine: engine.name, - } - ); - document.l10n.setAttributes( - fakeInput, - this._isPrivateWindow - ? "about-private-browsing-handoff-text" - : "newtab-search-box-handoff-text", - { - engine: engine.name, - } - ); - } }, // If the favicon is an array buffer, convert it into a Blob URI. diff --git a/browser/components/search/test/browser/browser_contentSearchUI_default.js b/browser/components/search/test/browser/browser_contentSearchUI_default.js index 6783e55b0f93..c21037cb8ae8 100644 --- a/browser/components/search/test/browser/browser_contentSearchUI_default.js +++ b/browser/components/search/test/browser/browser_contentSearchUI_default.js @@ -27,6 +27,8 @@ add_task(async function setup() { }); }); +// async function runAboutNewTabTest(expectedIcon) + async function ensureIcon(tab, expectedIcon) { await SpecialPowers.spawn(tab.linkedBrowser, [expectedIcon], async function( icon @@ -47,29 +49,7 @@ async function ensureIcon(tab, expectedIcon) { }); } -async function ensurePlaceholder(tab, expectedId, expectedEngine) { - await SpecialPowers.spawn( - tab.linkedBrowser, - [expectedId, expectedEngine], - async function(id, engine) { - await ContentTaskUtils.waitForCondition(() => !content.document.hidden); - - await ContentTaskUtils.waitForCondition( - () => content.document.querySelector(".search-handoff-button"), - "l10n ID not set." - ); - let buttonNode = content.document.querySelector(".search-handoff-button"); - let expectedAttributes = { id, args: engine ? { engine } : null }; - Assert.deepEqual( - content.document.l10n.getAttributes(buttonNode), - expectedAttributes, - "Expected updated l10n ID and args." - ); - } - ); -} - -async function runNewTabTest(isHandoff) { +async function runNewTabTest() { let tab = await BrowserTestUtils.openNewForegroundTab({ url: "about:newtab", gBrowser, @@ -79,45 +59,35 @@ async function runNewTabTest(isHandoff) { let engineIcon = defaultEngine.getIconURLBySize(16, 16); await ensureIcon(tab, engineIcon); - if (isHandoff) { - await ensurePlaceholder( - tab, - "newtab-search-box-handoff-input", - Services.search.defaultEngine.name - ); - } await Services.search.setDefault(addedEngine); // We only show the engine's own icon for app provided engines, otherwise show // a default. xref https://bugzilla.mozilla.org/show_bug.cgi?id=1449338#c19 await ensureIcon(tab, "chrome://global/skin/icons/search-glass.svg"); - if (isHandoff) { - await ensurePlaceholder(tab, "newtab-search-box-handoff-input-no-engine"); - } await Services.search.setDefault(defaultEngine); BrowserTestUtils.removeTab(tab); } -add_task(async function test_content_search_attributes() { +add_task(async function test_content_search_icon() { SpecialPowers.pushPrefEnv({ set: [[HANDOFF_PREF, true]], }); - await runNewTabTest(true); + await runNewTabTest(); }); -add_task(async function test_content_search_attributes_no_handoff() { +add_task(async function test_content_search_icon_no_handoff() { SpecialPowers.pushPrefEnv({ set: [[HANDOFF_PREF, false]], }); - await runNewTabTest(false); + await runNewTabTest(); }); -add_task(async function test_content_search_attributes_in_private_window() { +add_task(async function test_content_search_icon_in_private_window() { let win = await BrowserTestUtils.openNewBrowserWindow({ private: true, waitForTabURL: "about:privatebrowsing", @@ -127,18 +97,12 @@ add_task(async function test_content_search_attributes_in_private_window() { let engineIcon = defaultEngine.getIconURLBySize(16, 16); await ensureIcon(tab, engineIcon); - await ensurePlaceholder( - tab, - "about-private-browsing-handoff", - Services.search.defaultEngine.name - ); await Services.search.setDefault(addedEngine); // We only show the engine's own icon for app provided engines, otherwise show // a default. xref https://bugzilla.mozilla.org/show_bug.cgi?id=1449338#c19 await ensureIcon(tab, "chrome://global/skin/icons/search-glass.svg"); - await ensurePlaceholder(tab, "about-private-browsing-handoff-no-engine"); await Services.search.setDefault(defaultEngine); diff --git a/browser/components/urlbar/UrlbarUtils.jsm b/browser/components/urlbar/UrlbarUtils.jsm index 17c69437894b..26d4133f4f42 100644 --- a/browser/components/urlbar/UrlbarUtils.jsm +++ b/browser/components/urlbar/UrlbarUtils.jsm @@ -209,6 +209,7 @@ var UrlbarUtils = { // telemetry documentation and Scalars.yaml. SEARCH_MODE_ENTRY: new Set([ "bookmarkmenu", + "handoff", "keywordoffer", "oneoff", "other", diff --git a/browser/components/urlbar/docs/telemetry.rst b/browser/components/urlbar/docs/telemetry.rst index b1a6ce25a26c..9f96742d42e1 100644 --- a/browser/components/urlbar/docs/telemetry.rst +++ b/browser/components/urlbar/docs/telemetry.rst @@ -135,8 +135,7 @@ urlbar.searchmode.* menu. - ``handoff`` Used when the user uses the search box on the new tab page and is handed off - to the address bar. NOTE: This entry point was deprecated in Firefox 88. - Handoff no longer enters search mode. + to the address bar. - ``keywordoffer`` Used when the user selects a keyword offer result. - ``oneoff`` diff --git a/browser/components/urlbar/tests/browser/browser_searchFunction.js b/browser/components/urlbar/tests/browser/browser_searchFunction.js index fdc0463fe6bf..ba437c8d4ae8 100644 --- a/browser/components/urlbar/tests/browser/browser_searchFunction.js +++ b/browser/components/urlbar/tests/browser/browser_searchFunction.js @@ -191,14 +191,14 @@ add_task(async function searchWithAlias() { await UrlbarTestUtils.promisePopupOpen(window, async () => gURLBar.search(`${ALIAS} test`, { searchEngine: aliasEngine, - searchModeEntry: "topsites_urlbar", + searchModeEntry: "handoff", }) ); Assert.ok(gURLBar.hasAttribute("focused"), "Urlbar is focused"); await UrlbarTestUtils.assertSearchMode(window, { engineName: aliasEngine.name, - entry: "topsites_urlbar", + entry: "handoff", }); await assertUrlbarValue("test"); assertOneOffButtonsVisible(true); diff --git a/browser/components/urlbar/tests/browser/browser_urlbar_telemetry_searchmode.js b/browser/components/urlbar/tests/browser/browser_urlbar_telemetry_searchmode.js index 8a466c4ebe0a..f14279da43f0 100644 --- a/browser/components/urlbar/tests/browser/browser_urlbar_telemetry_searchmode.js +++ b/browser/components/urlbar/tests/browser/browser_urlbar_telemetry_searchmode.js @@ -392,6 +392,39 @@ add_task(async function test_tabmenu() { assertSearchModeScalars("tabmenu", "tabs"); }); +// Enters search mode by performing a search handoff on about:privatebrowsing. +// NOTE: We don't test handoff on about:home. Running mochitests on about:home +// is quite difficult. This subtest verifies that `handoff` is a valid scalar +// suffix and that a call to +// UrlbarInput.search(value, { searchEngine, searchModeEntry: "handoff" }) records values in +// the urlbar.searchmode.handoff scalar. PlacesFeed.test.js verfies that +// about:home handoff makes that exact call. +add_task(async function test_handoff_pbm() { + let win = await BrowserTestUtils.openNewBrowserWindow({ + private: true, + waitForTabURL: "about:privatebrowsing", + }); + let tab = win.gBrowser.selectedBrowser; + + await SpecialPowers.spawn(tab, [], async function() { + let btn = content.document.getElementById("search-handoff-button"); + btn.click(); + }); + + let searchPromise = UrlbarTestUtils.promiseSearchComplete(win); + await new Promise(r => EventUtils.synthesizeKey("f", {}, win, r)); + await searchPromise; + await UrlbarTestUtils.assertSearchMode(win, { + engineName, + entry: "handoff", + }); + assertSearchModeScalars("handoff", "other"); + + await UrlbarTestUtils.exitSearchMode(win); + await UrlbarTestUtils.promisePopupClose(win); + await BrowserTestUtils.closeWindow(win); +}); + // Enters search mode by tapping a search shortcut on the Touch Bar. add_task(async function test_touchbar() { if (AppConstants.platform != "macosx") { diff --git a/browser/locales/en-US/browser/aboutPrivateBrowsing.ftl b/browser/locales/en-US/browser/aboutPrivateBrowsing.ftl index acf4121f470e..306e1b8f1beb 100644 --- a/browser/locales/en-US/browser/aboutPrivateBrowsing.ftl +++ b/browser/locales/en-US/browser/aboutPrivateBrowsing.ftl @@ -4,18 +4,11 @@ privatebrowsingpage-open-private-window-label = Open a Private Window .accesskey = P +about-private-browsing-search-placeholder = Search the Web about-private-browsing-info-title = You’re in a Private Window about-private-browsing-info-myths = Common myths about private browsing -# Variables -# $engine (String): the name of the user's default search engine -about-private-browsing-handoff = - .title = Search with { $engine } or enter address -about-private-browsing-handoff-no-engine = - .title = Search or enter address -# Variables -# $engine (String): the name of the user's default search engine -about-private-browsing-handoff-text = Search with { $engine } or enter address -about-private-browsing-handoff-text-no-engine = Search or enter address +about-private-browsing = + .title = Search the Web about-private-browsing-not-private = You are currently not in a private window. about-private-browsing-info-description = { -brand-short-name } clears your search and browsing history when you quit the app or close all Private Browsing tabs and windows. While this doesn’t make you anonymous to websites or your internet service provider, it makes it easier to keep what you do online private from anyone else who uses this computer. diff --git a/browser/locales/en-US/browser/newtab/newtab.ftl b/browser/locales/en-US/browser/newtab/newtab.ftl index 93ead99eae9b..ed1c352b7410 100644 --- a/browser/locales/en-US/browser/newtab/newtab.ftl +++ b/browser/locales/en-US/browser/newtab/newtab.ftl @@ -18,26 +18,13 @@ newtab-search-box-search-button = .title = Search .aria-label = Search -# Variables -# $engine (String): the name of the user's default search engine -newtab-search-box-handoff-text = Search with { $engine } or enter address -newtab-search-box-handoff-text-no-engine = Search or enter address -# Variables -# $engine (String): the name of the user's default search engine -newtab-search-box-handoff-input = - .placeholder = Search with { $engine } or enter address - .title = Search with { $engine } or enter address - .aria-label = Search with { $engine } or enter address -newtab-search-box-handoff-input-no-engine = - .placeholder = Search or enter address - .title = Search or enter address - .aria-label = Search or enter address - +newtab-search-box-search-the-web-text = Search the Web newtab-search-box-search-the-web-input = .placeholder = Search the Web .title = Search the Web .aria-label = Search the Web +newtab-search-box-text = Search the web newtab-search-box-input = .placeholder = Search the web .aria-label = Search the web diff --git a/browser/themes/shared/privatebrowsing/aboutPrivateBrowsing.css b/browser/themes/shared/privatebrowsing/aboutPrivateBrowsing.css index b69a816eff73..df0daf694774 100644 --- a/browser/themes/shared/privatebrowsing/aboutPrivateBrowsing.css +++ b/browser/themes/shared/privatebrowsing/aboutPrivateBrowsing.css @@ -101,19 +101,20 @@ p { padding-inline: 46px 48px; position: relative; opacity: 1; + transition: opacity 500ms; width: 100%; -moz-context-properties: fill; fill: rgba(12, 12, 13, 0.4); } -.search-handoff-button.focused:not(.disabled) { +.search-handoff-button.focused { border: solid 1px #0060df; box-shadow: 0 0 0 1px #0060df, 0 0 0 4px rgba(0, 96, 223, 0.3); } -.search-handoff-button.disabled { - opacity: 0.5; - box-shadow: none; +.search-handoff-button.hidden { + opacity: 0; + visibility: hidden; } .search-handoff-button:dir(rtl), @@ -126,7 +127,7 @@ p { background-color: #fff; } -.search-handoff-button.focused:not(.disabled) .fake-caret { +.search-handoff-button.focused .fake-caret { display: block; } diff --git a/toolkit/modules/RemotePageAccessManager.jsm b/toolkit/modules/RemotePageAccessManager.jsm index 7f79ef4c56b4..5d9dfd864747 100644 --- a/toolkit/modules/RemotePageAccessManager.jsm +++ b/toolkit/modules/RemotePageAccessManager.jsm @@ -124,11 +124,7 @@ let RemotePageAccessManager = { "OpenSearchPreferences", "SearchHandoff", ], - RPMSendQuery: [ - "ShouldShowSearch", - "ShouldShowSearchBanner", - "ShouldShowVPNPromo", - ], + RPMSendQuery: ["ShouldShowSearchBanner", "ShouldShowVPNPromo"], RPMAddMessageListener: ["*"], RPMRemoveMessageListener: ["*"], RPMGetFormatURLPref: [