blob: be5303b445d962ad1120d2caf8348745099bd962 [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) {
window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
window.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>