henry pushed to branch tor-browser-148.0a1-16.0-2 at The Tor Project / Applications / Tor Browser Commits: d51551b6 by Henry Wilkes at 2026-03-10T10:04:18+00:00 BB 43850: Modify the Contrast Control settings for RFP. - - - - - 0c86d831 by Henry Wilkes at 2026-03-10T10:04:18+00:00 fixup! Base Browser strings TB 44675: Merge the description into the moz-checkbox element. - - - - - 69de662a by Henry Wilkes at 2026-03-10T10:04:18+00:00 fixup! Tor Browser localization migration scripts. TB 44675: Add migration for merging description into the moz-checkbox Fluent message. - - - - - 3 changed files: - browser/components/preferences/main.js - toolkit/locales/en-US/toolkit/global/base-browser.ftl - + tools/torbrowser/l10n/migrations/bug-44675-contrast-controls-description.py Changes: ===================================== browser/components/preferences/main.js ===================================== @@ -1914,9 +1914,37 @@ Preferences.addSetting({ Preferences.addSetting({ id: "contrastControlSettings", pref: "browser.display.document_color_use", + // Modify the contrast setting options when resist fingerprinting (RFP) is + // enabled because the custom colours will not be used in this state. + // Instead, some fixed set of stand-in colours is used. tor-browser#43850. + deps: ["resistFingerprinting"], + getControlConfig(config, { resistFingerprinting }, setting) { + if (resistFingerprinting.value) { + // Hide the "Automatic" option under RFP if it is not already + // selected. We generally want to discourage this reflection of system + // settings if RFP is enabled. + // NOTE: It would be unexpected for this value to be selected under + // RFP since there is no visible UI to do so in this state. It would + // likely require some direct preference manipulation. + config.options[0].hidden = setting.value != config.options[0].value; + // Show the last option as "fixed colors". + config.options[2].l10nId = "preferences-contrast-control-fixed-color2"; + } else { + // Set back to the default config. + config.options[0].hidden = false; + config.options[2].l10nId = "preferences-contrast-control-custom"; + } + return config; + }, }); Preferences.addSetting({ id: "colors", + // Hide the "colors" button and dialog when resist fingerprint (RFP) is + // enabled because the custom colours will not be used. tor-browser#43850. + deps: ["resistFingerprinting"], + visible: ({ resistFingerprinting }) => { + return !resistFingerprinting.value; + }, onUserClick() { gSubDialog.open( "chrome://browser/content/preferences/dialogs/colors.xhtml", ===================================== toolkit/locales/en-US/toolkit/global/base-browser.ftl ===================================== @@ -108,10 +108,10 @@ browser-layout-show-sidebar-desc-limited = Quickly access bookmarks and more wit ## Preferences - Contrast Control. -preferences-contrast-control-fixed-color = +preferences-contrast-control-fixed-color2 = .label = Fixed colors .accesskey = F -preferences-contrast-control-fixed-color-description = This will be detectable by websites and will make you appear more unique to web trackers. + .description = This will be detectable by websites and will make you appear more unique to web trackers. ## Security level toolbar button. ## Uses sentence case in English (US). ===================================== tools/torbrowser/l10n/migrations/bug-44675-contrast-controls-description.py ===================================== @@ -0,0 +1,17 @@ +from fluent.migrate.helpers import transforms_from + + +def migrate(ctx): + ctx.add_transforms( + "base-browser.ftl", + "base-browser.ftl", + transforms_from( + """ +preferences-contrast-control-fixed-color2 = + .label = { COPY_PATTERN(path, "preferences-contrast-control-fixed-color.label") } + .accesskey = { COPY_PATTERN(path, "preferences-contrast-control-fixed-color.accesskey") } + .description = { COPY_PATTERN(path, "preferences-contrast-control-fixed-color-description") } +""", + path="base-browser.ftl", + ), + ) View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/b8ef132... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/b8ef132... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
henry (@henry)