tor-browser

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

opacity-blending.html (808B)


      1 <!DOCTYPE html>
      2 <html lang="en">
      3 <meta charset="utf-8">
      4 <title>Compositor opacity blending should work correctly (and the same as canvas)</title>
      5 <html class="reftest-wait">
      6 <head>
      7 <script>
      8    function load() {
      9        var one = document.getElementById("one").getContext("2d");
     10        var two = document.getElementById("two").getContext("2d");
     11 
     12        one.fillStyle = "rgba(255,0,0,0.5)";
     13        one.fillRect(0, 0, 200, 200);
     14        two.fillStyle = "rgba(0,255,0,0.5)";
     15        two.fillRect(0, 0, 200, 200);
     16 
     17        document.documentElement.removeAttribute("class");
     18      }
     19 </script>
     20 </head>
     21 <body onload="load()">
     22 
     23 <div style="opacity:0.8">
     24    <canvas id="one" style="position:absolute; left:0px;"></canvas>
     25    <canvas id="two" style="position:absolute; left:0px;"></canvas>
     26 </div>
     27 </body>
     28 </html>