[whatwg] api for fullscreen()

On Feb 3, 2010, at 5:04 AM, Smylers wrote:

> Brian Campbell writes:
> 
>> I'm a bit concerned about when the fullscreen events and styles apply,
>> though. If the page can tell whether or not the user has actually
>> allowed it to enter fullscreen mode, it can refuse to display content
>> until the user gives it permission to enter fullscreen mode.
> 
> Why is that a problem?
> 
>> Or even if it's not refusing to display content, it may simply not
>> scale the content up to the full window if the user neglects to give
>> permission for full screen.
> 
> If the user wants the content to be large, why would he withhold
> permission?

A user may want to view the content scaled up to the full size of the window, without it being full-screen.

> As I understand it, the risk with full-screen view is that a malicous
> site may spoof browser chrome, such as the URL bar, thereby tricking a
> user who isn't aware the site is full-screen.

This is addressing a different scenario; not malicious sites per-se, but sites that insist on being displayed full screen.

> So these scenarios seem relevant:
> 
> 1  A malicious site wishes to switch to full-screen view and spoof
>    chrome.  The user hadn't asked for full-screen, so withholds
>    permission.  The site may at this point "refuse to display content"
>    as you put it, but since that content's only purpose is to trick the
>    user, its non-display is a good thing.
> 
> 2  A user wishes to display some content full-screen, so grants
>    permission and views it.
> 
> 3  A user doesn't wish to display some content full-screen, so ignores
>    any attempt by the site to become full-screen, and continues to view
>    it normal size.
> 
> I'm struggling to come up with a scenario in which your concerns apply.
> Please could you elaborate.  Thanks.

Sure. At my previous job, I wrote immersive interactive educational multimedia. My boss was very insistent about content being displayed full screen, to make the experience more immersive and reduce distractions (given the content, this wasn't unreasonable; there were parts that were time-critical simulations in which you wouldn't want to be distracted part way through by a chat window popping up). Had we been developing for the web, I could imagine him asking us to start with something that said "Please press the button to enter full-screen mode and start the program", and the program would not start until full-screen mode was entered. I could imagine games, and other content doing the same as well.

I think that this behavior is fairly user hostile, however. There are some times when a user really doesn't want his entire screen filled, for a good reason. If there is content that won't start until the fullscreen event has fired, or fullscreen pseudo-class has been applied, then that user has no choice but to skip that content or allow it to enter fullscreen mode.

Another scenario applies to most video player sites. Almost all video player sites using Flash have a full screen button. Many of them do not have a full window button, however. If a user wishes to view content scaled up to fill the window, without the distractions of navigational links, comments, descriptions, and so on, they don't usually have a way to do this. If it were possible to use the full-screen button, but deny permission to actually go full screen, and have that simply display the content in the full window exactly as if it were full screen, it would give the users more control over how they view the content.

In short, there are several scenarios in which certain functionality in a web content is not available unless you enter fullscreen mode. Content authors should not be able to force fullscreen mode on users, however, so I think it would be best if the spec allows UAs to send the fullscreen event and set the fullscreen pseudoclass even if the content is not actually filling the entire screen. How exactly the UAs implement this is up to them, though I would recommend scaling the content up to the full window and sending the fullscreen events immediately, if they are waiting for permission to scale to fill the full screen. 

All the spec would have to say to cover all of the possible implementations is that the fullscreen events may be sent even if the content isn't actually filling an entire screen, and that the screen size may be changed even if you are already in fullscreen mode (which would need to be the case anyhow, since you may change the resolution of the screen when attaching a projector, or for devices in which the screen can rotate).

Does this make it any clearer?

-- Brian

Received on Wednesday, 3 February 2010 13:12:46 UTC