blob: 84707542f01034a8e5d6a470b02974bdcdd0686c [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>This tests that iframe can be positioned on odd device pixels.</title>
<style>
div {
border: solid 0.5px green;
position: fixed;
}
iframe {
border: solid 0.5px red;
}
</style>
</head>
<body>
<p id="container"></p>
<script>
var container = document.getElementById("container");
adjustment = 0.1;
w = 14; h = 14;
for (i = 0; i < 20; ++i) {
adjustment+=0.1;
for (j = 0; j < 15; ++j) {
var e = document.createElement("div");
e.style.top = ((w + 1) * i + j * adjustment) + "px";
e.style.left = ((w + 1) * j + i * adjustment) + "px";
e.style.width = w + "px";
e.style.height = h + "px";
var iframe = document.createElement("iframe");
iframe.style.width = (w - 1) + "px";
iframe.style.height = (h - 1) + "px";
e.appendChild(iframe);
container.appendChild(e);
w+=0.1;
h+=0.1;
}
}
</script>
</body>
</html>