Re: [whatwg/fullscreen] Remove top layer definitions, now that CSS Position 4 contains them. (PR #223)

@nt1m commented on this pull request.



>  
 <p>To <dfn>unfullscreen an <var>element</var></dfn>, unset <var>element</var>'s
-<a>fullscreen flag</a> and <a>iframe fullscreen flag</a> (if any), and <a for=set>remove</a> it from
-its <a>node document</a>'s <a>top layer</a>.
+<a>fullscreen flag</a> and <a>iframe fullscreen flag</a> (if any), and
+<a>request removal from the top layer</a> for it from its <a>node document</a>.

In practice, transitioning out of `:fullscreen` is quite difficult via CSS transitions anyway because we take out `position: fixed;`. It is also something the browser typically does a visual transition for too, which makes it hard to notice if any CSS transition is happening.

Personally, I would prefer going for "remove immediately from top layer" in this case, because exiting fullscreen is a critical operation (if someone tries to press "Esc", you don't want to allow top layer transitions) and it would be better perf wise too. Entering / exiting fullscreen is a fairly expensive operation style-wise in WebKit, especially when it involves subframes.

>  
 <p>All <a for=/>documents</a> have an associated <dfn>list of pending fullscreen events</dfn>, which
 is an <a>ordered set</a> of (<a>string</a>, <a>element</a>) <a>tuples</a>. It is initially empty.
 
-<p>To <dfn>fullscreen an <var>element</var></dfn>, set <var>element</var>'s <a>fullscreen flag</a>
-and <a for="top layer">add</a> it to its <a>node document</a>'s <a>top layer</a>.
+<p>To <dfn>fullscreen an <var>element</var></dfn>, set <var>element</var>'s <a>fullscreen flag</a>.
+If <var>element</var> is not currently [=in the top layer=] of its <a>node document</a>,

We already have safeguards (exceptions notably) for this so we shouldn't change behavior unless necessary. Dialogs can't be fullscreened, Popovers can't be fullscreened (with #204 merged at least). Fullscreen elements also can't be made popovers (check popover validity algorithm prevents it). They can't be made dialogs either since you can't change the tag name.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fullscreen/pull/223#discussion_r1192667762
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fullscreen/pull/223/review/1424959115@github.com>

Received on Friday, 12 May 2023 18:17:56 UTC