Re: [screen-orientation] Remove the ability to lock to multiple orientations?

I am cc'ing Wonsuk and Christophe as Tizen is currently implementing (and
shipping?) the API as well; it's even unprefixed.

We are also supporting the current API in Crosswalk, but I am OK with the
change as most of our current users are using Android which doesn't allow
these specific locks.

Cheers
Kenneth


On Thu, Mar 13, 2014 at 7:21 PM, Mounir Lamouri <mounir@lamouri.fr> wrote:

> Hi,
>
> I would like to change the Screen Orientation API to make the locking
> steps a bit simpler. Currently, the API tries to be flexible and allow
> locking to any combination of values like "portrait", "landscape",
> "portrait-primary" but also [ "portrait", "landscape-primary" ], [
> "portrait-primary", "landscape-primary" ]. The three first orientations
> are very common. The others are pretty odd and I doubt I ever saw that
> in the wild.
>
> Allowing to pass an array of orientation has a lot of impact on the
> specification:
> - given that the combinations are pretty exotic, we should assume that
> some UA will not be able to lock because the system will not allow it
> [1];
> - we have the problem of whether all the items in the array should be
> available or only one of them to work. The specifacation currently
> answer the question of whether "portrait" <=> [ "portrait-primary",
> "portrait-secondary" ] but what about [ "landscape-primary",
> "portrait-primary" ].
>
> Removing this feature will allow the specification to enforce that all
> states are working because it is fair to assume that the system will not
> block the UA to lock to those basic orientations. In addition, this
> would be a future-compatible change in the sense that adding this later
> will be smooth. I am really eager to make the specification a bit less
> flexible because right now, implementing this specification without
> being able to lock would be following the specification.
>
> I am particularly interested to hear feedback from Microsoft and Mozilla
> who have prefixed implementations. I know that Firefox Android only
> allows the basic orientations but Firefox OS allows any orientation to
> be passed I believed [2]. I unfortunately can't test IE11 on mobile.
>
> [1] Very likely, any UA could simply re-write the mechanism that listen
> for device orientation changes and do manual screen locking based on
> that, though...
> [2]
>
> http://mxr.mozilla.org/mozilla-central/source/widget/gonk/OrientationObserver.cpp
>
> -- Mounir
>
>


-- 
Kenneth Rohde Christiansen
Web Platform Architect, Intel Corporation.
Phone  +45 4294 9458 ﹆﹆﹆

Received on Thursday, 13 March 2014 19:45:05 UTC