tor-browser

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

content-visibility-098.html (1321B)


      1 <!doctype HTML>
      2 <html class="reftest-wait">
      3 <meta charset="utf8">
      4 <title>Content Visibility: auto subtree becomes hidden in the viewport</title>
      5 <link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.org">
      6 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">
      7 <link rel="match" href="container-ref.html">
      8 <meta name="assert" content="content-visibility:auto subtree becomes hidden (through both c-v and visibility properties) and so stops painting">
      9 <script src="/common/reftest-wait.js"></script>
     10 
     11 <style>
     12 #container {
     13  width: 150px;
     14  height: 150px;
     15  background: lightblue;
     16 }
     17 #child {
     18  width: 50px;
     19  height: 50px;
     20  background: red;
     21 }
     22 #autocontainer { content-visibility: auto; }
     23 
     24 </style>
     25 
     26 <div id=container>
     27  <div id="autocontainer">
     28    Test fails if you see this text or a red box.
     29    <div id=child></div>
     30  </div>
     31 </div>
     32 
     33 <script>
     34 
     35 function runTest() {
     36  document.getElementById("autocontainer").classList.remove("auto");
     37  document.getElementById("autocontainer").classList.add("hidden");
     38  document.getElementById("autocontainer").style.visibility = "hidden";
     39 
     40  requestAnimationFrame(takeScreenshot);
     41 }
     42 
     43 window.onload = requestAnimationFrame(() => {
     44  requestAnimationFrame(() => {
     45    requestAnimationFrame(() => {
     46      runTest();
     47    });
     48  });
     49 });
     50 
     51 </script>
     52 </html>