1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

LibWeb+Base: Deal with column-spans greater than implicit grid

When the indicated column-span is greater than the implicit grid (like
in cases when the grid has the default size of 1x1, and the column is
supposed to span any number greater than that), then previously were
crashing.
This commit is contained in:
martinfalisse 2022-10-08 14:46:21 +02:00 committed by Andreas Kling
parent 994d996ab2
commit e537035cc6
2 changed files with 32 additions and 8 deletions

View file

@ -30,8 +30,8 @@
<div class="grid-item">4</div>
</div>
<p>Start of crash tests</p>
<!-- Check for a bug where a github page was crashing due to the following code. -->
<p>If you can see this message then the test passed.</p>
<div
class="grid-container"
style="
@ -41,7 +41,6 @@
</div>
<!-- Spans causing positions outside the inherit grid. (span 2 with an end position of 1 causes the start to be -1) -->
<p>If you can see this message then the test passed.</p>
<div class="grid-container">
<div class="grid-item" style="grid-row: span 2 / 1; grid-column: span 2 / 1;">1</div>
<div class="grid-item" style="grid-row: span 2 / 1;">2</div>
@ -50,7 +49,6 @@
</div>
<!-- 0 positioned grid items and similar inputs -->
<p>If you can see this message then the test passed.</p>
<div class="grid-container">
<div class="grid-item" style="grid-row-end: 0;">2</div>
<div class="grid-item" style="grid-row: 0 / 0;">3</div>
@ -60,6 +58,25 @@
<div class="grid-item" style="grid-column-end: 1;">6</div>
</div>
<!-- Grid-column-span larger than implicit grid for row-positioned items -->
<div class="grid-container">
<div class="grid-item" style="grid-row: 1 / -1; grid-column: span 4;">1</div>
</div>
<!-- Grid-column-span larger than implicit grid for non-positioned items -->
<div class="grid-container">
<div class="grid-item" style="grid-column: span 4;">1</div>
</div>
<!-- Grid-row-span larger than implicit grid for column-positioned items -->
<div class="grid-container">
<div class="grid-item" style="grid-column: 1 / -1; grid-row: span 4;">1</div>
</div>
<!-- Grid-row-span larger than implicit grid for non-positioned items -->
<div class="grid-container">
<div class="grid-item" style="grid-row: span 4;">1</div>
</div>
<p>End of crash tests</p>
<!-- Different column sizes -->
<p>Should render a 2x2 grid with columns 50px and 50%</p>
<div