Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fullscreen position adjustment algorithm for documentElement #134

Open
dtapuska opened this issue Aug 27, 2018 · 2 comments
Open

Fullscreen position adjustment algorithm for documentElement #134

dtapuska opened this issue Aug 27, 2018 · 2 comments

Comments

@dtapuska
Copy link
Contributor

If the documentElement is fullscreened Chrome places the document element in the topLayer. However FireFox does not.

When the style adjustment for fullscreened top layer elements runs this causes the documentElement (which is statically positioned because it isn't forced to be fixed due to avoiding the !:root(..) selector for fullscreen elements). The documentElement gets the position set to be absolute.

However since the documentElement doesn't have any sizing the calculation of the width for the element ends up being 0.

Chrome avoided applying the aboslute poisiton to the document element in:
https://chromium-review.googlesource.com/c/chromium/src/+/1186961

@foolip
Copy link
Member

foolip commented Aug 29, 2018

@upsuper can you describe the Gecko model here?

@upsuper
Copy link
Member

upsuper commented Aug 30, 2018

Oh... I indeed didn't pay much attention on this side.

What Gecko currently does is that, we have an internal (non-web-exposed) CSS property -moz-top-layer, which we apply value top for :fullscreen:not(:root). And when the property is set to top, we apply the styling magic (specifically set position to absolute when it's not fixed), and we only render such elements in the top layer.

So the observation is correct that Gecko doesn't put the document element in the top layer for rendering purpose, but Gecko does indeed put that element into the top layer stack for other purpose (and the stack is still called "fullscreen stack" in Gecko currently since that's still the only thing it's serving).

It's not clear what's the best way to spec this. Maybe change

Each element and ::backdrop pseudo-element in a top layer has the following characteristics:

to something like

Each element excluding the document element, and ::backdrop pseudo-element in a top layer has the following characteristics:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants