mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-14 07:02:54 +00:00
If grid-template-rows or grid-template-columns queried for a box that is not a grid container, the result should be computed value instead of null. Fixes crashing in inspector.
34 lines
919 B
HTML
34 lines
919 B
HTML
<script src="include.js"></script>
|
|
<style>
|
|
.grid-container {
|
|
width: 200px;
|
|
display: grid;
|
|
background-color: lightsalmon;
|
|
}
|
|
|
|
.grid-item {
|
|
height: 50px;
|
|
background-color: lightblue;
|
|
}
|
|
|
|
.not-a-grid {
|
|
grid-template-columns: auto auto;
|
|
}
|
|
</style>
|
|
<div class="grid-container" style="grid-template-columns: auto auto">
|
|
<div class="grid-item"></div>
|
|
<div class="grid-item"></div>
|
|
<div class="grid-item"></div>
|
|
<div class="grid-item"></div>
|
|
</div>
|
|
<div class="not-a-grid"></div>
|
|
<script>
|
|
test(() => {
|
|
const grid = document.querySelector(".grid-container");
|
|
println(getComputedStyle(grid).gridTemplateColumns);
|
|
println(getComputedStyle(grid).gridTemplateRows);
|
|
|
|
const not_a_grid = document.querySelector(".not-a-grid");
|
|
println(getComputedStyle(not_a_grid).gridTemplateColumns);
|
|
});
|
|
</script>
|