[tbb-commits] [Git][tpo/applications/tor-browser][base-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:53:00 UTC 2024
morgan pushed to branch base-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
c3282afe by Fatih at 2024-10-10T20:52: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/tor-browser/-/commit/c3282afe80a2df8dbfb0ec90b4d5027ef320f479
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c3282afe80a2df8dbfb0ec90b4d5027ef320f479
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/20241010/25191684/attachment-0001.htm>
More information about the tbb-commits
mailing list