Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <body> |
michael@0 | 4 | <!-- |
michael@0 | 5 | This test makes sure that scrolling a normal sized canvas would correctly |
michael@0 | 6 | scroll its contents. Normal sized canvases are accelerated, so this test |
michael@0 | 7 | makes sure that the accelerated code path for this operaton works correctly. |
michael@0 | 8 | |
michael@0 | 9 | The padding in this test is added mostly to make sure that scrollLeft/Top |
michael@0 | 10 | correctly skip the padding. |
michael@0 | 11 | --> |
michael@0 | 12 | <div id="container" style="width: 100px; height: 100px; padding: 10px; overflow: hidden"> |
michael@0 | 13 | <canvas width="300" height="300" id="c"></canvas> |
michael@0 | 14 | </div> |
michael@0 | 15 | <script> |
michael@0 | 16 | var ctx = document.getElementById("c").getContext("2d"); |
michael@0 | 17 | ctx.fillStyle = "red"; |
michael@0 | 18 | ctx.fillRect(0, 0, 300, 100); |
michael@0 | 19 | ctx.fillStyle = "green"; |
michael@0 | 20 | ctx.fillRect(0, 100, 300, 200); |
michael@0 | 21 | var container = document.getElementById("container"); |
michael@0 | 22 | container.scrollLeft = 10; |
michael@0 | 23 | container.scrollTop = 110; |
michael@0 | 24 | </script> |
michael@0 | 25 | </body> |
michael@0 | 26 | </html> |