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

LibWeb: Implement grid container intrinsic sizes calculation

When a width/height constraint is applied to GFC it should set its own
width/height to the sum of track sizes according to the spec.

Changes in layout tests are improvement over what we had before.
This commit is contained in:
Aliaksandr Kalenik 2023-05-13 11:55:09 +03:00 committed by Andreas Kling
parent d0ce61bf13
commit 644e4f4c99
4 changed files with 34 additions and 6 deletions

View file

@ -1,10 +1,10 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x35.46875 [BFC] children: inline
TextNode <#text>
BlockContainer <body> at (8,8) content-size 0x19.46875 floating [BFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
BlockContainer <body> at (8,8) content-size 22x19.46875 floating [BFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 22x0 children: inline
TextNode <#text>
Box <div.grid> at (8,8) content-size 0x19.46875 [GFC] children: not-inline
Box <div.grid> at (8,8) content-size 22x19.46875 [GFC] children: not-inline
BlockContainer <(anonymous)> [BFC] children: inline
TextNode <#text>
BlockContainer <div.whee> at (9,9) content-size 18x17.46875 [BFC] children: inline

View file

@ -1,8 +1,8 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x39.46875 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 2x21.46875 floating [BFC] children: not-inline
Box <div.grid> at (11,11) content-size 0x19.46875 [GFC] children: not-inline
BlockContainer <div.whee> at (12,12) content-size 35.953125x17.46875 [BFC] children: inline
BlockContainer <body> at (10,10) content-size 41.953125x21.46875 floating [BFC] children: not-inline
Box <div.grid> at (11,11) content-size 39.953125x19.46875 [GFC] children: not-inline
BlockContainer <div.whee> at (12,12) content-size 37.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"