[whatwg] Page reflow when entering/exiting fullscreen
Matt Falkenhagen
falken at chromium.org
Tue Jul 23 11:19:59 PDT 2013
On Tue, Jul 23, 2013 at 10:48 AM, Anne van Kesteren <annevk at annevk.nl> wrote:
> On Mon, Jul 22, 2013 at 6:58 PM, Matt Falkenhagen <falken at chromium.org> 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?
>
> It's not entirely clear to me what you mean by placeholder.
By placeholder, I mean a dummy renderer with the same dimensions as the
element before it went full screen, added in its place when it goes
fullscreen to prevent the page from reflowing. There are probably other
ways to prevent reflow, such as rendering the element twice, once in
fullscreen form and once as it would appear had it not gone fullscreen
(though that would be a lot more difficult).
If I understand correctly, the spec isn't mandating anything about
retaining or not retaining layout, but I'd like to just get an idea of what
people expect to happen.
>
>
>> 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.)
>
> I had not entirely considered scroll position. I sort of assumed that
> would not change, but maybe that's not the best behavior. I don't
> really have strong opinions here.
>
>
>> 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.
>
>
>
> --
> http://annevankesteren.nl/
More information about the whatwg
mailing list