[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-148.0a1-16.0-2] 3 commits: BB 43850: Modify the Contrast Control settings for RFP.



Title: GitLab

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:

Changes:

  • browser/components/preferences/main.js
    ... ... @@ -1914,9 +1914,37 @@ Preferences.addSetting({
    1914 1914
     Preferences.addSetting({
    
    1915 1915
       id: "contrastControlSettings",
    
    1916 1916
       pref: "browser.display.document_color_use",
    
    1917
    +  // Modify the contrast setting options when resist fingerprinting (RFP) is
    
    1918
    +  // enabled because the custom colours will not be used in this state.
    
    1919
    +  // Instead, some fixed set of stand-in colours is used. tor-browser#43850.
    
    1920
    +  deps: ["resistFingerprinting"],
    
    1921
    +  getControlConfig(config, { resistFingerprinting }, setting) {
    
    1922
    +    if (resistFingerprinting.value) {
    
    1923
    +      // Hide the "Automatic" option under RFP if it is not already
    
    1924
    +      // selected. We generally want to discourage this reflection of system
    
    1925
    +      // settings if RFP is enabled.
    
    1926
    +      // NOTE: It would be unexpected for this value to be selected under
    
    1927
    +      // RFP since there is no visible UI to do so in this state. It would
    
    1928
    +      // likely require some direct preference manipulation.
    
    1929
    +      config.options[0].hidden = setting.value != config.options[0].value;
    
    1930
    +      // Show the last option as "fixed colors".
    
    1931
    +      config.options[2].l10nId = "preferences-contrast-control-fixed-color2";
    
    1932
    +    } else {
    
    1933
    +      // Set back to the default config.
    
    1934
    +      config.options[0].hidden = false;
    
    1935
    +      config.options[2].l10nId = "preferences-contrast-control-custom";
    
    1936
    +    }
    
    1937
    +    return config;
    
    1938
    +  },
    
    1917 1939
     });
    
    1918 1940
     Preferences.addSetting({
    
    1919 1941
       id: "colors",
    
    1942
    +  // Hide the "colors" button and dialog when resist fingerprint (RFP) is
    
    1943
    +  // enabled because the custom colours will not be used. tor-browser#43850.
    
    1944
    +  deps: ["resistFingerprinting"],
    
    1945
    +  visible: ({ resistFingerprinting }) => {
    
    1946
    +    return !resistFingerprinting.value;
    
    1947
    +  },
    
    1920 1948
       onUserClick() {
    
    1921 1949
         gSubDialog.open(
    
    1922 1950
           "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
    108 108
     
    
    109 109
     ## Preferences - Contrast Control.
    
    110 110
     
    
    111
    -preferences-contrast-control-fixed-color =
    
    111
    +preferences-contrast-control-fixed-color2 =
    
    112 112
         .label = Fixed colors
    
    113 113
         .accesskey = F
    
    114
    -preferences-contrast-control-fixed-color-description = This will be detectable by websites and will make you appear more unique to web trackers.
    
    114
    +    .description = This will be detectable by websites and will make you appear more unique to web trackers.
    
    115 115
     
    
    116 116
     ## Security level toolbar button.
    
    117 117
     ## Uses sentence case in English (US).
    

  • tools/torbrowser/l10n/migrations/bug-44675-contrast-controls-description.py
    1
    +from fluent.migrate.helpers import transforms_from
    
    2
    +
    
    3
    +
    
    4
    +def migrate(ctx):
    
    5
    +    ctx.add_transforms(
    
    6
    +        "base-browser.ftl",
    
    7
    +        "base-browser.ftl",
    
    8
    +        transforms_from(
    
    9
    +            """
    
    10
    +preferences-contrast-control-fixed-color2 =
    
    11
    +     .label = { COPY_PATTERN(path, "preferences-contrast-control-fixed-color.label") }
    
    12
    +     .accesskey = { COPY_PATTERN(path, "preferences-contrast-control-fixed-color.accesskey") }
    
    13
    +     .description = { COPY_PATTERN(path, "preferences-contrast-control-fixed-color-description") }
    
    14
    +""",
    
    15
    +            path="base-browser.ftl",
    
    16
    +        ),
    
    17
    +    )

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx