blob: b8685954ff83565f06ad4a359c3196b6e126abe1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<!doctype html>
<html class="reftest-wait">
<meta charset="utf8">
<title>CSS Content Visibility: dialog shows when rendered</title>
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">
<link rel="match" href="content-with-top-layer-ref.html">
<meta name="assert" content="top layer dialogs start rendering when c-v is removed">
<script src="/common/reftest-wait.js"></script>
<style>
.box { width: 100px; height: 100px; border: 1px solid black; }
.hidden { content-visibility: hidden }
</style>
<div id=container class=box>
This test passes if you can see “PASS” in a white box.
<dialog id=dialog>PASS<div id=inner></div></dialog>
</div>
text
<script>
function unhide() {
container.classList.remove("hidden");
takeScreenshot();
}
function runTest() {
container.classList.add("hidden");
dialog.showModal();
requestAnimationFrame(unhide);
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>
|