| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <body> | 2 <body> |
| 3 <canvas id="canvas" width=600 height=300 style="border:5px solid black"></canvas
> | 3 <canvas id="canvas" width=600 height=300 style="border:5px solid black"> |
| 4 <script src="resources/asyncpaintguard.js"></script> | |
| 5 <script> | 4 <script> |
| 6 if (window.testRunner) | 5 if (window.testRunner) |
| 7 testRunner.dumpAsTextWithPixelResults(); | 6 testRunner.dumpAsTextWithPixelResults(); |
| 8 | 7 |
| 9 var ctx = document.getElementById('canvas').getContext('2d'); | 8 var ctx = document.getElementById('canvas').getContext('2d'); |
| 10 | 9 |
| 11 var x = 10; | 10 var x = 10; |
| 12 var y = 150; | 11 var y = 150; |
| 13 | 12 |
| 14 ctx.lineWidth = 1; | 13 ctx.lineWidth = 1; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 37 ctx.fillText(text, x, y); | 36 ctx.fillText(text, x, y); |
| 38 x += w + 10; | 37 x += w + 10; |
| 39 | 38 |
| 40 text = "Middle"; | 39 text = "Middle"; |
| 41 ctx.textBaseline = "middle"; | 40 ctx.textBaseline = "middle"; |
| 42 w = ctx.measureText(text).width; | 41 w = ctx.measureText(text).width; |
| 43 ctx.fillText(text, x, y); | 42 ctx.fillText(text, x, y); |
| 44 x += w + 10; | 43 x += w + 10; |
| 45 | 44 |
| 46 </script> | 45 </script> |
| OLD | NEW |