blob: 18a156a73754c5f1011cdca4f84e7b8b52e8924a [file] [log] [blame]
<!-- Based on fast/repaint/fixed-child-of-transformed-scrolled.html -->
<!DOCTYPE html>
<script src="resources/paint-invalidation-test.js"></script>
<script>
function paintInvalidationTest() {
document.getElementById('fixed').style.backgroundColor = 'green';
}
onload = function() {
document.getElementById('transformed').scrollTop = 50;
runPaintInvalidationTest();
}
</script>
<style>
#transformed {
position: absolute;
top: 50px;
left: 100px;
transform: translateX(0);
overflow: scroll;
width: 300px;
height: 300px;
}
#fixed {
position: fixed;
top: 150px;
left: 100px;
width: 100px;
height: 100px;
background-color: red;
}
/* to make the transformed container scrollable */
#content {
width: 1000px;
height: 1000px;
}
</style>
Tests invalidation of a fixed-position child of a transformed scrolled element.
Passes if there is a green box at the center of the scrollable area.
<div id="transformed">
<div id="fixed"></div>
<div id="content"></div>
</div>