tor-browser

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

content-visibility-009.html (1094B)


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