mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:37:43 +00:00
LibWeb: Return grid container width from automatic_content_width in GFC
automatic_content_width() should return grid container width that is supposed to be set by determine_intrinsic_size_of_grid_container().
This commit is contained in:
parent
644e4f4c99
commit
d187862f76
3 changed files with 31 additions and 1 deletions
14
Tests/LibWeb/Layout/expected/grid/intrinsic-sized-grid-2.txt
Normal file
14
Tests/LibWeb/Layout/expected/grid/intrinsic-sized-grid-2.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (1,1) content-size 798x30.46875 [BFC] children: not-inline
|
||||
BlockContainer <body> at (10,10) content-size 780x0 children: not-inline
|
||||
Box <div.grid> at (11,11) content-size 96.421875x19.46875 floating [GFC] children: not-inline
|
||||
BlockContainer <div.whee> at (12,12) content-size 35.953125x17.46875 [BFC] children: inline
|
||||
line 0 width: 37.953125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 4, rect: [12,12 37.953125x17.46875]
|
||||
"whee"
|
||||
TextNode <#text>
|
||||
BlockContainer <div.yeehaw> at (49.953125,12) content-size 56.46875x17.46875 [BFC] children: inline
|
||||
line 0 width: 54.46875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 6, rect: [49.953125,12 54.46875x17.46875]
|
||||
"yeehaw"
|
||||
TextNode <#text>
|
16
Tests/LibWeb/Layout/input/grid/intrinsic-sized-grid-2.html
Normal file
16
Tests/LibWeb/Layout/input/grid/intrinsic-sized-grid-2.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html><html><head><style>
|
||||
* {
|
||||
border: 1px solid black !important;
|
||||
}
|
||||
.grid {
|
||||
float: left;
|
||||
display: grid;
|
||||
grid-template-columns: min-content minmax(0, auto);
|
||||
}
|
||||
.whee {
|
||||
background: pink;
|
||||
}
|
||||
.yeehaw {
|
||||
background: lightskyblue;
|
||||
}
|
||||
</style></head><body><div class="grid"><div class="whee">whee</div><div class="yeehaw">yeehaw</div>
|
|
@ -1521,7 +1521,7 @@ void GridFormattingContext::determine_intrinsic_size_of_grid_container(Available
|
|||
|
||||
CSSPixels GridFormattingContext::automatic_content_width() const
|
||||
{
|
||||
return greatest_child_width(context_box());
|
||||
return m_state.get(grid_container()).content_width();
|
||||
}
|
||||
|
||||
CSSPixels GridFormattingContext::automatic_content_height() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue