Open nt1m opened 2 years ago
And from https://github.com/web-platform-tests/wpt/pull/31668#issuecomment-973982326, should top layer elements escape ancestor inertness?
Shouldn't this be in https://github.com/whatwg/fullscreen/issues/new?
I think there was a resolution to move the top layer definition to CSSWG, I don't think this was ever done in practice though.
I would like to get a resolution on visibility
at least, in the near future.
My view is that top layer elements should escape non-inherited ancestor properties/effects/clips. I'm not sure what escape visibility
means in practice since visibility
is inherited. IOW, I think visibility
should have similar treatment to something like font-size
in this case
Should top layer elements "escape" ancestor visibility? Currently they escape ancestor opacity/masks/overflow. Are there other properties they should escape? From the current spec, what "etc." is isn't clear:
Imo, they should act as if they were reparented to be siblings of the root element. That's how they exist in the box tree, and we shouldn't overcomplicate things (like we've done with some abspos+clipping stuff) by applying effects from elements that aren't in their box-tree ancestor chain.
visibility
, as @vmpstr says, isn't a container effect, it just inherits down and affects each element individually. Inheritance still works as normal, so a top-layer element with a visibility: hidden
ancestor (and no closer ancestor setting visible
) will be hidden.
What happens when the ancestor is replaced content or display: table-column?
Same as previous answer - since it was reparented in the box tree, its container effects that would suppress rendering no longer apply. The top-layer elements should display in both of these cases, imo.
Should top layer elements "escape" ancestor pointer-events? In all 3 current implementations the answer is no, ancestor pointer-events propagate to
Like visibility
, pointer-events
isn't a container effect, just an inherited property, so it should continue to apply to the dialog as normal based on inheritance.
Not sure "If it consists of multiple layout boxes, the first box is used." should be kept, this currently isn't tested, and is quite vague.
Yeah this needs to be rewritten a little for clarity. It's just to address what we do if an element generates multiple sibling boxes; only the principal box is positioned by positioning schemes.
The CSS Working Group just discussed how does top-layer interact with ancestors
, and agreed to the following:
RESOLVED: Set visiblity:hidden on modal dialogs
- RESOLVED: Set visiblity:hidden on modal dialogs
Should that be visibility:visible
?
If modal dialogs reset pointer-events
, then I guess they should escape ancestor inertness? Since inertness sets pointer-events: none
. However, https://html.spec.whatwg.org/multipage/interaction.html#inert says
being part of a modal dialog does not "protect" a node from being marked inert
If modal dialogs reset
pointer-events
, then I guess they should escape ancestor inertness? Since inertness setspointer-events: none
. However, https://html.spec.whatwg.org/multipage/interaction.html#inert says
Why would it? We clarified that even though inertness behaves like pointer-events: none
, it doesn't change the computed value, so they're not necessarily related.
We should probably fix up the previous resolution of course. Regarding these two tests:
2. What happens when the ancestor is replaced content or display: table-column? See the following tests: * [modal-dialog-in-replaced-renderer.html](https://github.com/web-platform-tests/wpt/blob/5874448f80/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html) * [modal-dialog-in-table-column.html](https://github.com/web-platform-tests/wpt/blob/5874448f80139811704f009a2d5c232f2647db98/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html)
I think consensus was that Gecko and WebKit have the preferred behavior since it's similar to how display: none
suppresses descendant boxes. Perhaps we can resolve on that?
- RESOLVED: Set visiblity:hidden on modal dialogs
Should that be
visibility:visible
?
Yes, there was a typo in the minutes
RESOLVED: Set visibility: visible on modal dialogs
There is now an issue on whether we need to define a real pseudo-class for this https://github.com/w3c/csswg-drafts/issues/6965
I suggest that if we would like to use box re-parenting to specify how top layers behave we also open a separate issue specifically on that.
The remainder of the discussion on this issue should be on which properties we need to set in the UA stylesheet for the dialog element shown state. One we have not yet resolved on is pointer-events. Please list any others we should consider.
We clarified that even though inertness behaves like
pointer-events: none
, it doesn't change the computed value, so they're not necessarily related.
Yes, we don't have to necessarily reset inertness, but then pointer-events
won't be reset, and if we decide to typically reset it, then it may be strange.
We should probably fix up the previous resolution of course. Regarding these two tests:
2. What happens when the ancestor is replaced content or display: table-column? See the following tests: * [modal-dialog-in-replaced-renderer.html](https://github.com/web-platform-tests/wpt/blob/5874448f80/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html) * [modal-dialog-in-table-column.html](https://github.com/web-platform-tests/wpt/blob/5874448f80139811704f009a2d5c232f2647db98/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html)
I think consensus was that Gecko and WebKit have the preferred behavior since it's similar to how
display: none
suppresses descendant boxes. Perhaps we can resolve on that?
I made a WPT PR here: https://github.com/web-platform-tests/wpt/pull/32947 if everyone is ok with it, I can re-include them into interop-2022
I am implementing changes in chromium to get modal-dialog-in-replaced-renderer.html and modal-dialog-in-table-column.html passing again based on this resolution. However, it also caused these chromium-only tests to regress: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/fullscreen/rendering/backdrop-object.html https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/fullscreen/rendering/backdrop-iframe.html
Should children of iframe
s and object
s not be rendered in the top layer like children of content: url(...)
and display:table-column
?
Should ::backdrop
be given any special treatment when it is in the top layer when used like iframe::backdrop
or object::backdrop
?
Should #displayTableColumn::backdrop
be rendered where #displayTableColumn is display:table-column
?
@josepharhar <iframe>
and <object>
are replaced elements, so I think the same resolution applies.
<iframe>
and<object>
are replaced elements, so I think the same resolution applies.
Cool, I am adding tests for this here: https://chromium-review.googlesource.com/c/chromium/src/+/3646687
As for my question about ::backdrop
, I am moving the chrome-only tests to WPT in that change as well. Firefox and Chrome seem to have the same behavior there where iframe::backdrop
and object::backdrop
are rendered, so I am keeping it that way in chrome and keeping the test the same. Safari doesn't support requestFullscreen()
it seems.
Things it would be nice to get clarification on:
Should top layer elements "escape" ancestor visibility? Currently they escape ancestor opacity/masks/overflow. Are there other properties they should escape? From the current spec, what "etc." is isn't clear:
What happens when the ancestor is replaced content or display: table-column? See the following tests:
Should top layer elements "escape" ancestor
pointer-events
? In all 3 current implementations the answer is no, ancestorpointer-events
propagate to<dialog>
, would be nice to make that clear!Not sure "If it consists of multiple layout boxes, the first box is used." should be kept, this currently isn't tested, and is quite vague.
Personally, I don't find "It is rendered as an atomic unit as if it were a sibling of its root." very useful. The stacking context/containing block definitions sort of cover most things IMO.
Spec: https://fullscreen.spec.whatwg.org/#new-stacking-layer