Closed Bug 1974868 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 53492 - Another attempt to fix <dialog open> top layer behavior

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
142 Branch
Tracking Status
firefox142 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 53492 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/53492
Details from upstream follow.

Mason Freed <masonf@chromium.org> wrote:

Another attempt to fix <dialog open> top layer behavior

This fixes the case where this element:

\<dialog open popover id=p>
\<script>
  p.showPopover();
\</script>

could be open as a popover, yet not be in the top layer.

See [1] for a first attempt at this fix, but that caused [2], so it
was reverted. This CL cleans up the html.css file a bit, to bring
together the related parts of popover and dialog top layer and display
handling. It also refactors/moves the logic behind the
:-internal-{popover|dialog}-in-top-layer pseudo classes, so they use
Element methods. The initial problem with [1] was that since the
overlay property is used to control whether the element remains in
the top layer, it's a loop to use :-internal-popover-in-top-layer
to control overlay. The new code goes back to roughly the same
CSS as before:

dialog:modal, [popover]:popover-open {
    overlay: auto !important;
}

[1] https://chromium-review.googlesource.com/c/chromium/src/+/6185344
[2] https://crbug.com/393947100

Fixed: 388538944
Bug: 393947100
Change-Id: I46c90094f54735908b8ecb8bbe8a0c31f1d548dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6292794
Commit-Queue: Joey Arhar \<jarhar@chromium.org>
Auto-Submit: Mason Freed \<masonf@chromium.org>
Reviewed-by: Joey Arhar \<jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1480691}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 7 Firefox configurations based on mozilla-central, and Safari on GitHub CI

Total 2 tests

Status Summary

Firefox

PASS: 2

Safari

PASS: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b9462aa026e2 https://hg.mozilla.org/mozilla-central/rev/2694f4c9b2ea [wpt PR 53492] - Another attempt to fix <dialog open> top layer behavior, a=testonly
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
You need to log in before you can comment on or make changes to this bug.