layout/reftests/canvas/text-horzline-with-bottom.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/canvas/text-horzline-with-bottom.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<head>
     1.7 +<title>Test to ensure bottom basline-anchored text doesn't intersect horz line</title>
     1.8 +</head>
     1.9 +<body>
    1.10 +<canvas id="c" width="128" height="64" style="direction:ltr"></canvas>
    1.11 +<script type="text/javascript">
    1.12 +  var canvas = document.getElementById('c');
    1.13 +  var ctx = canvas.getContext('2d');
    1.14 +
    1.15 +  ctx.fillStyle = 'white';
    1.16 +  ctx.fillRect(0, 0, canvas.width, canvas.height)
    1.17 +
    1.18 +  ctx.strokeStyle = 'black';
    1.19 +  ctx.beginPath();
    1.20 +  ctx.moveTo(0,32);
    1.21 +  ctx.lineTo(128,32);
    1.22 +  ctx.stroke();
    1.23 +
    1.24 +  ctx.font = '20px sans-serif';
    1.25 +  ctx.textBaseline = 'bottom';
    1.26 +  ctx.fillText('TEXT', 64, 32);
    1.27 +
    1.28 +</script>
    1.29 +</body>
    1.30 +</html>

mercurial