blob: c76d47ff93d8de0bd675401a781a73ec44a80683 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>This tests that we can subpixel position textareas properly.</title>
<style>
div {
position: fixed;
}
.outer {
border: 0.5px solid black;
}
.cover {
width: 5px;
height: 5px;
position: fixed;
background: green;
}
</style>
</head>
<body>
<p id="container"></p>
<script>
var container = document.getElementById("container");
adjustment = 0.2;
w=20; h=20;
for (i = 0; i < 15; ++i) {
adjustment+=0.1;
for (j = 0; j < 15; ++j) {
var e = document.createElement("div");
var topLeftY = ((w + 10) * i + j * adjustment);
var topLeftX = ((w + 10) * j + i * adjustment);
e.style.top = topLeftY + "px";
e.style.left = topLeftX + "px";
e.style.width = w + "px";
e.style.height = h + "px";
e.className = "outer";
container.appendChild(e);
var cover = document.createElement("div");
cover.style.top = (topLeftY + h - h/2 + 1) + "px";
cover.style.left = (topLeftX + w - w/2 + 1) + "px";
cover.style.width = w/2 + "px";
cover.style.height = h/2 + "px";
cover.className = "cover";
container.appendChild(cover);
w+=0.1;
h+=0.1;
}
}
</script>
</body>
</html>