Skip to content

Commit

Permalink
Bug 1876130 [wpt PR 44146] - Allow top layer elements to be nested wi…
Browse files Browse the repository at this point in the history
…thin popovers, a=testonly

Automatic update from web-platform-tests
Allow top layer elements to be nested within popovers

See the issue raised at

  whatwg/html#9998

which was discussed at

  whatwg/html#9993

This CL makes the following changes:
 1. Change `FindTopmostPopoverAncestor()` so that the provided element
    does not have to be a popover. The logic does not materially
    change - all of the same mechanisms can be used to connect a
    non-popover top layer element (dialog or fullscreen) to an ancestor
    popover.
 2. Add a utility `TopLayerElementPopoverAncestor()` which finds the
    popover ancestor for a provided top layer element by calling
    `FindTopmostPopoverAncestor()` with the proper arguments.
 3. In dialog and fullscreen code, where it previously called
    `HideAllPopoversUntil(nullptr,...)` to hide **all** open popovers,
    it now (with flag enabled) hides only up to the nearest popover
    ancestor.

Tests are added, which are marked `.tentative`.

Bug: 1520938
Change-Id: I8d2c4000ed3959ac4e8bf521e22e9dfd532c62d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5229300
Auto-Submit: Mason Freed <masonfchromium.org>
Commit-Queue: Joey Arhar <jarharchromium.org>
Reviewed-by: Joey Arhar <jarharchromium.org>
Cr-Commit-Position: refs/heads/main{#1254541}

--

wpt-commits: a8a4f241414cdabb1854db1aef3493446bbddddf
wpt-pr: 44146

UltraBlame original commit: e7982e55cf91f90fccd5f34682858cc6cf1c11eb
  • Loading branch information
marco-c committed Feb 8, 2024
1 parent 156e5ee commit 7cb3934
Show file tree
Hide file tree
Showing 5 changed files with 2,674 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,33 @@
:
/
/
html
.
spec
.
whatwg
.
org
/
multipage
/
popover
.
html
"
>
<
link
rel
=
help
href
=
"
https
:
/
/
open
-
ui
Expand Down
Loading

0 comments on commit 7cb3934

Please sign in to comment.