W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2013

Re: [whatwg] Forcing orientation in content

From: David Bruant <bruant.d@gmail.com>
Date: Thu, 18 Apr 2013 10:08:03 +0200
Message-ID: <516FA9E3.6000207@gmail.com>
To: Charles McCathie Nevile <chaals@yandex-team.ru>
Cc: whatwg <whatwg@whatwg.org>
Le 18/04/2013 01:03, Charles McCathie Nevile a écrit :
> Hi,
>
> On Thu, 18 Apr 2013 01:52:47 +0300, David Bruant <bruant.d@gmail.com> 
> wrote:
>
>> Hi,
>>
>> Currently working on a web project where tablet support (iPad 
>> especially) is important, I'm facing a need which apparently the 
>> platform doesn't support.
>> I would need to lock the screen in landscape mode.
>
> Not sure if WHATWG is doing anything, but in the W3C there is 
> https://dvcs.w3.org/hg/screen-orientation/raw-file/tip/Overview.html 
> in the Web Apps group (by Mounir, who works on Firefox OS as a day job)
Thanks for the pointer! But as said very explicitly in the screen 
orientation draft:
" This specification doesn't intend to specify a declarative orientation 
locking. However, other specifications specify ways to do that.

The Web Application Manifest Format and Management APIs 
[WEBAPPS-MANIFEST-API] specifies a way to declare a default orientation 
for a web application inside the manifest file."

And I really wished it was a declarative thing.

I understand the value of locking dynamically in some cases, but both in 
my use case and the Romanian guy use case, we want to lock the screen 
once and for all at the beginning. The web browser shouldn't have to 
wait for JS execution to know how to render things. I'm afraid it will 
result in a graphic glitch at application startup if a first frame is 
rendered *before* the JS saying "lockOrientation" is executed.
If the locking is expressed declaratively in the <head>, no such glitch 
is possible, resulting in a better user experience.

I feel an inline <style> inside <head> with @viewport{orientation: xxx} 
[1] could work though. It's declarative and is read before the <body>, 
so before any useful frame can be rendered, so no glitch.

Thanks,

David

[1] 
http://www.w3.org/TR/2011/WD-css-device-adapt-20110915/#the-lsquoorientationrsquo-property
Received on Thursday, 18 April 2013 08:08:30 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:57 UTC