tor-browser

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

content-visibility-007.html (1039B)


      1 <!doctype HTML>
      2 <html class="reftest-wait">
      3 <meta charset="utf8">
      4 <title>CSS Content Visibility: hidden stops painting when added (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 }
     18 .hidden {
     19  content-visibility: hidden;
     20 }
     21 #child {
     22  width: 50px;
     23  height: 50px;
     24  background: red;
     25  will-change: transform;
     26 }
     27 </style>
     28 
     29 <div id=container>
     30  Test fails if you can see this text or a red box.
     31  <div id=child></div>
     32 </div>
     33 
     34 <script>
     35 function runTest() {
     36  const container = document.getElementById("container");
     37  container.classList.add("hidden");
     38  requestAnimationFrame(takeScreenshot);
     39 }
     40 
     41 window.onload = runTest;
     42 </script>
     43 </html>