blob: 04be7991173476d4f3b7d605778181b2d8b43762 [file] [log] [blame]
<!-- Based on fast/css-grid-layout/grid-item-z-index-change-repaint.html -->
<!DOCTYPE html>
<link href="../../../fast/css-grid-layout/resources/grid.css" rel="stylesheet">
.grid {
grid-template-rows: 100px;
grid-template-columns: 200px 200px;
width: -webkit-fit-content;
margin-top: 10px;
.red {
background-color: red;
.green {
background-color: green;
.negativeZIndex {
z-index: -1;
<script src="resources/paint-invalidation-test.js"></script>
function paintInvalidationTest()
document.getElementById('item1').style.zIndex = 1;
document.getElementById('item2').style.zIndex = 1;
window.onload = runPaintInvalidationTest;
<div style="height: 100px">
<p>This test checks that grid items correctly repaint when 'z-index' changes.</p>
<p>For this test to pass, there should be no red below.</p>
<div class="grid">
<div id="item1" class="sizedToGridArea green negativeZIndex"></div>
<div class="sizedToGridArea red"></div>
<div class="grid">
<div id="item2" class="sizedToGridArea green"></div>
<div class="sizedToGridArea red"></div>