W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2011

[whatwg] Fullscreen revision I

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 26 Oct 2011 15:06:28 +1300
Message-ID: <CAOp6jLa8TnqQz=vDVHF1LanZ-CKC1J7PcFpchMYwxzWBCLzy=w@mail.gmail.com>
Thanks for working on this.

When you say "No longer any attempts at integrating with "F11 fullscreen"",
do you mean to rule out the possibility that UAs do that? E.g., would you
allow UAs to have UI that makes the current document fullscreen and sets the
fullscreen element to the root element?

I'm not comfortable with punting the nested-fullscreen cases. It means that
if you have a document with an embedded video with fullscreen controls,
fullscreening the video works fine when the document is not fullscreen, but
if you make the document fullscreen, fullscreening the video just doesn't
work anymore. That seems broken (especially if native media fullscreen
controls are implemented this way). Authors can work around it, when
everything's same-origin, but the workarounds are tricky and require all
scripts to cooperate.

To fix the nested cases, I suggest having a per-document stack of fullscreen
elements instead of a single "fullscreen element". In step 1 of
requestFullScreen, remove the check for fullscreen elements in the document
tree. In step 4.2 instead of setting the fullscreen element, push the
context object onto the fullscreen element stack if it's different from the
current top of stack. Replace exitFullScreen steps 2 and 3 with:
2.1 Let D be the context object's document
2.2 Pop the top element off D's fullscreen element stack until the stack is
empty or the element at the top of stack is in D
2.3 For every child document of D whose browsing context container is not
the top of D's fullscreen element stack, clear the fullscreen element stacks
of the child document and all its descendant documents.
2.4 If D's fullscreen element stack is empty, and D's browsing context has a
browsing context container, then let D be that browsing context container's
document, andr return to step 2.2.
Places in the spec that currently refer to "the fullscreen element" would be
redefined to be the top of fullscreen element stack, or null if the stack is
empty. Browser UI to for a browser window to exit fullscreen would clear the
fullscreen element stacks for the entire tree of browsing contexts in the
browser window.

Thanks,
Rob
-- 
"If we claim to be without sin, we deceive ourselves and the truth is not in
us. If we confess our sins, he is faithful and just and will forgive us our
sins and purify us from all unrighteousness. If we claim we have not sinned,
we make him out to be a liar and his word is not in us." [1 John 1:8-10]
Received on Tuesday, 25 October 2011 19:06:28 UTC

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