tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

content-visibility-067.html (1173B)


      1 <!doctype HTML>
      2 
      3 <html class="reftest-wait">
      4 <meta charset="utf8">
      5 <title>CSS Content Visibility: hidden + focus</title>
      6 <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
      7 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">
      8 <link rel="match" href="spacer-and-container-ref.html">
      9 <meta name="assert" content="focus ignores element in a hidden subtree">
     10 <script src="/common/reftest-wait.js"></script>
     11 
     12 <style>
     13 .spacer {
     14  width: 150px;
     15  height: 3000px;
     16  background: lightblue;
     17 }
     18 #container {
     19  width: 150px;
     20  height: 150px;
     21  background: red;
     22 }
     23 #target {
     24  position: relative;
     25  top: 75px;
     26 
     27  width: 50px;
     28  height: 50px;
     29  background: red;
     30 }
     31 .hidden {
     32  content-visibility: hidden;
     33 }
     34 </style>
     35 
     36 <div class=spacer>Test passes if there is no red.</div>
     37 <div id=container class=hidden>
     38  <div id=target tabindex=0>FAIL</div>
     39 </div>
     40 
     41 <script>
     42 function runTest() {
     43  document.getElementById("target").focus();
     44  requestAnimationFrame(takeScreenshot);
     45 }
     46 
     47 window.onload = requestAnimationFrame(() => {
     48  requestAnimationFrame(() => {
     49    requestAnimationFrame(() => {
     50      runTest();
     51    });
     52  });
     53 });
     54 </script>
     55 </html>