<!DOCTYPE html>
<html>
<head>
<style>
.subPixelContainer {
left: 10.5px;
width: 100px;
height: 100px;
position: relative;
transform: translateZ(0);
}
.subPixelContainer > div {
position: absolute;
width: 50.5px;
right: 0px;
height: 50px;
}
.overflowHidden {
overflow: hidden;
}
.test {
transform: translateZ(0);
background-color: green;
}
.ref {
background-color: red;
}
</style>
</head>
<body>
<div>This tests that sub-pixel offsets in nested composited layers are properly accumulated. You should see no red.</div>
<div class="subPixelContainer">
<div class="ref"></div>
<div class="test"></div>
</div>
<div class="subPixelContainer overflowHidden">
<div class="ref"></div>
<div class="test"></div>
</div>