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

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-152.0a1-16.0-2] fixup! BB 32308: Use direct browser sizing for letterboxing.



Title: GitLab

morgan pushed to branch tor-browser-152.0a1-16.0-2 at The Tor Project / Applications / Tor Browser

Commits:

  • 43543c5a
    by Henry Wilkes at 2026-06-08T14:16:11+00:00
    fixup! BB 32308: Use direct browser sizing for letterboxing.
    
    BB 45017: CSS variable names for letterboxing.
    

1 changed file:

Changes:

  • toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
    ... ... @@ -997,7 +997,7 @@ class _RFPHelper {
    997 997
         let colorRGBA;
    
    998 998
         if (!verticalTabs) {
    
    999 999
           lazy.logConsole.debug("Toolbar background used.");
    
    1000
    -      colorRGBA = this._convertToRGBA(win, style, "--toolbar-bgcolor");
    
    1000
    +      colorRGBA = this._convertToRGBA(win, style, "--toolbar-background-color");
    
    1001 1001
           if (colorRGBA.a === 1) {
    
    1002 1002
             return colorRGBA;
    
    1003 1003
           }
    
    ... ... @@ -1027,7 +1027,7 @@ class _RFPHelper {
    1027 1027
           lazy.logConsole.debug("Toolbox background used.");
    
    1028 1028
           colorRGBA = this._composeRGBA(
    
    1029 1029
             colorRGBA,
    
    1030
    -        this._convertToRGBA(win, style, "--toolbox-bgcolor")
    
    1030
    +        this._convertToRGBA(win, style, "--toolbox-background-color")
    
    1031 1031
           );
    
    1032 1032
           if (colorRGBA.a === 1) {
    
    1033 1033
             return colorRGBA;
    
    ... ... @@ -1040,7 +1040,11 @@ class _RFPHelper {
    1040 1040
         // We use the theme's text colour to figure out whether the urlbar
    
    1041 1041
         // background is overall meant to be light or dark. Unlike the urlbar, we
    
    1042 1042
         // expect this colour to be (almost) opaque.
    
    1043
    -    const textRGBA = this._convertToRGBA(win, style, "--toolbar-field-color");
    
    1043
    +    const textRGBA = this._convertToRGBA(
    
    1044
    +      win,
    
    1045
    +      style,
    
    1046
    +      "--toolbar-field-text-color"
    
    1047
    +    );
    
    1044 1048
         const textColor = new lazy.Color(textRGBA.r, textRGBA.g, textRGBA.b);
    
    1045 1049
         if (textColor.relativeLuminance >= 0.5) {
    
    1046 1050
           // Light text, so assume it has a dark background.
    
    ... ... @@ -1077,8 +1081,8 @@ class _RFPHelper {
    1077 1081
     
    
    1078 1082
           const verticalTabs = Services.prefs.getBoolPref(kPrefVerticalTabs);
    
    1079 1083
           const chromeTextColorProperty = verticalTabs
    
    1080
    -        ? "--toolbox-textcolor"
    
    1081
    -        : "--toolbar-color";
    
    1084
    +        ? "--toolbox-text-color"
    
    1085
    +        : "--toolbar-text-color";
    
    1082 1086
     
    
    1083 1087
           const navbarStyle = win.getComputedStyle(
    
    1084 1088
             win.document.getElementById("nav-bar")
    
    ... ... @@ -1099,10 +1103,10 @@ class _RFPHelper {
    1099 1103
           // NOTE: In the default theme (no "lwtheme" attribute) with
    
    1100 1104
           // browser.theme.native-theme set to false, --toolbar-field-color can be
    
    1101 1105
           // set to "inherit", which means it will have a blank computed value. We
    
    1102
    -      // fallback to --toolbar-color or --toolbox-textcolor in this case.
    
    1106
    +      // fallback to --toolbar-text-color or --toolbox-text-color in this case.
    
    1103 1107
           // Similarly, for windows OS, it can be set to "currentColor".
    
    1104 1108
           urlbarTextRGBA = this._composeRGBA(
    
    1105
    -        this._convertToRGBA(win, navbarStyle, "--toolbar-field-color", {
    
    1109
    +        this._convertToRGBA(win, navbarStyle, "--toolbar-field-text-color", {
    
    1106 1110
               fallbackProperty: chromeTextColorProperty,
    
    1107 1111
               currentColorProperty: chromeTextColorProperty,
    
    1108 1112
             }),
    

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