blob: d827684cc9b24f7e389e4d44300f045e23ca5afe [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 = 0;
for (i = 0; i < 20; ++i) {
var childAdjustment = 0;
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>