blob: 2e0ea848bdcc61c0395af82799d9a70fcda16cd1 [file] [log] [blame]
<!doctype HTML>
<html class="reftest-wait">
<meta charset="utf8">
<title>content-visibility hidden-matchable + focus</title>
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="../spacer-and-container-ref.html">
<meta name="assert" content="focus does not scroll or focus element under hidden-matchable">
<script src="/common/reftest-wait.js"></script>
<style>
.spacer {
width: 150px;
height: 3000px;
background: lightblue;
}
#container {
width: 150px;
height: 150px;
background: lightblue;
}
#target {
position: relative;
top: 75px;
width: 50px;
height: 50px;
background: red;
}
.hidden {
content-visibility: hidden-matchable;
}
</style>
<div class=spacer></div>
<div id=container class=hidden>
<div id=target tabindex=0></div>
</div>
<script>
function runTest() {
document.getElementById("target").focus();
requestAnimationFrame(takeScreenshot);
}
window.onload = requestAnimationFrame(() => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
runTest();
});
});
});
</script>
</html>