tor-browser

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

unclosed-nested-layers.html (761B)


      1 <!DOCTYPE html>
      2 <link rel="match" href="unclosed-nested-layers-expected.html">
      3 <title>Canvas test: unclosed-nested-layers</title>
      4 <h1>unclosed-nested-layers</h1>
      5 <p class="desc">Check that unclosed nested layers aren't rendered.</p>
      6 <canvas id="canvas" width="200" height="200">
      7  <p class="fallback">FAIL (fallback content)</p>
      8 </canvas>
      9 <script>
     10  const canvas = document.getElementById("canvas");
     11  const ctx = canvas.getContext('2d');
     12 
     13  ctx.fillStyle = 'rgba(0, 0, 255, 1)';
     14  ctx.fillRect(60, 60, 75, 50);
     15 
     16  ctx.beginLayer();
     17  ctx.fillStyle = 'rgba(225, 0, 0, 1)';
     18  ctx.fillRect(50, 50, 75, 50);
     19 
     20  ctx.beginLayer();
     21  ctx.fillStyle = 'rgba(0, 255, 0, 1)';
     22  ctx.fillRect(70, 70, 75, 50);
     23 
     24  ctx.endLayer();
     25  // Missing ctx.endLayer() here.
     26 </script>