Skip to content

Commit

Permalink
Bug 1836565 [wpt PR 40369] - Make ::backdrop stay in top layer while …
Browse files Browse the repository at this point in the history
…animating out, a=testonly

Automatic update from web-platform-tests
Make ::backdrop stay in top layer while animating out

This patch adds a new internal pseudo class which matches popovers while
they are still in the top layer after they have been closed in order to
also make the corresponding ::backdrop stay in the top layer.

This is based on futhark's patch:
https://chromium-review.googlesource.com/c/chromium/src/+/4554016

HTML spec PR: whatwg/html#9387

Fixed: 1449145
Change-Id: I8e4831e960c5d18fb077f023c119fd0e678541df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4585724
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1158640}

--

wpt-commits: 83976e7d1f6a7b175947209736bd40e94a7cae77
wpt-pr: 40369
  • Loading branch information
josepharhar authored and moz-wptsync-bot committed Jun 21, 2023
1 parent fddc664 commit 54c6596
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<title>CSS Position Test: overlay transition with ::backdrop during entry animation</title>
<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay">
<link rel="match" href="green-ref.html">
<link rel="author" href="mailto:jarhar@chromium.org">
<style>
body {
background-color: green;
}
[popover] {
display: block;
visibility: hidden;
transition-delay: 2s;
transition-property: overlay;
transition-duration: 2s;
}
[popover]::backdrop {
background-color: blue;
}
</style>
<div popover id="foo"></div>
<script>
foo.offsetTop;
foo.showPopover();
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<title>CSS Position Test: overlay transition with ::backdrop</title>
<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay">
<link rel="match" href="green-ref.html">
<link rel="author" href="mailto:jarhar@chromium.org">
<style>
[popover] {
display: block;
visibility: hidden;
transition: overlay 60s step-end;
}
[popover]::backdrop {
background-color: green;
}
</style>
<div popover id="foo"></div>
<script>
foo.showPopover();
foo.hidePopover();
</script>

0 comments on commit 54c6596

Please sign in to comment.