[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-128.3.0esr-14.0-1] Bug 1922204: fixup square spoofed orientation. r=tjr

morgan (@morgan) git at gitlab.torproject.org
Thu Oct 10 20:54:02 UTC 2024



morgan pushed to branch mullvad-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Mullvad Browser


Commits:
be3bc055 by Fatih at 2024-10-10T20:53:43+00:00
Bug 1922204: fixup square spoofed orientation. r=tjr

Differential Revision: https://phabricator.services.mozilla.com/D224312
- - - - -


1 changed file:

- toolkit/components/resistfingerprinting/nsRFPService.cpp


Changes:

=====================================
toolkit/components/resistfingerprinting/nsRFPService.cpp
=====================================
@@ -2287,10 +2287,12 @@ Maybe<RFPTarget> nsRFPService::GetOverriddenFingerprintingSettingsForURI(
 
 /* static */
 uint16_t nsRFPService::ViewportSizeToAngle(int32_t aWidth, int32_t aHeight) {
+  // Note that, if screen is square, we return portrait-primary.
+  // That's why we use > on non-android and >= on Android.
 #ifdef MOZ_WIDGET_ANDROID
   bool neutral = aHeight >= aWidth;
 #else
-  bool neutral = aWidth >= aHeight;
+  bool neutral = aWidth > aHeight;
 #endif
   if (neutral) {
     return 0;
@@ -2301,7 +2303,7 @@ uint16_t nsRFPService::ViewportSizeToAngle(int32_t aWidth, int32_t aHeight) {
 /* static */
 dom::OrientationType nsRFPService::ViewportSizeToOrientationType(
     int32_t aWidth, int32_t aHeight) {
-  if (aWidth >= aHeight) {
+  if (aWidth > aHeight) {
     return dom::OrientationType::Landscape_primary;
   }
   return dom::OrientationType::Portrait_primary;



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

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/be3bc0554ba2d322e2d7d308e01e41ee264248dc
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/tor-commits/attachments/20241010/37e98173/attachment-0001.htm>


More information about the tor-commits mailing list