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