layout/reftests/canvas/text-emoji-notref.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 for Unicode emoji in canvas</title>
     5 <script type="text/javascript">
     6 function test(canvasID) {
     7   var canvas = document.getElementById(canvasID);
     8   var ctx = canvas.getContext('2d');
     9   var str = 'Hello';
    10   ctx.font = '2em sans-serif';
    11   ctx.fillStyle = 'black';
    12   ctx.textAlign = 'left';
    13   ctx.textBaseline = 'top';
    14   ctx.fillText(str, 10, 10);
    15 };
    16 </script>
    17 </head>
    18 <body>
    20 <div lang="en" style="margin:20px; height:100px;">
    21 <canvas id="c1" width="400" height="50"></canvas>
    22 <script type="text/javascript">
    23   test("c1");
    24 </script>
    25 </div>
    27 </body>
    28 </html>

mercurial