Bug 229315 - Top layer elements should not be affected by parent layout (e.g. display: table-column or CSS content property)
Summary: Top layer elements should not be affected by parent layout (e.g. display: tab...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: dialog-element
  Show dependency treegraph
 
Reported: 2021-08-19 17:42 PDT by Tim Nguyen (:ntim)
Modified: 2022-02-18 13:04 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2021-08-19 17:42:22 PDT
2 main items from https://fullscreen.spec.whatwg.org/#new-stacking-layer :

* If its position property computes to fixed, its containing block is the viewport, and the initial containing block otherwise.

webkit.org/b/84796 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/removed-element-is-removed-from-top-layer.html [ ImageOnlyFailure ]
webkit.org/b/84796 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-containing-block.html [ ImageOnlyFailure ]
webkit.org/b/84796 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-stacking.html [ ImageOnlyFailure ]

Modal dialogs have position: fixed by default with UA styles hence why it's relevant to those tests, and looking at the results, it's mostly top/bottom/right/left position which look wrong, making me think this is mostly containing block related.

* It is rendered as an atomic unit as if it were a sibling of its root.

Ancestor elements with [...] cannot affect it.

webkit.org/b/84796 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html [ ImageOnlyFailure ]
webkit.org/b/84796 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html [ ImageOnlyFailure ]

These tests use particular cases like content: url() or display: table-column on the ancestor and open a modal dialog inside.
Comment 1 Radar WebKit Bug Importer 2021-08-20 14:37:23 PDT
<rdar://problem/82186174>
Comment 2 Tim Nguyen (:ntim) 2021-10-11 15:27:16 PDT
The containing block bits have been split out to bug 231292
Comment 3 Tim Nguyen (:ntim) 2022-02-18 13:04:24 PST
This is the expected behaviour, we should work to get the spec changed.