blob: 8d0e10f7ebd365deba7f609928f6baf04b0dd3c2 [file] [log] [blame]
<!-- Based on fast/repaint/justify-self-change.html -->
<!DOCTYPE HTML>
<script src="resources/paint-invalidation-test.js"></script>
<script>
window.expectedPaintInvalidationObjects = [
"LayoutBlockFlow DIV class='item1'",
"LayoutBlockFlow DIV",
"LayoutBlockFlow DIV class='item2'",
"LayoutBlockFlow DIV",
];
function paintInvalidationTest() {
document.getElementsByClassName('item1')[0].style.justifySelf = 'start';
document.getElementsByClassName('item2')[0].style.justifySelf = 'end';
}
onload = runPaintInvalidationTest;
</script>
<style>
body {
margin: 0;
}
#container {
display: grid;
grid: 100px 100px / 150px 150px;
justify-items: center;
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-self style change. Passes if there is no red.</p>
<div id="container">
<div class="item1">
<div style="height: 150px"></div>
</div>
<div class="item2">
<div style="height: 100px"></div>
</div>
</div>