[whatwg] Page reflow when entering/exiting fullscreen

Ian Hickson ian at hixie.ch
Tue Jul 23 14:03:50 PDT 2013


On Mon, 22 Jul 2013, Matt Falkenhagen wrote:
>
> When an element goes fullscreen, should the browser try to retain the 
> layout of the underlying document, e.g., by creating a placeholder for 
> the element?
> 
> With the top layer, it's possible to style the fullscreened element and 
> ::backdrop such that the underlying document is visible. In such a case, 
> it may be surprising for the user to see the layout change. The scroll 
> position may also change.
> 
> As far as I can tell, the Fullscreen spec doesn't say anything normative 
> about retaining the layout. I'm wondering whether it was a deliberate 
> decision to leave it up to the author to create a placeholder if 
> desired. (As an implementer, this would be easier for me.)
> 
> WebKit and Blink actually already use a placeholder to prevent the page 
> from reflowing when entering/exiting fullscreen, but there are some 
> limitations. For example, inline elements don't get placeholders.

How would you know how to style the placeholder? e.g. if you change the 
<body> font-size while full-screen, and the element that is now 
full-screen was, previously, styled using 'em' units or some such, but is 
now styled using pixels or %s? Or if there was something based on :hover, 
or dynamic class changes, e.g. every element on the page is styled using 
explicit pixel dimensions, with one dimension when the elements have class 
A, and another when they have class B, and the page changes all the 
elements to class B -- how do you know that in this case, you should 
update the placeholder?

This seems hard to define.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list