tor-browser

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

632781-verybig.html (999B)


      1 <!DOCTYPE html>
      2 <html>
      3  <body>
      4    <!--
      5      This test makes sure that scrolling a huge canvas would correctly scroll
      6      its contents.  We don't accelerate extremely large canvases because of
      7      GPU maximum texture size limits, so this test makes sure that the
      8      non-accelerated code path for this operation works correctly.
      9 
     10      The padding in this test is added mostly to make sure that scrollLeft/Top
     11      correctly skip the padding.
     12    -->
     13    <div id="container" style="width: 100px; height: 100px; padding: 10px; overflow: hidden">
     14      <canvas width="10000" height="120" id="c"></canvas>
     15    </div>
     16    <script>
     17      var ctx = document.getElementById("c").getContext("2d");
     18      ctx.fillStyle = "red";
     19      ctx.fillRect(0, 0, 10000, 5000);
     20      ctx.fillStyle = "green";
     21      ctx.fillRect(5000, 0, 10000, 5000);
     22      var container = document.getElementById("container");
     23      container.scrollLeft = 5010;
     24      container.scrollTop = 10;
     25    </script>
     26  </body>
     27 </html>