| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 canvas { | 3 canvas { |
| 4 position: absolute; | 4 position: absolute; |
| 5 width: 600px; | 5 width: 600px; |
| 6 height: 500px; | 6 height: 500px; |
| 7 top: 50px; | 7 top: 50px; |
| 8 left: 50px; | 8 left: 50px; |
| 9 /* object-fit and object-position make the content of the canvas not affected | 9 /* object-fit and object-position make the content of the canvas not affected |
| 10 by the resize in repaintTest(). */ | 10 by the resize in repaintTest(). */ |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 document.getElementById('canvas').style.width = '500px'; | 22 document.getElementById('canvas').style.width = '500px'; |
| 23 } | 23 } |
| 24 onload = runRepaintAndPixelTest; | 24 onload = runRepaintAndPixelTest; |
| 25 | 25 |
| 26 var ctx = document.getElementById('canvas').getContext('2d'); | 26 var ctx = document.getElementById('canvas').getContext('2d'); |
| 27 ctx.beginPath(); | 27 ctx.beginPath(); |
| 28 ctx.arc(250, 250, 250, 0, 2 * Math.PI); | 28 ctx.arc(250, 250, 250, 0, 2 * Math.PI); |
| 29 ctx.fillStyle = 'green'; | 29 ctx.fillStyle = 'green'; |
| 30 ctx.fill(); | 30 ctx.fill(); |
| 31 </script> | 31 </script> |
| OLD | NEW |