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

LibWeb: Set flex-basis to 0% when omitted from flex shorthand

This doesn't match the spec, *but* matches what other engines do, and it
turns out this is required for web compat. (It fixes the menu on MDN.)
This commit is contained in:
Andreas Kling 2023-06-07 17:16:49 +02:00
parent dd2080c55f
commit 102b8d717f
3 changed files with 59 additions and 4 deletions

View file

@ -0,0 +1,29 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x126 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 780x108 children: not-inline
Box <div.flex> at (11,11) content-size 500x52 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (11,11) content-size 36.84375x52 flex-item [BFC] children: inline
line 0 width: 36.84375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [11,11 36.84375x17.46875]
"hello"
TextNode <#text>
Box <div.item.one> at (48.84375,12) content-size 461.15625x50 flex-container(row) flex-item [FFC] children: not-inline
BlockContainer <(anonymous)> at (48.84375,12) content-size 55.359375x50 flex-item [BFC] children: inline
line 0 width: 55.359375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 7, rect: [48.84375,12 55.359375x17.46875]
"friends"
TextNode <#text>
BlockContainer <(anonymous)> at (10,64) content-size 780x0 children: inline
TextNode <#text>
Box <div.flex> at (11,65) content-size 500x52 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (11,65) content-size 36.84375x52 flex-item [BFC] children: inline
line 0 width: 36.84375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [11,65 36.84375x17.46875]
"hello"
TextNode <#text>
Box <div.item.two> at (48.84375,66) content-size 461.15625x50 flex-container(row) flex-item [FFC] children: not-inline
BlockContainer <(anonymous)> at (48.84375,66) content-size 55.359375x50 flex-item [BFC] children: inline
line 0 width: 55.359375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 7, rect: [48.84375,66 55.359375x17.46875]
"friends"
TextNode <#text>