blob: 4171a34cdae3a52637dcdc4e0e93b3296e5e06d7 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>This tests that child content is positioned properly when the parent compositing layer has zero width/height.</title>
<style>
.container {
position: absolute;
}
.child {
position: absolute;
width: 5px;
height: 5px;
border: 0.5px solid red;
}
</style>
</head>
<body>
<p id="container"></p>
<script>
var container = document.getElementById("container");
containerAdjustment = 1;
for (i = 0; i < 20; ++i) {
var childAdjustment = 1;
for (j = 0; j < 20; ++j) {
var c = document.createElement("div");
c.className = "container";
c.style.top = (6 * i + j * containerAdjustment) + "px";
c.style.left = (6 * j + i * containerAdjustment) + "px";
var child = document.createElement("div");
child.className = "child";
child.style.top = (6 * i + j * childAdjustment) + "px";
child.style.left = (6 * j + i * childAdjustment) + "px";
c.appendChild(child);
container.appendChild(c);
childAdjustment += 0.05;
}
containerAdjustment += 0.05;
}
</script>
</body>
</html>