Regression(r188105): Seems to have caused crashes during PLT on some iPads
[WebKit-https.git] / LayoutTests / fast / css / image-rendering-canvas.html
1 <!DOCTYPE html> 
2 <html>
3 <head>
4 <style> 
5     canvas {
6         display: block;
7         position: fixed;
8         left: 0px;
9         top: 0px;
10         right: 0px;
11         bottom: 0px;
12         border: none;
13         width: 100px;
14         height: 100px;
15         margin: 0px;
16         padding: 0px;
17         image-rendering: -webkit-crisp-edges;
18     }
19 </style> 
20 </head>
21 <body> 
22     <!-- The resulting image should be 100x100, consisting of 4 50x50 blocks of solid color, with no blurring of edges -->
23     <canvas width="2" height="2"></canvas>
24 </body> 
25 <script> 
26     if (window.testRunner)
27         testRunner.dumpAsText(true);
28
29     var canvas;
30     var imageHandle;
31     canvas = document.getElementsByTagName("canvas")[0].getContext("2d");
32     canvas.width = 2;
33     canvas.height = 2;
34     imageHandle = canvas.createImageData(2, 2);
35
36     var index = 0;
37     var length = imageHandle.data.length;
38
39     imageHandle.data[index++] = 255;
40     imageHandle.data[index++] = 0;
41     imageHandle.data[index++] = 0;
42     imageHandle.data[index++] = 255;
43
44     imageHandle.data[index++] = 0;
45     imageHandle.data[index++] = 255;
46     imageHandle.data[index++] = 0;
47     imageHandle.data[index++] = 255;
48
49     imageHandle.data[index++] = 0;
50     imageHandle.data[index++] = 0;
51     imageHandle.data[index++] = 255;
52     imageHandle.data[index++] = 255;
53
54     imageHandle.data[index++] = 0;
55     imageHandle.data[index++] = 0;
56     imageHandle.data[index++] = 0;
57     imageHandle.data[index++] = 255;
58
59     canvas.putImageData(imageHandle, 0, 0);
60 </script> 
61 </html>