mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:18:13 +00:00
LibWeb: Fix regression in definite grid row heights
Fixes a row height bug when a grid item in a row has a definite height.
This commit is contained in:
parent
e65f4b3dc5
commit
6f52272d34
4 changed files with 76 additions and 5 deletions
34
Tests/LibWeb/Layout/expected/grid/row-height.txt
Normal file
34
Tests/LibWeb/Layout/expected/grid/row-height.txt
Normal file
|
@ -0,0 +1,34 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x83.46875 children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x67.46875 children: not-inline
|
||||
Box <div.grid-container> at (8,8) content-size 784x67.46875 children: not-inline
|
||||
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <div.grid-item> at (8,8) content-size 392.140625x50 children: inline
|
||||
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.34375x17.46875]
|
||||
"1"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <div.grid-item> at (400.140625,8) content-size 392x50 children: inline
|
||||
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [400.140625,8 8.8125x17.46875]
|
||||
"2"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <div.grid-item> at (8,58) content-size 392.140625x17.46875 children: inline
|
||||
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [8,58 9.09375x17.46875]
|
||||
"3"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <div.grid-item> at (400.140625,58) content-size 392x17.46875 children: inline
|
||||
line 0 width: 7.75, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [400.140625,58 7.75x17.46875]
|
||||
"4"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
22
Tests/LibWeb/Layout/input/grid/row-height.html
Normal file
22
Tests/LibWeb/Layout/input/grid/row-height.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<style>
|
||||
body {
|
||||
font-family: 'SerenitySans';
|
||||
}
|
||||
|
||||
.grid-container {
|
||||
display: grid;
|
||||
background-color: lightsalmon;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
background-color: lightblue;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Should render a 2x2 grid with the first row having a height of 50px -->
|
||||
<div class="grid-container" style="grid-template-columns: auto auto;">
|
||||
<div class="grid-item" style="height: 50px;">1</div>
|
||||
<div class="grid-item">2</div>
|
||||
<div class="grid-item">3</div>
|
||||
<div class="grid-item">4</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue