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

LibWeb: Treat flex item cross axis max-size as "none" in more cases

There are a bunch of situations where we need to treat cross axis
max-size properties as "none", notably percentage values when the
reference containing block size is an intrinsic sizing constraint.

This fixes an issue where flex items with definite width would get
shrunk to 0px by "max-width: 100%" in case the item itself is an
SVG with no natural width or height.

For consistency, we now use the should_treat_max_width/height_as_none
helpers throughout FFC.

This makes the search/account/cart icons show up in the top right
on https://twinings.co.uk :^)
This commit is contained in:
Andreas Kling 2024-01-15 10:16:43 +01:00
parent 9a93f677f4
commit 72dd37438d
4 changed files with 61 additions and 12 deletions

View file

@ -0,0 +1,17 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x116 [BFC] children: not-inline
Box <body> at (8,8) content-size 784x100 flex-container(row) [FFC] children: not-inline
Box <div> at (8,8) content-size 100x100 flex-container(row) flex-item [FFC] children: not-inline
SVGSVGBox <svg.c-ico> at (8,8) content-size 100x100 flex-item [SVG] children: inline
Box <use> at (8,8) content-size 100x100 children: inline
Box <symbol#icon-cart> at (8,8) content-size 100x100 [BFC] children: not-inline
SVGGeometryBox <rect> at (8,8) content-size 100x100 children: not-inline
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]
PaintableBox (Box<BODY>) [8,8 784x100]
PaintableBox (Box<DIV>) [8,8 100x100]
SVGSVGPaintable (SVGSVGBox<svg>.c-ico) [8,8 100x100]
PaintableBox (Box<use>) [8,8 100x100]
PaintableBox (Box<symbol>#icon-cart) [8,8 100x100]
SVGPathPaintable (SVGGeometryBox<rect>) [8,8 100x100]