[tbb-commits] [Git][tpo/applications/tor-browser][base-browser-102.12.0esr-12.5-1] fixup! Bug 32308: use direct browser sizing for letterboxing.

ma1 (@ma1) git at gitlab.torproject.org
Mon Jun 12 08:31:38 UTC 2023



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


Commits:
c8ea1c20 by hackademix at 2023-06-12T10:30:29+02:00
fixup! Bug 32308: use direct browser sizing for letterboxing.

- - - - -


1 changed file:

- toolkit/components/resistfingerprinting/RFPHelper.jsm


Changes:

=====================================
toolkit/components/resistfingerprinting/RFPHelper.jsm
=====================================
@@ -51,7 +51,7 @@ function forEachWindow(callback) {
 
 
 async function windowResizeHandler(aEvent) {
-  if (RFPHelper.letterboxingEnabled) {
+  if (RFPHelper.letterboxingEnabled || !RFPHelper.rfpEnabled) {
     return;
   }
   if (Services.prefs.getIntPref(kPrefResizeWarnings) <= 0) {
@@ -250,7 +250,9 @@ class _RFPHelper {
   }
 
   _handleResistFingerprintingChanged() {
-    if (Services.prefs.getBoolPref(kPrefResistFingerprinting)) {
+    if (
+      (this.rfpEnabled = Services.prefs.getBoolPref(kPrefResistFingerprinting))
+    ) {
       this._addRFPObservers();
       Services.ww.registerNotification(this);
       forEachWindow(win => this._attachWindow(win));
@@ -397,7 +399,9 @@ class _RFPHelper {
       kPrefLetterboxing,
       false
     );
-    forEachWindow(win => this._updateSizeForTabsInWindow(win));
+    if (this.rfpEnabled) {
+      forEachWindow(win => this._updateSizeForTabsInWindow(win));
+    }
   }
 
   // The function to parse the dimension set from the pref value. The pref value



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c8ea1c20e48a921ebf534390bc32e99c5fc9d156

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c8ea1c20e48a921ebf534390bc32e99c5fc9d156
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/20230612/4f98f8d5/attachment-0001.htm>


More information about the tbb-commits mailing list