OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 #container { | 5 #container { |
6 width: 100px; | 6 width: 100px; |
7 height: 100px; | 7 height: 100px; |
8 border: 3px solid black; | 8 border: 3px solid black; |
9 overflow: scroll; | 9 overflow: scroll; |
10 } | 10 } |
11 | 11 |
12 canvas { | 12 canvas { |
13 background-color: gray; | 13 background-color: gray; |
14 border: 1px solid black; | 14 border: 1px solid black; |
15 transform: translateZ(0); | 15 transform: translateZ(0); |
16 } | 16 } |
17 </style> | 17 </style> |
18 <script> | 18 <script> |
19 if (window.testRunner) | 19 if (window.testRunner) |
20 testRunner.dumpAsTextWithPixelResults(); | 20 testRunner.dumpAsTextWithPixelResults(); |
21 | 21 |
22 if (window.internals) { | 22 if (window.internals) { |
23 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); | 23 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); |
24 window.internals.settings.setAccelerated2dCanvasEnabled(true); | 24 window.internals.runtimeFlags.accelerated2dCanvasEnabled = true; |
25 } | 25 } |
26 | 26 |
27 function doTest() { | 27 function doTest() { |
28 var canvas = document.getElementById("canvas"); | 28 var canvas = document.getElementById("canvas"); |
29 var context = canvas.getContext('2d'); | 29 var context = canvas.getContext('2d'); |
30 context.fillStyle = 'green'; | 30 context.fillStyle = 'green'; |
31 context.fillRect(0, 0, 150, 100); | 31 context.fillRect(0, 0, 150, 100); |
32 canvas.height = "200px"; | 32 canvas.height = "200px"; |
33 } | 33 } |
34 | 34 |
35 window.onload = doTest; | 35 window.onload = doTest; |
36 </script> | 36 </script> |
37 </head> | 37 </head> |
38 <body> | 38 <body> |
39 <div id="container"> | 39 <div id="container"> |
40 <canvas id="canvas" width="50" height="50"></canvas> | 40 <canvas id="canvas" width="50" height="50"></canvas> |
41 </div> | 41 </div> |
42 </body> | 42 </body> |
43 </html> | 43 </html> |
OLD | NEW |