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

Side by Side Diff: LayoutTests/fast/canvas/canvas-unballanced-save.html

Issue 661763003: Ensure canvas state is preserved when 2d canvas falls out of display list mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/canvas-unballanced-save-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 <script>
3 var ctx;
4 window.onload = function () {
5 if (window.testRunner) {
6 testRunner.waitUntilDone();
7 }
8 ctx = document.getElementById('c').getContext('2d');
9 ctx.fillStyle = 'green';
10 ctx.fillRect(0, 0, 100, 100);
11 ctx.save();
12 ctx.translate(10, 0);
13 requestAnimationFrame(blueSquare);
14 }
15
16 function blueSquare() {
17 ctx.fillStyle = 'blue';
18 ctx.fillRect(0, 10, 80, 80);
19 requestAnimationFrame(redSquare);
20 }
21
22 function redSquare() {
23 ctx.fillStyle = 'red';
24 ctx.fillRect(10, 20, 60, 60);
25 if (window.testRunner) {
26 testRunner.notifyDone();
27 }
Stephen White 2014/10/16 17:40:47 Nit: weird indentation here.
Justin Novosad 2014/10/16 18:05:01 Looks like presubmit script does not warn about ta
28 }
29 </script>
30 <p>The canvas below should contain green, blue and red nested squares, all cente red with respect to each other.</p>
31 <canvas id="c" width="100" height="100"></canvas>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-unballanced-save-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698