blob: 24924a90dbf54203878052c101c2d3a9daeea2e4 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>This tests that iframe can be positioned on odd device pixels.</title>
<style>
.container {
border: solid 0.5px green;
position: fixed;
}
.child {
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.className = "container";
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 child = document.createElement("div");
child.className = "child";
child.style.width = (w - 1) + "px";
child.style.height = (h - 1) + "px";
e.appendChild(child);
container.appendChild(e);
w+=0.1;
h+=0.1;
}
}
</script>
</body>
</html>