1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/bugs/555388-1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +<html> 1.5 + <head> 1.6 + <script type="application/javascript"> 1.7 +function draw() { 1.8 + var canvas = document.getElementById("canvas"); 1.9 + var ctx = canvas.getContext("2d"); 1.10 + 1.11 + ctx.fillStyle = "red"; 1.12 + ctx.fillRect(0, 0, 500, 500); 1.13 + ctx.save(); 1.14 + ctx.beginPath(); 1.15 + ctx.moveTo(30, 30); 1.16 + ctx.lineTo(149, 30); 1.17 + ctx.lineTo(150, 150); 1.18 + ctx.lineTo(30, 150); 1.19 + ctx.lineTo(30, 30); 1.20 + ctx.clip(); 1.21 + ctx.clearRect(0, 0, 500, 500); 1.22 + /** 1.23 + * Work around a strange left edge offset problem in D2D. 1.24 + */ 1.25 + ctx.restore(); 1.26 + ctx.fillStyle = "red"; 1.27 + ctx.fillRect(0, 0, 1, 500); 1.28 + ctx.fillStyle = "white"; 1.29 + ctx.fillRect(30, 30, 1, 120); 1.30 +} 1.31 + </script> 1.32 + </head> 1.33 +<body onload="draw()"> 1.34 + <canvas id="canvas" width="300" height="300"></canvas> 1.35 +</body> 1.36 +</html>