layout/reftests/bugs/555388-1.html

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

     1 <html>
     2  <head>
     3   <script type="application/javascript">
     4 function draw() {
     5   var canvas = document.getElementById("canvas");
     6   var ctx = canvas.getContext("2d");
     8   ctx.fillStyle = "red";
     9   ctx.fillRect(0, 0, 500, 500);
    10   ctx.save();
    11   ctx.beginPath();
    12   ctx.moveTo(30, 30);
    13   ctx.lineTo(149, 30);
    14   ctx.lineTo(150, 150);
    15   ctx.lineTo(30, 150);
    16   ctx.lineTo(30, 30);
    17   ctx.clip();
    18   ctx.clearRect(0, 0, 500, 500);
    19   /**
    20    * Work around a strange left edge offset problem in D2D.
    21    */
    22   ctx.restore();
    23   ctx.fillStyle = "red";
    24   ctx.fillRect(0, 0, 1, 500);
    25   ctx.fillStyle = "white";
    26   ctx.fillRect(30, 30, 1, 120);
    27 }
    28   </script>
    29  </head>
    30 <body onload="draw()">
    31  <canvas id="canvas" width="300" height="300"></canvas>
    32 </body>
    33 </html>

mercurial