tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit f68db7cbe3d01b7764675c9b3d30113281f6a002
parent 77c6e5c16d057496b35873b800176cfc1ec95cdb
Author: Mike Conley <mconley@mozilla.com>
Date:   Fri, 19 Dec 2025 20:01:02 +0000

Bug 2004420 - Remove AboutPreferences.sys.mjs train-hop compatibility shims now that Firefox 146 has shipped. r=home-newtab-reviewers,maxx

Differential Revision: https://phabricator.services.mozilla.com/D277201

Diffstat:
Mbrowser/extensions/newtab/lib/AboutPreferences.sys.mjs | 30+++---------------------------
1 file changed, 3 insertions(+), 27 deletions(-)

diff --git a/browser/extensions/newtab/lib/AboutPreferences.sys.mjs b/browser/extensions/newtab/lib/AboutPreferences.sys.mjs @@ -168,30 +168,19 @@ export class AboutPreferences { */ /** - * @backward-compat { version 146 } - * - * The `web-search` DOM node will not exist until Fx146+ so we have - * to fall back to the `search` DOM node. Adding this shim causes - * renderPreferenceSection to have too many statements. We can remove - * this eslint exception once we are in Fx146+. + * We can remove this eslint exception once the Settings redesign is complete. + * In fact, we can probably remove this entire method. */ // eslint-disable-next-line max-statements renderPreferenceSection(sectionData, document, Preferences) { - /** - * @backward-compat { version 146 } - * - * We have to potentially re-assign the `id` if it is `web-search`. - * We should restore `id` back to a const after Fx146+. - */ - /* Do not render old-style settings if new settings UI is enabled - this is needed to avoid * registering prefs twice and ensuing errors */ if (Services.prefs.getBoolPref("browser.settings-redesign.enabled")) { return; } - let { id } = sectionData; const { + id, pref: prefData, maxRows, rowsPref, @@ -220,19 +209,6 @@ export class AboutPreferences { return; } - /** - * @backward-compat { version 146 } - * - * The `web-search` DOM node will not exist until Fx146+ so fall - * back to the `search` DOM node until then. - */ - if (id === "web-search") { - let webSearchBox = document.getElementById(id); - if (!webSearchBox) { - id = "search"; - } - } - // Add the main preference for turning on/off a section const sectionVbox = document.getElementById(id); sectionVbox.setAttribute("data-subcategory", id);