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

Bug 1922204: fixup square spoofed orientation. r=tjr

parent 60c9accc
Branches
Tags
1 merge request!1293Bug 43306: Rebased stable onto 128.5.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.
Please to comment