[tbb-commits] [Git][tpo/applications/tor-browser][base-browser-115.1.0esr-13.0-1] 2 commits: amend! Bug 32308: use direct browser sizing for letterboxing.

ma1 (@ma1) git at gitlab.torproject.org
Tue Aug 8 07:18:27 UTC 2023



ma1 pushed to branch base-browser-115.1.0esr-13.0-1 at The Tor Project / Applications / Tor Browser


Commits:
dc2274d0 by hackademix at 2023-08-08T09:18:01+02:00
amend! Bug 32308: use direct browser sizing for letterboxing.

Bug 32308: use direct browser sizing for letterboxing.
Bug 30556: align letterboxing with 200x100 new win width stepping

- - - - -
9ac98dab by hackademix at 2023-08-08T09:18:02+02:00
fixup! Firefox preference overrides.

Bug 33282: Redefine the dimensions of new RFP windows

- - - - -


2 changed files:

- browser/app/profile/001-base-profile.js
- toolkit/components/resistfingerprinting/RFPHelper.sys.mjs


Changes:

=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -291,6 +291,9 @@ pref("dom.use_components_shim", false);
 pref("privacy.resistFingerprinting.letterboxing", true);
 // tor-browser#41695: how many warnings we show if user closes them without restoring the window size
 pref("privacy.resistFingerprinting.resizeWarnings", 3);
+// tor-browser#33282: new windows start at 1400x900 when there's enough screen space, otherwise down by 200x100 blocks
+pref("privacy.window.maxInnerWidth", 1400);
+pref("privacy.window.maxInnerHeight", 900);
 // Enforce Network Information API as disabled
 pref("dom.netinfo.enabled", false);
 pref("network.http.referer.defaultPolicy", 2); // Bug 32948: Make referer behavior consistent regardless of private browing mode status


=====================================
toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
=====================================
@@ -475,14 +475,14 @@ class _RFPHelper {
   /**
    * Given a width or height, rounds it with the proper stepping.
    */
-  steppedSize(aDimension) {
+  steppedSize(aDimension, isWidth = false) {
     let stepping;
     if (aDimension <= 50) {
       return 0;
     } else if (aDimension <= 500) {
       stepping = 50;
     } else if (aDimension <= 1600) {
-      stepping = 100;
+      stepping = isWidth ? 200 : 100;
     } else {
       stepping = 200;
     }
@@ -569,7 +569,7 @@ class _RFPHelper {
       // If the set is empty, we will round the content with the default
       // stepping size.
       if (!this._letterboxingDimensions.length) {
-        result = r(this.steppedSize(aWidth), this.steppedSize(aHeight));
+        result = r(this.steppedSize(aWidth, true), this.steppedSize(aHeight));
         log(
           `${logPrefix} roundDimensions(${aWidth}, ${aHeight}) = ${result.width} x ${result.height}`
         );



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/65183e255d3b18a1f237819c32696cd51bf360bc...9ac98dab00b7285c32dcbe3ad1bcac33c44dd507

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/65183e255d3b18a1f237819c32696cd51bf360bc...9ac98dab00b7285c32dcbe3ad1bcac33c44dd507
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230808/07fa4b0b/attachment-0001.htm>


More information about the tbb-commits mailing list