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


Commits:
63eecb92 by hackademix at 2023-08-08T08:08:43+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

- - - - -


1 changed file:

- toolkit/components/resistfingerprinting/RFPHelper.sys.mjs


Changes:

=====================================
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/-/commit/63eecb9243e5fb0af6fb158e1abd93aaaab8be32

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/63eecb9243e5fb0af6fb158e1abd93aaaab8be32
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to