blob: fc9aad51d20299d6a966f11d54863c5c53597c15 [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.settings.setAccelerated2dCanvasEnabled(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>