tor-browser

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

mix-blend-mode-canvas-parent.html (1405B)


      1 <!DOCTYPE html>
      2 <html>
      3    <head>
      4        <title>CSS Test: Canvas with mix-blend-mode blends with the parent element.</title>
      5        <link rel="author" title="Mihai Tica" href="mailto:mitica@adobe.com">
      6        <link rel="help" href="https://drafts.fxtf.org/compositing-1/#mix-blend-mode">
      7        <meta name="assert" content="Test checks that a canvas element having mix-blend-mode applied blends with the content of the parent element.">
      8        <meta name="flags" content="dom"/>
      9        <meta name="fuzzy" content="0-1;0-10">
     10        <link rel="reviewer" title="Rik Cabanier" href="mailto:cabanier@adobe.com">
     11        <link rel="reviewer" title="Mirela Budaes" href="mailto:mbudaes@adobe.com">
     12        <link rel="match" href="reference/mix-blend-mode-canvas-parent-ref.html">
     13    </head>
     14    <body>
     15        <p>Test passes if you can see a green rectangle. <br>
     16        If blending is not performed, the canvas is displayed with red. </p>
     17        <div style="width: 100px; height: 100px; background: #FF0;">
     18            <canvas id="cvs" width="100" height="100" style="mix-blend-mode: difference;"></canvas>
     19            <script type="text/javascript">
     20                var cvs = document.getElementById("cvs");
     21                var ctx = cvs.getContext("2d");
     22                ctx.fillStyle = "#F00";
     23                ctx.fillRect(0, 0, 100, 100);
     24            </script>
     25        </div>
     26    </body>
     27 </html>