LibWeb: Clamp <radial-size> calculated length percentages

The spec requires `<radial-size>` to be non-negative
This commit is contained in:
Callum Law
2026-01-03 19:24:42 +13:00
committed by Sam Atkins
parent b42402514e
commit 41b2496d3e
Notes: github-actions[bot] 2026-01-05 11:43:21 +00:00
3 changed files with 11 additions and 6 deletions

View File

@@ -2,17 +2,17 @@ Harness status: OK
Found 12 tests
6 Pass
6 Fail
9 Pass
3 Fail
Pass Property shape-outside value 'circle(at 10% 20%)'
Pass Property shape-outside value 'circle(at calc(75% + 0px) calc(75% + 0px))'
Pass Property shape-outside value 'circle(calc(10px + 0.5em) at -50% 50%) border-box'
Fail Property shape-outside value 'circle(calc(10px - 0.5em) at 50% -50%) border-box'
Pass Property shape-outside value 'circle(calc(10px - 0.5em) at 50% -50%) border-box'
Pass Property shape-outside value 'circle(at top 0% right calc(10% * sign(1em - 1px)))'
Pass Property shape-outside value 'circle(at top 0% right calc(10% * sibling-index()))'
Pass Property shape-outside value 'ellipse(60% closest-side at 50% 50%)'
Fail Property shape-outside value 'ellipse(calc(10px + 0.5em) calc(10px - 0.5em) at -50% 50%) padding-box'
Fail Property shape-outside value 'ellipse(calc(10px - 0.5em) calc(10px + 0.5em) at 50% -50%) border-box'
Pass Property shape-outside value 'ellipse(calc(10px + 0.5em) calc(10px - 0.5em) at -50% 50%) padding-box'
Pass Property shape-outside value 'ellipse(calc(10px - 0.5em) calc(10px + 0.5em) at 50% -50%) border-box'
Fail Property shape-outside value 'polygon(evenodd, -10px, -20px, -30px, -40px, -50px, -60px) margin-box'
Fail Property shape-outside value 'polygon(10%, 20%, 30%, 40%, 50%, 60%) content-box'
Fail Property shape-outside value 'polygon(calc(10px - 0.5em), 20%, 30%, 40%, 50%, calc(10px - 0.5em))'