-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should the -secondary orientations be exposed? #188
Comments
In addition, exposing portrait-secondary and landscape-secondary orientation types are an additional bit of fingerprinting data over screen height and width. |
We did have use cases of this in games and apps... but I can't for the life of me remember what we did with the use cases :( I'm trying to recall if there was any valid use case for "*-secondary", but I'm also coming up empty. @mounirlamouri can you think of anything? I might be worth revising. |
Another problem with the secondary orientations is that the author probably doesn't have enough information about the device to know where the physical buttons, cameras etc are, and a specific orientation that works on one kind of device may be bad for another. |
Can you detail what's the fingerprinting problem with exposing secondary types? |
You can detect people who always hold their device upside-down (some people do this). |
WebKit introduced |
On MDN, at least, @othermaciej might have some insights on the future of Seems it's also supported on Samsung Internet... @torgo, is that something you would consider deprecating from Samsung Internet? With regards to dropping "*-secondary" in Firefox, I think I'd be ok with that but I'd have to double check with our Android team if they can come up with any legit use cases. |
Secondary types are meant to lock the screen orientation, not to detect it. The read part is just better than the angle as it provides more semantic information but nothing that can't be guessed from just reading the angle. |
I think it’s WebKit’s call, right? Chrome and Firefox don’t ship it.
True, but that one is also highly unreliable iirc from our testing. Different devices report the opposite of what one would expect. |
It's implemented in Blink and I think Mozilla implemented it too. Basically, it has a full browser support.
Why would that be? We didn't get that kind of feedback for Chrome. |
found it... MDN is wrong and you are right. Android only: #if defined(MOZ_WIDGET_ANDROID)
// https://compat.spec.whatwg.org/#windoworientation-interface
partial interface Window {
[NeedsCallerType]
readonly attribute short orientation;
attribute EventHandler onorientationchange;
};
#endif
I think Johanna had found it to be unreliable - but I guess you would have had more people yelling about it. |
Ok, looks like it's here to stay - with the control that @mounirlamouri points to. As you can only set it, that mitigates the finger printing concern (even though it's potentially kinda useless in practice). |
Are there any use cases for locking to the upside-down (portrait-secondary, landscape-secondary) orientations? Generally people would only care about landscape and portrait, and would want the device to choose the closest one to rotate to.
The text was updated successfully, but these errors were encountered: