tor-browser

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

scrollTo-zoom.html (1245B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <meta name="viewport" content="width=device-width, initial-scale=1">
      4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
      5 <link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-scrollto">
      6 <link rel="match" href="../reference/ref-nothing-below.xht" />
      7 <meta name="assert" content="This test checks scrollTo() with different zoom levels.">
      8 <style>
      9  .container {
     10    position: relative;
     11    width: 100px;
     12    height: 100px;
     13    overflow: scroll;
     14    background: red;
     15    scrollbar-width: none;
     16  }
     17  .container > div {
     18    position: absolute;
     19    left: 13px;
     20    top: 27px;
     21    width: 100px;
     22    height: 100px;
     23    background: white;
     24  }
     25 </style>
     26 <body style="background: white;">
     27  <p>Test passes if there is nothing below.</p>
     28  <div class="container" style="zoom: 0.9;">
     29    <div></div>
     30  </div>
     31  <div class="container" style="zoom: 1;">
     32    <div></div>
     33  </div>
     34  <div class="container" style="zoom: 1.11;">
     35    <div></div>
     36  </div>
     37  <div class="container" style="zoom: 1.5;">
     38    <div></div>
     39  </div>
     40  <script>
     41    Array.prototype.forEach.call(document.getElementsByClassName("container"), (el) => {
     42      el.scrollTo(13, 27);
     43    });
     44  </script>
     45 </body>