Skip to content
Snippets Groups Projects
Verified Commit f8c4bf33 authored by Fatih's avatar Fatih Committed by Pier Angelo Vendrame
Browse files

Bug 1922204: fixup square spoofed orientation. r=tjr

parent aba7c3f2
No related branches found
No related tags found
1 merge request!1327TB 43387: Rebased Tor Browser alpha onto 128.6.0esr
......@@ -2282,10 +2282,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;
......@@ -2296,7 +2298,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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment