blob: eb8bbd6490e6d1012c3ac2245b2e139b49e1acbc [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<style>
#container {
width: 100px;
height: 100px;
border: 3px solid black;
overflow: scroll;
}
canvas {
background-color: gray;
border: 1px solid black;
transform: translateZ(0);
}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsTextWithPixelResults();
if (window.internals) {
internals.settings.setPreferCompositingToLCDTextEnabled(true);
internals.runtimeFlags.accelerated2dCanvasEnabled = true;
}
function doTest() {
var canvas = document.getElementById("canvas");
var context = canvas.getContext('2d');
context.fillStyle = 'green';
context.fillRect(0, 0, 150, 100);
canvas.height = "200px";
}
window.onload = doTest;
</script>
</head>
<body>
<div id="container">
<canvas id="canvas" width="50" height="50"></canvas>
</div>
</body>
</html>