<!doctype html>
<html class="reftest-wait">
<meta charset="utf8">
<title>CSS Content Visibility: content-visibility: auto descendant in popover is shown on showPopover</title>
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">
<link rel="match" href="content-visibility-with-popover-top-layer-and-auto-descendant-ref.html">
<meta name="assert" content="content-visibility: auto descendant in popover is shown on showPopover">
<script src="/common/reftest-wait.js"></script>

<style>
#inner {
  content-visibility: auto;
  contain-intrinsic-size: 100px 100px;
}
</style>

<div id="spacer" style="height: 100vh"></div>
<div popover="manual" style="display: block; position: static;" id="popover">
  <span id="inner">Test passes if this is visible</span>
</div>

<script>
function runTest() {
  popover.showPopover();
  requestAnimationFrame(takeScreenshot);
}

window.onload = runTest;
</script>
</html>
