LibWeb: Resolve circle()/ellipse() position keywords at parse time

This commit is contained in:
Callum Law
2026-01-04 01:07:21 +13:00
committed by Sam Atkins
parent 41b2496d3e
commit 96a4e33eaf
Notes: github-actions[bot] 2026-01-05 11:43:14 +00:00
15 changed files with 873 additions and 862 deletions

View File

@@ -2,19 +2,18 @@ Harness status: OK
Found 14 tests
6 Pass
8 Fail
14 Pass
Pass e.style['shape-outside'] = "circle()" should set the property value
Pass e.style['shape-outside'] = "circle(1px)" should set the property value
Fail e.style['shape-outside'] = "circle(20px at center)" should set the property value
Pass e.style['shape-outside'] = "circle(20px at center)" should set the property value
Pass e.style['shape-outside'] = "circle(at 10% 20%)" should set the property value
Fail e.style['shape-outside'] = "circle(4% at top right)" should set the property value
Pass e.style['shape-outside'] = "circle(4% at top right)" should set the property value
Pass e.style['shape-outside'] = "circle(calc(100% - 20px) at calc(100% - 20px) calc(100% / 4))" should set the property value
Fail e.style['shape-outside'] = "circle(closest-corner at center)" should set the property value
Pass e.style['shape-outside'] = "circle(closest-corner at center)" should set the property value
Pass e.style['shape-outside'] = "circle(closest-corner at 20px 50px)" should set the property value
Fail e.style['shape-outside'] = "circle(closest-side at center)" should set the property value
Pass e.style['shape-outside'] = "circle(closest-side at center)" should set the property value
Pass e.style['shape-outside'] = "circle(closest-side at 20px 30%)" should set the property value
Fail e.style['shape-outside'] = "circle(farthest-corner at center top)" should set the property value
Fail e.style['shape-outside'] = "circle(farthest-corner at center)" should set the property value
Fail e.style['shape-outside'] = "circle(farthest-side at center top)" should set the property value
Fail e.style['shape-outside'] = "circle(farthest-side at center)" should set the property value
Pass e.style['shape-outside'] = "circle(farthest-corner at center top)" should set the property value
Pass e.style['shape-outside'] = "circle(farthest-corner at center)" should set the property value
Pass e.style['shape-outside'] = "circle(farthest-side at center top)" should set the property value
Pass e.style['shape-outside'] = "circle(farthest-side at center)" should set the property value

View File

@@ -2,19 +2,18 @@ Harness status: OK
Found 14 tests
9 Pass
5 Fail
14 Pass
Pass e.style['shape-outside'] = "ellipse()" should set the property value
Pass e.style['shape-outside'] = "ellipse(1px 2px)" should set the property value
Fail e.style['shape-outside'] = "ellipse(20px 40px at center)" should set the property value
Pass e.style['shape-outside'] = "ellipse(20px 40px at center)" should set the property value
Pass e.style['shape-outside'] = "ellipse(closest-side 20%)" should set the property value
Pass e.style['shape-outside'] = "ellipse(farthest-side 20%)" should set the property value
Pass e.style['shape-outside'] = "ellipse(closest-corner 20%)" should set the property value
Pass e.style['shape-outside'] = "ellipse(farthest-corner 20%)" should set the property value
Pass e.style['shape-outside'] = "ellipse(at 10% 20%)" should set the property value
Pass e.style['shape-outside'] = "ellipse(at -10px -20%)" should set the property value
Fail e.style['shape-outside'] = "ellipse(4% 20% at top right)" should set the property value
Pass e.style['shape-outside'] = "ellipse(4% 20% at top right)" should set the property value
Pass e.style['shape-outside'] = "ellipse(calc(100% - 20px) calc(80% - 10px) at calc(100% - 20px) calc(100% / 4))" should set the property value
Fail e.style['shape-outside'] = "ellipse(10px closest-side at top right)" should set the property value
Fail e.style['shape-outside'] = "ellipse(farthest-side 20px at center top)" should set the property value
Fail e.style['shape-outside'] = "ellipse(farthest-side farthest-side at top right)" should set the property value
Pass e.style['shape-outside'] = "ellipse(10px closest-side at top right)" should set the property value
Pass e.style['shape-outside'] = "ellipse(farthest-side 20px at center top)" should set the property value
Pass e.style['shape-outside'] = "ellipse(farthest-side farthest-side at top right)" should set the property value