-
Notifications
You must be signed in to change notification settings - Fork 738
Description
The documentation and the implementation differs.
According to the documentation, any orientation is a valid input, except for unknown.
Except that the orientations face up/down are not actually valid. They cause an error.
Indeed, those two Interface orientations are mapped to the unknown devices orientations. And so the behavior in this case is exactly the same as if the user used unknown input.
So either the implementation or the documentation should be changed.
I’m personally more in favor of doing the following change:
- the current method, taking the device orientation as input, would have its documentation changed to note that face up/down are also not authorized input.
- and potentially, split this function in two. One that takes the interface orientation as input and the other one that takes the device orientation as input. The latter would be implemented using the former, and marked as deprecated. The latter would indeed accept any value except for unknown.
An alternative solution would be to state that there is some default interface orientation associated with face up/down. But I don’t think that would be intuitive for the user so I’m slightly against it.
This is related to Chromium bug crbug.com/438558888