tor-browser

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

content-visibility-008.html (1081B)


      1 <!doctype HTML>
      2 <html class="reftest-wait">
      3 <meta charset="utf8">
      4 <title>CSS Content Visibility: hidden stops painting when added (composited with composited child)</title>
      5 <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.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 subtrees stop painting when hidden is added">
      9 
     10 <script src="/common/reftest-wait.js"></script>
     11 
     12 <style>
     13 #container {
     14  width: 150px;
     15  height: 150px;
     16  background: lightblue;
     17  will-change: transform;
     18 }
     19 .hidden {
     20  content-visibility: hidden;
     21 }
     22 #child {
     23  width: 50px;
     24  height: 50px;
     25  background: red;
     26  will-change: transform;
     27 }
     28 </style>
     29 
     30 <div id=container>
     31  Test fails if you can see this text or a red box.
     32  <div id=child></div>
     33 </div>
     34 
     35 <script>
     36 function runTest() {
     37  const container = document.getElementById("container");
     38  container.classList.add("hidden");
     39  requestAnimationFrame(takeScreenshot);
     40 }
     41 
     42 window.onload = runTest;
     43 </script>
     44 </html>