LibWeb: Treat width: {min,max,fit}-content as auto if ratio unresolvable

This appears to match other engines.
This commit is contained in:
Andreas Kling 2024-06-23 16:00:20 +02:00 committed by Andreas Kling
commit ae906ca497
Notes: sideshowbarker 2024-07-16 20:21:48 +09:00
3 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,12 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x800 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x784 children: inline
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784] baseline: 784
SVGSVGBox <svg> at (8,8) content-size 784x784 [SVG] children: not-inline
SVGGeometryBox <rect> at (8,8) content-size 392x392 children: not-inline
ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x800]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x800]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x784]
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x784]
SVGPathPaintable (SVGGeometryBox<rect>) [8,8 392x392]

View file

@ -0,0 +1,3 @@
<!DOCTYPE html><style>
svg { width: max-content; }
</style><body><svg viewBox="0 0 24 24"><rect x=0 y=0 width=12 height=12></svg>