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/be3b...