blob: f001fe17ba15f095b8e948917239f0e49d726156 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>This tests that bitmap background images sized and positioned properly on subpixels when background-repeat is present.</title>
<style>
div {
background: black;
position: fixed;
top: 0px;
}
.thin {
background: white;
height: 0.5px;
width: 0.5px;
}
.thick {
background: white;
height: 1px;
width: 1px;
}
</style>
</head>
<body>
<p id="container"></p>
<script>
var container = document.getElementById("container");
w=50; h=150;
for (i = 0; i < 10; ++i) {
var e = document.createElement("div");
e.style.left = (w * i) + "px";
e.style.width = w + "px";
e.style.height = h + "px";
e.style.backgroundRepeat = "space";
container.appendChild(e);
w+=0.1;
h+=0.1;
}
w=25; h=25;
for (i = 0; i < 10; ++i) {
var e = document.createElement("div");
e.style.top = "150px";
e.style.left = ((w + 25) * i) + "px";
e.style.width = "25px";
e.style.height = "25px";
e.style.backgroundRepeat = "space";
container.appendChild(e);
w+=0.1;
h+=0.1;
}
</script>
<div class=thin style="left: 151px; top: 25px; width: 255px;"></div>
<div class=thick style="left: 406px; top: 25px; width: 105px;"></div>
<div class=thin style="left: 226.5px; top: 0px; height: 50px;"></div>
<div class=thin style="left: 277.5px; top: 0px; height: 50px;"></div>
<div class=thin style="left: 328.5px; top: 0px; height: 50px;"></div>
<div class=thin style="left: 380px; top: 0px; height: 50px;"></div>
<div class=thin style="left: 431.5px; top: 0px; height: 50px;"></div>
<div class=thick style="left: 483px; top: 0px; height: 50px;"></div>
</body>
</html>