Re: Screen Orientation API Spec (from phrasing confusion)

What happened to the initiative done to take a holistic view on all
orientation related specs and make them seem like they come from the same
entity (Device Motion, Media Queries, Orientation Lock, ...)?

The confusion grows when we have e.g. different "primary" orientations
(landscape, portrait) - we had similar problems even inside a big handset
manufacturer, I worked with some years ago... within the same company but
in different branches.  How can we then expect avg joe developers out there
to know how to make their app support all devices on this little simple
thing?

IMHO - please include different (hands on) developers on different levels
to try out a spec before it goes out of draft.

br
Lars


On Thu, Mar 13, 2014 at 11:22 PM, Bruno Racineux <bruno@hexanet.net> wrote:

>
> On 3/13/14 10:59 AM, "Mounir Lamouri" <mounir@lamouri.fr> wrote:
>
> >> http://msdn.microsoft.com/en-us/library/ie/dn433241(v=vs.85).aspx
> >>
> >> That seems to defeat the "normal orientation" aspect of the spec and the
> >> usefulness of '-primary' and '-secondary' suffixes "for the initial
> >> state".
> >
> >There is a bug on file to make the explanation a bit clearer:
> >https://www.w3.org/Bugs/Public/show_bug.cgi?id=24699
>
> I don't think you are getting my initial point of confusion in the spec.
> This would make it even more confusing than it already is.
>
> >The relation between -primary and -secondary should be up to the UA.
>
> You mean the *device* not the UA? Or else you are puzzling me.
> The spec said/says: "The concepts of primary orientation and secondary
> orientation depends on the device and the platform"; *not* the browser.
> Or is there a private draft I can't see saying the contrary now?
>
> >If Microsoft wants to give specific angles, why not.
>
> OK now you are *completely* losing me. Why not? What the heck do you mean?
> The current specification *has* a 90 degrees clockwise given angle which
> Microsoft *followed*.
>
> I have the feeling that neither Mozilla or Microsoft were able
> to fully make sense of the spec as you express it here, which as I
> specified, isn't fully understandable on its own terms.
>
> Again, in 3.1: "In both if the device is in landscape-primary and is
> rotated 90 degrees clockwise, that should be represented as
> portrait-primary." You are giving an angle, while referring to 'In both'
> of 2 previous opposite cases. That sentence is deprived of logic with:
> [In both] !== [if the device is in landscape-primary] in the same sentence.
>
> Microsoft's interpretation of that sentence is:
> [In both if the device is in x-primary and is rotated 90 degrees
> clockwise, that should be represented as x-primary.]
> As such Microsoft would be on spec but that's not what the spec says.
>
> While Mozilla seems to map it to fixed angles as per:
> http://mxr.mozilla.org/mozilla-central/source/widget/gonk/OrientationObserv
> er.cpp
>
> static OrientationMapping sOrientationMappings[] = {
>   {nsIScreen::ROTATION_0_DEG,   eScreenOrientation_PortraitPrimary},
>   {nsIScreen::ROTATION_180_DEG, eScreenOrientation_PortraitSecondary},
>   {nsIScreen::ROTATION_90_DEG,  eScreenOrientation_LandscapePrimary},
>   {nsIScreen::ROTATION_270_DEG, eScreenOrientation_LandscapeSecondary},
> };
>
> which sigh, doesn't match with my initial js implemention based on
> Microsoft's spec. That's a discrepancies already between the two
> prefixed implementations.
>
> I don't know how Tizen is interpreting the spec, but this need to be
> clarified before UAs ship it a unprefixed with their own take on it.
> Or this API is looking live a future living hell for developers.
>
> -Bruno
>
>
>
>

Received on Friday, 14 March 2014 08:08:20 UTC