Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: LayoutTests/fast/canvas/bug532148.html

Issue 1350883002: Fix bug where setting canvas size to 0 was treated as if context was lost (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix layout test Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/bug532148-expected.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <canvas id='c'></canvas>
3
4 <script>
5 const canvas = document.getElementById('c'),
6 ctx = c.getContext('2d', {alpha: false});
7
8 // The following would permanently damage the canvas (crbug.com/532148)
9 canvas.height = null;
10 ctx.fillRect( 0, 0, 128, null );
11
12 // Try to use canvas normally
13 canvas.width = 128;
14 canvas.height = 128;
15
16 ctx.fillStyle = 'green';
17 ctx.fillRect( 0, 0, 128, 128 );
18 ctx.fillStyle = 'blue';
19 ctx.fillRect( 0, 0, 64, 64 );
20 ctx.fillRect( 64, 64, 64, 64 );
21 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/bug532148-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698