tor-browser

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

mix-blend-mode-canvas-sibling.html (1401B)


      1 <!DOCTYPE html>
      2 <html>
      3    <head>
      4        <title>CSS Test: Canvas with mix-blend-mode blends with sibling 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 a sibling 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-sibling-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;"></div>
     18        <canvas id="cvs" width="100" height="100" style="mix-blend-mode: difference; position: relative; top: -100px;"></canvas>
     19        <script type="text/javascript">
     20            var canvas = document.getElementById("cvs");
     21            var context = canvas.getContext("2d");
     22 
     23            context.fillStyle = "#F00";
     24            context.fillRect(0, 0, 100, 100);
     25        </script>
     26    </body>
     27 </html>