layout/reftests/canvas/image-rendering-test.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE HTML>
     2 <!--
     3     Any copyright is dedicated to the Public Domain.
     4     http://creativecommons.org/licenses/publicdomain/
     5   -->
     6 <html reftest-zoom="2" class="reftest-wait">
     7 <head>
     8   <title>test image-rendering</title>
     9   <style>
    10     canvas { position:absolute;left:0px;top:0px; }
    11   </style>
    12   <script type="text/javascript">
    13     document.addEventListener("MozReftestInvalidate", draw, false);
    15     function draw() {
    16         var canvas = document.getElementById("canvas");
    17         var ctx = canvas.getContext("2d");
    18         ctx.fillStyle = "rgb(255,0,0)";
    19         ctx.fillRect(25,25,100,100);
    20         ctx.fillStyle = "rgb(0,255,0)";
    21         ctx.fillRect(25,25,50,50);
    22         document.documentElement.removeAttribute('class');
    23     }
    24   </script>
    25 </head>
    26 <body>
    27   <canvas style="image-rendering: -moz-crisp-edges; " id="canvas" width="300" height="300"></canvas>
    28 </body>
    29 </html>

mercurial