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

Side by Side Diff: LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html

Issue 1301903006: A couple of ref-test tweaks in preparation of Skia changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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-createImageBitmap-colorClamping-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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 canvas { 3 canvas {
4 background-color: gray; 4 background-color: gray;
5 width: 200px; 5 width: 200px;
6 height: 200px; 6 height: 200px;
7 } 7 }
8 </style> 8 </style>
9 <p>Test passes if a green square inside an orange rectanlge is shown up without a distortion. 9 <p>Test passes if a green square inside an orange rectanlge is shown up without a distortion.
10 <div> 10 <div>
11 <canvas width='200' height='200'></canvas> 11 <canvas width='200' height='200'></canvas>
12 </div> 12 </div>
13 <script> 13 <script>
14 function paintCanvas(canvas) 14 function paintCanvas(canvas)
15 { 15 {
16 var ctx = canvas.getContext('2d'); 16 var ctx = canvas.getContext('2d');
17 ctx.fillStyle = 'orange'; 17 ctx.fillStyle = 'orange';
18 ctx.fillRect(50, 0, 100, 200); 18
19 ctx.save();
20 ctx.beginPath();
21 ctx.rect(50, 0, 100, 200);
22 ctx.clip();
23 ctx.fillRect(0, 0, 200, 200);
24 ctx.restore();
19 25
20 ctx.fillStyle = 'green'; 26 ctx.fillStyle = 'green';
21 ctx.fillRect(75, 75, 50, 50); 27 ctx.fillRect(75, 75, 50, 50);
22 } 28 }
23 29
24 paintCanvas(document.querySelector('canvas')); 30 paintCanvas(document.querySelector('canvas'));
25 </script> 31 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-createImageBitmap-colorClamping-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698