blob: 5a0032964c82435572be2db1cd52b3c841699487 [file] [log] [blame]
<!-- Based on fast/repaint/fixed-under-composited-absolute-scrolled.html -->
<!DOCTYPE html>
<script src="resources/paint-invalidation-test.js"></script>
<script>
function paintInvalidationTest() {
document.getElementById('fixed').style.height = '200px';
}
onload = function() {
// Scroll before repaint test to test correct scroll offset of invalidation rect
// for fixed-position element when it needs repaint.
window.scrollTo(0, 400);
runPaintInvalidationTest();
};
</script>
<style>
#indicator {
position: absolute;
height: 200px;
width: 100px;
top: 400px;
left: 0;
background-color: red;
}
#absolute {
position: absolute;
top: 2000px;
width: 1px;
height: 1px;
background-color: red;
backface-visibility: hidden;
z-index: 1000;
}
#fixed {
position: fixed;
top: 0;
left: 0;
width: 100px;
height: 100px;
background-color: green;
}
</style>
Tests paint invalidation of fixed element under a composited absolute element on resize after scrolled.
Passes if there is a 100x200 green rectangle and no red.
<div id="indicator"></div>
<div id="absolute">
<div id="fixed">
</div>
</div>