henry pushed to branch mullvad-browser-140.5.0esr-15.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 6365e59b by Henry Wilkes at 2025-11-19T15:23:24+00:00 fixup! MB 213: Customize the search engines list. MB 488: Drop Mullvad Leta search engine. - - - - - c8f095e2 by Henry Wilkes at 2025-11-19T15:23:25+00:00 MB 488: Adjust search engine removal notification for Mullvad Leta. - - - - - 6 changed files: - browser/components/search/SearchUIUtils.sys.mjs - toolkit/components/search/SearchService.sys.mjs - toolkit/components/search/content/base-browser-search-engine-icons.json - toolkit/components/search/content/base-browser-search-engines.json - − toolkit/components/search/content/mullvad-leta.svg - toolkit/components/search/tests/xpcshell/test_base_browser.js Changes: ===================================== browser/components/search/SearchUIUtils.sys.mjs ===================================== @@ -76,8 +76,12 @@ export var SearchUIUtils = { * name of the engine to be moved and replaced. * @param {string} newEngine * name of the application default engine to replaced the removed engine. + * @param {object} [details] + * Additional details about the removed search engine. + * @param {boolean} [details.removedMullvadLeta] + * Whether we removed Mullvad Leta. */ - async removalOfSearchEngineNotificationBox(oldEngine, newEngine) { + async removalOfSearchEngineNotificationBox(oldEngine, newEngine, details) { let win = lazy.BrowserWindowTracker.getTopWindow(); let buttons = [ @@ -91,9 +95,14 @@ export var SearchUIUtils = { win.gNotificationBox.removeNotification(notificationBox); }, }, - { - supportPage: "search-engine-removal", - }, + details?.removedMullvadLeta + ? { + link: "https://leta.mullvad.net/mullvad-browser", + "l10n-id": "moz-support-link-text", + } + : { + supportPage: "search-engine-removal", + }, ]; await win.gNotificationBox.appendNotification( ===================================== toolkit/components/search/SearchService.sys.mjs ===================================== @@ -1811,7 +1811,11 @@ export class SearchService { this._showRemovalOfSearchEngineNotificationBox( prevCurrentEngineName || prevAppDefaultEngineName, - newCurrentEngineName + newCurrentEngineName, + { + removedMullvadLeta: + (prevCurrentEngineId || prevAppDefaultEngineId) === "mullvad-leta", + } ); } } @@ -1889,7 +1893,13 @@ export class SearchService { // the user changes their locale it causes a change in engines. // If there is no update to settings metadata then the engine change was // caused by an update to config rather than a user changing their locale. - if (!this.#didSettingsMetaDataUpdate(prevMetaData)) { + // + // For the removal of Mullvad Leta, we show the notification even if the + // locale also changed because this change is not locale-dependant. + if ( + (prevCurrentEngineId || prevAppDefaultEngineId) === "mullvad-leta" || + !this.#didSettingsMetaDataUpdate(prevMetaData) + ) { return true; } } @@ -3728,16 +3738,22 @@ export class SearchService { * The name of the previous default engine that will be replaced. * @param {string} newCurrentEngineName * The name of the engine that will be the new default engine. + * @param {object} [details] + * Additional details about the removed search engine. + * @param {boolean} [details.removedMullvadLeta] + * Whether we removed Mullvad Leta. */ _showRemovalOfSearchEngineNotificationBox( prevCurrentEngineName, - newCurrentEngineName + newCurrentEngineName, + details ) { lazy.BrowserUtils.callModulesFromCategory( { categoryName: "search-service-notification" }, "search-engine-removal", prevCurrentEngineName, - newCurrentEngineName + newCurrentEngineName, + details ); } ===================================== toolkit/components/search/content/base-browser-search-engine-icons.json ===================================== @@ -1,10 +1,4 @@ { - "mullvad-leta": [ - { - "url": "chrome://global/content/search/mullvad-leta.svg", - "imageSize": 16 - } - ], "ddg": [ { "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 } ], ===================================== toolkit/components/search/content/base-browser-search-engines.json ===================================== @@ -1,22 +1,4 @@ [ - { - "base": { - "aliases": ["mullvad-leta", "leta", "mullvad", "ml"], - "classification": "general", - "name": "Mullvad Leta", - "urls": { - "search": { - "base": "https://leta.mullvad.net/", - "params": [], - "searchTermParamName": "q" - } - } - }, - "id": "ee88d691-6d7a-4adb-9fec-5a205565505a", - "identifier": "mullvad-leta", - "recordType": "engine", - "variants": [{ "environment": { "allRegionsAndLocales": true } }] - }, { "base": { "aliases": ["duckduckgo", "ddg"], @@ -127,23 +109,15 @@ }, { "recordType": "defaultEngines", - "globalDefault": "mullvad-leta", - "globalDefaultPrivate": "mullvad-leta" + "globalDefault": "ddg", + "globalDefaultPrivate": "dgg" }, { "recordType": "engineOrders", "orders": [ { "environment": { "allRegionsAndLocales": true }, - "order": [ - "mullvad-leta", - "ddg", - "ddg-html", - "ddg-noai", - "mojeek", - "brave", - "startpage" - ] + "order": ["ddg", "ddg-html", "ddg-noai", "mojeek", "brave", "startpage"] } ] } ===================================== toolkit/components/search/content/mullvad-leta.svg deleted ===================================== @@ -1,25 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" id="Mullvad_VPN_Logo_Positive" x="0" y="0" version="1.1" - viewBox="0 0 252.70001 252.6" xml:space="preserve"> - <g id="Logo" transform="translate(-566.2 -73.7)"> - <path id="bg" fill="#192e45" fill-rule="evenodd" - d="M566.2 200c0 69.8 56.6 126.3 126.3 126.3 69.7 0 126.4-56.5 126.4-126.3S762.3 73.7 692.5 73.7c-69.8 0-126.3 56.5-126.3 126.3z" - clip-rule="evenodd" /> - <path id="Mullvad_Fur" fill="#d0933a" fill-rule="evenodd" - d="M583.1 184.9l9.6-13.4c0 .1-.6 19.3-.6 19.3l2.7-14.5c8 16.2 27.6 38.6 45.5 50.6 1.9 1.3 3.5 2.7 4.6 4.1 2.3.9 4.6 1.4 6.9 1.8 1.2.2 2.5.3 3.7.4 1.2.1 2.5.1 3.7.1 1.2 0 2.4-.1 3.6-.2 1.2-.1 2.4-.3 3.6-.5 1.2-.2 2.4-.4 3.5-.8 1.2-.3 2.3-.6 3.5-1 1.1-.3 2.3-.8 3.4-1.2 1.1-.5 2.2-.9 3.3-1.5 1.1-.6 2.2-1.1 3.2-1.7 1.1-.5 2.1-1.2 3.2-1.8 1.1-.6 2.1-1.3 3.2-1.9 1.1-.6 2.1-1.3 3.1-1.9 1-.7 2.1-1.3 3.1-2s2.1-1.3 3.2-2l1-.6.5.3 7.2 4.8-7.3-1.9c-.7.8-1.4 1.6-2.2 2.4-.9.9-1.9 1.8-2.8 2.7-1 .8-2 1.7-3.1 2.4-1.1.8-2.1 1.5-3.3 2.2-2.2 1.4-4.6 2.6-7.1 3.6-1.2.5-2.5 1-3.7 1.4-1.3.4-2.5.8-3.8 1.1-1.3.3-2.6.6-3.9.8-1.3.2-2.6.3-3.9.5-2.6.1-5.3.1-7.9-.3-1.3-.2-2.6-.4-3.9-.7-1.3-.3-2.5-.7-3.7-1.1-2.1-.8-4.2-1.8-6.1-3 0 0-6.9 1-4.1 6.2 2.8 5.2 7 4.7 5 10.8-1.4 3.3-3.4 6.5-5.6 9.5-4.6 6.2-11.8 11.7-11.1 15 32.7 40.3 106.4 34.7 134.4-1.3-.4-5.2-8.6-7.7-14.3-20.4 1.6.5 4 1.2 4 1.1 0-.1-6.8-11.1-7.1-12.2l4.4.3s-5.8-7.2-6-7.9l5.9-.8s-7.4-8.5-7.5-9.2l7.5 1.2-8.2-9.9h3.9l-4.6-6.7c-.8-.3-1.6-.5-2.4-.7l-3-.9c-11.2-3.5-21.8-6.7-32-13.1-14.3-8.9-27.1-19.8-36.7-28.3l-19.3-9.4c-18.5-1.4-35.9-.9-46.5 1.2l6.8-11.6-10.4 12.5c-.7-.2-.9-.6-.9-.6l.7-15.4-3.3 13.9c-1-.5-2.2-.7-3.4-.7-4.6 0-8.3 3.7-8.3 8.3 0 4.2 3.1 7.7 7.2 8.2l-7.1 14.4z" - clip-rule="evenodd" /> - <path id="Mullvad_Nose" fill="#ffcc86" fill-rule="evenodd" - d="M594.8 154.5c-1-.4-2.2-.7-3.3-.7-4.6 0-8.3 3.7-8.3 8.3 0 4 2.9 7.4 6.7 8.2h.2c2.5-.8 7.5-7.5 6.7-11.7-.4-1.5-1-2.9-2-4.1z" - clip-rule="evenodd" /> - <path id="Mullvad_Helmet" fill="#fdd321" fill-rule="evenodd" - d="M667.6 143.8c-1.5-4.1-1.1-9.4 1-14.4 3-6.9 8.7-11.5 14.1-11.5 1.1 0 2.1.2 3.1.6 3.1-2.8 6.7-5.1 10.7-6.7 22.1-8.8 54.4 6.9 62.7 28.6 4 10.5 2.8 22-.6 32.5-2.8 8.6-13 21-9.2 30.4-1.5-.4-33.1-10.2-41.9-15.8-14.1-8.8-26.8-19.6-36.3-28l-.3-.3-32.1-15.2c-.4-.2-.8-.4-1.1-.6 4.6 0 22.1 2.1 29.9.4" - clip-rule="evenodd" /> - <g id="Helmet_Lamp"> - <path id="path113" fill="#fff" - d="M677.1 147.4c-.9 0-1.6-.2-2.3-.5-1.6-.7-2.8-2-3.6-4-1.4-3.4-1-8.1.9-12.5 2.5-5.6 7.3-9.7 11.5-9.7.8 0 1.6.2 2.4.5 2.1.9 3.6 3 4.1 6 .6 3.2.1 6.9-1.5 10.4-2.4 5.7-7.3 9.8-11.5 9.8z" /> - <g id="g117"> - <path id="path115" fill="#1d2a3a" - d="M683.6 122.3c.6 0 1.2.1 1.8.4 1.6.7 2.8 2.5 3.2 4.9.5 2.9.1 6.3-1.4 9.5-2.2 5.1-6.5 8.8-10.1 8.8-.6 0-1.2-.1-1.7-.3-1.5-.6-2.3-2-2.7-3.1-1.2-3-.9-7.4.8-11.4 2.2-5.1 6.5-8.8 10.1-8.8m0-3c-4.8 0-10.1 4.4-12.9 10.7-2.1 4.7-2.4 9.8-.9 13.7.9 2.3 2.4 3.9 4.3 4.8.9.4 1.9.6 3 .6 4.8 0 10.1-4.4 12.8-10.7 1.7-3.8 2.2-7.8 1.6-11.3-.6-3.5-2.4-6-5-7.1-.9-.5-1.9-.7-2.9-.7z" /> - </g> - </g> - </g> -</svg> ===================================== toolkit/components/search/tests/xpcshell/test_base_browser.js ===================================== @@ -11,7 +11,6 @@ "use strict"; const expectedURLs = { - "mullvad-leta": "https://leta.mullvad.net/?q=test", ddg: "https://duckduckgo.com/?q=test", "ddg-html": "https://html.duckduckgo.com/html/?q=test", "ddg-noai": "https://noai.duckduckgo.com/?q=test", @@ -19,7 +18,7 @@ const expectedURLs = { brave: "https://search.brave.com/search?q=test", startpage: "https://www.startpage.com/sp/search?q=test", }; -const defaultEngine = "mullvad-leta"; +const defaultEngine = "ddg"; add_setup(async function setup() { await Services.search.init(); View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/446... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/446... You're receiving this email because of your account on gitlab.torproject.org.