layout/reftests/svg/as-image/canvas-drawImage-scale-2a.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <html class="reftest-wait">
     2   <head>
     3     <script type="text/javascript">
     4       function go() {
     5         var canvas = document.getElementById("canvas");
     6         var ctx = canvas.getContext("2d");
     8         // Draw some orange
     9         ctx.fillStyle = "orange";
    10         ctx.fillRect(0, 0, 200, 200);
    12         // Instantiate an image. Draw it at a larger size, & take snapshot
    13         // once it has loaded.
    14         var image = new Image();
    15         image.onload = function() {
    16           ctx.drawImage(image, 0, 0, 200, 200);
    17           document.documentElement.removeAttribute("class");
    18         }
    19         image.src ="squaredCircle-viewBox-100x100.svg";
    20       }
    21     </script>
    22   </head>
    23   <body onload="go()">
    24     <canvas id="canvas" width="200" height="200"></canvas>
    25 </body>
    26 </html>

mercurial