45 lines
1013 B
HTML
45 lines
1013 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>This tests that applying rotation on a subpixel (absolute)positioned box does not change its position/size.</title>
|
|
<head>
|
|
<style>
|
|
div {
|
|
background: green;
|
|
width: 9px;
|
|
height: 9px;
|
|
position: absolute;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<p id="container"></p>
|
|
<script>
|
|
var container = document.getElementById("container");
|
|
adjustment = 0.1;
|
|
for (i = 0; i < 10; ++i) {
|
|
adjustment+=0.1;
|
|
for (j = 0; j < 10; ++j) {
|
|
var e = document.createElement("div");
|
|
e.style.top = (11 * i + j * adjustment) + "px";
|
|
e.style.left = (11 * j + i * adjustment) + "px";
|
|
container.appendChild(e);
|
|
}
|
|
}
|
|
|
|
function rotate() {
|
|
divs = document.getElementsByTagName("div");
|
|
for (i = 0; i < divs.length; ++i)
|
|
divs[i].style.webkitTransform = "rotate(90deg)";
|
|
|
|
if (window.testRunner)
|
|
testRunner.notifyDone();
|
|
}
|
|
|
|
if (window.testRunner)
|
|
testRunner.waitUntilDone();
|
|
|
|
setTimeout(rotate, 0);
|
|
</script>
|
|
</body>
|
|
</html> |