blob: 5c0d3e4686f96f7ff5fc0fa2b0615cd962cda7db [file] [log] [blame]
<!doctype html>
<canvas id='c'></canvas>
<script>
const canvas = document.getElementById('c'),
ctx = c.getContext('2d', {alpha: false});
// The following would permanently damage the canvas (crbug.com/532148)
canvas.height = null;
ctx.fillRect( 0, 0, 128, null );
// Try to use canvas normally
canvas.width = 128;
canvas.height = 128;
ctx.fillStyle = 'green';
ctx.fillRect( 0, 0, 128, 128 );
ctx.fillStyle = 'blue';
ctx.fillRect( 0, 0, 64, 64 );
ctx.fillRect( 64, 64, 64, 64 );
</script>