layout/reftests/canvas/text-no-frame-test.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 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4 <title>Test to ensure non-framed canvas inherits properties</title>
     5 </head>
     6 <body>
     7 <div style="font: 40px sans-serif; direction: rtl;">
     8 <canvas id="c" width="512" height="256" style="display: none;"></canvas>
     9 </div>
    10 <canvas id="d" width="512" height="256"></canvas>
    11 <script type="text/javascript">
    12   var canvas = document.getElementById('c');
    13   var ctx = canvas.getContext('2d');
    15   var str = 'BLEARGH!';
    16   ctx.font = '1em sans-serif';
    17   ctx.fillStyle = 'black';
    18   ctx.textAlign = 'center';
    19   ctx.fillText(str, 256, 128);
    21   var canvas2 = document.getElementById('d');
    22   var ctx = canvas2.getContext('2d');
    24   ctx.drawImage(canvas, 0, 0);
    25 </script>
    26 </body>
    27 </html>

mercurial