tor-browser

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

contain-paint-049.html (796B)


      1 <!DOCTYPE html>
      2 <meta charset="utf8">
      3 <title>CSS Containment Test: Scrolling overflow works when paint is contained"</title>
      4 <link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-paint">
      5 <meta name="assert" content="Scrolling overflow works when paint is contained.">
      6 
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 
     10 <style>
     11 #container {
     12  width: 100px;
     13  height: 100px;
     14  overflow: auto;
     15  contain: paint;
     16 }
     17 .content {
     18  position: absolute;
     19  height: 500%;
     20  width: 100%;
     21 }
     22 </style>
     23 
     24 <div id="container">
     25  <div class="content">
     26  </div>
     27 </div>
     28 
     29 <script>
     30  test(() => {
     31    container.scrollTo(0, 100);
     32    assert_equals(container.scrollTop, 100);
     33  }, "Scrolling overflow works when paint is contained");
     34 </script>