blob: ec8d85f00a69c032692a253a38cd90bff1216d44 [file] [log] [blame]
<!-- Based on fast/repaint/justify-items-legacy-change.html -->
<!DOCTYPE HTML>
<script src="resources/paint-invalidation-test.js"></script>
<script>
window.expectedPaintInvalidationObjects = [
"LayoutBlockFlow DIV",
"LayoutBlockFlow DIV class='item1'",
"LayoutBlockFlow DIV",
"LayoutBlockFlow DIV class='item2'",
"LayoutGrid DIV id='container'",
"LayoutBlockFlow DIV id='parentContainer'",
"LayoutBlockFlow DIV id='parentContainer'",
"LayoutGrid DIV id='container'",
"LayoutBlockFlow DIV class='item1'",
"LayoutBlockFlow DIV",
"LayoutBlockFlow DIV class='item2'",
"LayoutBlockFlow DIV",
];
function paintInvalidationTest() {
document.getElementById('parentContainer').style.justifyItems = 'legacy center';
}
onload = runPaintInvalidationTest;
</script>
<style>
body {
margin: 0;
}
#parentContainer {
justify-items: center;
background-color: orange;
width: 300px;
height: 400px;
}
#container {
display: grid;
grid: 100px 100px / 150px 150px;
width: 200px;
height: 300px;
background-color: red;
}
.item1 {
grid-row: 1;
grid-column: 1;
background-color: green;
border: solid thin blue;
width: 50px;
}
.item2 {
grid-row: 1;
grid-column: 2;
background-color: green;
border: solid thin blue;
width: 50px;
</style>
<p style="height: 20px">Tests invalidation on justify-items style change (legacy value). Passes if green bars are centerd inside their red container.</p>
<div id="parentContainer">
<div id="container">
<div class="item1">
<div style="height: 50px"></div>
</div>
<div class="item2">
<div style="height: 50px"></div>
</div>
</div>
</div>