LibWeb: Avoid an infinite recursion in replaced element sizing

In the case where we had a preferred aspect ratio and a natural height
but no natural width, we'd get into ping-ponging infinite recursion by
trying to find the width to resolve the height to resolve the width to
resolve the height...
This commit is contained in:
Andreas Kling 2024-11-23 14:48:42 +01:00 committed by Andreas Kling
commit d3ee49b092
Notes: github-actions[bot] 2024-11-23 15:41:30 +00:00
5 changed files with 700 additions and 1 deletions

View file

@ -0,0 +1,172 @@
Summary
Harness status: OK
Rerun
Found 162 tests
162 Pass
Details
Result Test Name MessagePass (initial values)
Pass svgViewBoxAttr: '0 0 100 200',
Pass svgWidthStyle: '100px',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px',
Pass svgWidthStyle: '50%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%',
Pass svgHeightStyle: '100px',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '100px',
Pass svgWidthStyle: '100px', svgHeightStyle: '100px',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '100px',
Pass svgWidthStyle: '50%', svgHeightStyle: '100px',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '100px',
Pass svgHeightStyle: '50%',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '50%',
Pass svgWidthStyle: '100px', svgHeightStyle: '50%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '50%',
Pass svgWidthStyle: '50%', svgHeightStyle: '50%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '50%',
Pass svgWidthAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200',
Pass svgWidthStyle: '100px', svgWidthAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgWidthAttr: '200',
Pass svgWidthStyle: '50%', svgWidthAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgWidthAttr: '200',
Pass svgHeightStyle: '100px', svgWidthAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '100px', svgWidthAttr: '200',
Pass svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '200',
Pass svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '200',
Pass svgHeightStyle: '50%', svgWidthAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '50%', svgWidthAttr: '200',
Pass svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '200',
Pass svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '200',
Pass svgWidthAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%',
Pass svgWidthStyle: '100px', svgWidthAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgWidthAttr: '25%',
Pass svgWidthStyle: '50%', svgWidthAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgWidthAttr: '25%',
Pass svgHeightStyle: '100px', svgWidthAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '100px', svgWidthAttr: '25%',
Pass svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '25%',
Pass svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '25%',
Pass svgHeightStyle: '50%', svgWidthAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '50%', svgWidthAttr: '25%',
Pass svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '25%',
Pass svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '25%',
Pass svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightAttr: '200',
Pass svgWidthStyle: '100px', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightAttr: '200',
Pass svgWidthStyle: '50%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightAttr: '200',
Pass svgHeightStyle: '100px', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '100px', svgHeightAttr: '200',
Pass svgWidthStyle: '100px', svgHeightStyle: '100px', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '100px', svgHeightAttr: '200',
Pass svgWidthStyle: '50%', svgHeightStyle: '100px', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '100px', svgHeightAttr: '200',
Pass svgHeightStyle: '50%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '50%', svgHeightAttr: '200',
Pass svgWidthStyle: '100px', svgHeightStyle: '50%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '50%', svgHeightAttr: '200',
Pass svgWidthStyle: '50%', svgHeightStyle: '50%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '50%', svgHeightAttr: '200',
Pass svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgWidthStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgWidthStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '200',
Pass svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgWidthStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgWidthStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '200',
Pass svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightAttr: '25%',
Pass svgWidthStyle: '100px', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightAttr: '25%',
Pass svgWidthStyle: '50%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightAttr: '25%',
Pass svgHeightStyle: '100px', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '100px', svgHeightAttr: '25%',
Pass svgWidthStyle: '100px', svgHeightStyle: '100px', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '100px', svgHeightAttr: '25%',
Pass svgWidthStyle: '50%', svgHeightStyle: '100px', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '100px', svgHeightAttr: '25%',
Pass svgHeightStyle: '50%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '50%', svgHeightAttr: '25%',
Pass svgWidthStyle: '100px', svgHeightStyle: '50%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '50%', svgHeightAttr: '25%',
Pass svgWidthStyle: '50%', svgHeightStyle: '50%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '50%', svgHeightAttr: '25%',
Pass svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgWidthStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgWidthStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '200', svgHeightAttr: '25%',
Pass svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgWidthStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgWidthStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '100px', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '100px', svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '25%',
Pass svgViewBoxAttr: '0 0 100 200', svgWidthStyle: '50%', svgHeightStyle: '50%', svgWidthAttr: '25%', svgHeightAttr: '25%',