mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 15:32:22 +00:00
LibWeb: Implement serialization of lch-like color values
This commit is contained in:
parent
5074d90888
commit
e860dd4f65
Notes:
github-actions[bot]
2025-04-20 16:45:02 +00:00
Author: https://github.com/tcl3
Commit: e860dd4f65
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4403
Reviewed-by: https://github.com/shannonbooth
4 changed files with 131 additions and 89 deletions
|
@ -2,8 +2,7 @@ Harness status: OK
|
|||
|
||||
Found 150 tests
|
||||
|
||||
70 Pass
|
||||
80 Fail
|
||||
150 Pass
|
||||
Pass e.style['color'] = "lab(0 0 0)" should set the property value
|
||||
Pass e.style['color'] = "lab(0 0 0 / 1)" should set the property value
|
||||
Pass e.style['color'] = "lab(0 0 0 / 0.5)" should set the property value
|
||||
|
@ -70,87 +69,87 @@ Pass e.style['color'] = "oklab(0.5 calc(infinity) 0)" should set the property va
|
|||
Pass e.style['color'] = "oklab(0.5 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "oklab(calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "oklab(calc(0 / 0) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "lch(0 0 0deg)" should set the property value
|
||||
Fail e.style['color'] = "lch(0 0 0deg / 1)" should set the property value
|
||||
Fail e.style['color'] = "lch(0 0 0deg / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "lch(100 230 0deg / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "lch(20 50 20deg/0.5)" should set the property value
|
||||
Fail e.style['color'] = "lch(20 50 20deg/50%)" should set the property value
|
||||
Fail e.style['color'] = "lch(10 20 20deg / -10%)" should set the property value
|
||||
Fail e.style['color'] = "lch(10 20 20deg / 110%)" should set the property value
|
||||
Fail e.style['color'] = "lch(10 20 1.28rad)" should set the property value
|
||||
Fail e.style['color'] = "lch(10 20 380deg)" should set the property value
|
||||
Fail e.style['color'] = "lch(10 20 -340deg)" should set the property value
|
||||
Fail e.style['color'] = "lch(10 20 740deg)" should set the property value
|
||||
Fail e.style['color'] = "lch(10 20 -700deg)" should set the property value
|
||||
Fail e.style['color'] = "lch(-40 0 0)" should set the property value
|
||||
Fail e.style['color'] = "lch(20 -20 0)" should set the property value
|
||||
Fail e.style['color'] = "lch(0 0 0 / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "lch(10 20 20 / 110%)" should set the property value
|
||||
Fail e.style['color'] = "lch(10 20 -700)" should set the property value
|
||||
Fail e.style['color'] = "lch(50% 50% 20)" should set the property value
|
||||
Fail e.style['color'] = "lch(0.5 -20% -20)" should set the property value
|
||||
Fail e.style['color'] = "lch(calc(50 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))" should set the property value
|
||||
Fail e.style['color'] = "lch(calc(-50 * 3) calc(0.5 + 1) calc(-20deg * 2) / calc(-0.5 * 2))" should set the property value
|
||||
Fail e.style['color'] = "lch(calc(50%) 50% 0.5)" should set the property value
|
||||
Fail e.style['color'] = "lch(200 calc(50%) 0.5)" should set the property value
|
||||
Fail e.style['color'] = "lch(-200 calc(50%) 0.5)" should set the property value
|
||||
Fail e.style['color'] = "lch(calc(50%) -100 0.5)" should set the property value
|
||||
Fail e.style['color'] = "lch(none 20 calc(0.5))" should set the property value
|
||||
Fail e.style['color'] = "lch(none none none / none)" should set the property value
|
||||
Fail e.style['color'] = "lch(none none none)" should set the property value
|
||||
Fail e.style['color'] = "lch(20 none none / none)" should set the property value
|
||||
Fail e.style['color'] = "lch(none none none / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "lch(0 0 0 / none)" should set the property value
|
||||
Fail e.style['color'] = "lch(calc(infinity) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "lch(50 calc(infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "lch(50 calc(-infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "lch(calc(NaN) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "lch(calc(0 / 0) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0 0 0deg)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0 0 0deg / 1)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0 0 0deg / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "oklch(1 2.3 0deg / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.2 0.5 20deg/0.5)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.2 0.5 20deg/50%)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.1 0.2 20deg / -10%)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.1 0.2 20deg / 110%)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.1 0.2 1.28rad)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.1 0.2 380deg)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.1 0.2 -340deg)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.1 0.2 740deg)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.1 0.2 -700deg)" should set the property value
|
||||
Fail e.style['color'] = "oklch(-4 0 0)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.2 -0.2 0)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0 0 0 / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.1 0.2 20 / 110%)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.1 0.2 -700)" should set the property value
|
||||
Fail e.style['color'] = "oklch(50% 50% 20)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.5 -20% -20)" should set the property value
|
||||
Fail e.style['color'] = "oklch(calc(0.5 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))" should set the property value
|
||||
Fail e.style['color'] = "oklch(calc(-0.5 * 3) calc(0.5 + 1) calc(-20deg * 2) / calc(-0.5 * 2))" should set the property value
|
||||
Fail e.style['color'] = "oklch(calc(50%) 50% 0.5)" should set the property value
|
||||
Fail e.style['color'] = "oklch(200 calc(50%) 0.5)" should set the property value
|
||||
Fail e.style['color'] = "oklch(-200 calc(50%) 0.5)" should set the property value
|
||||
Fail e.style['color'] = "oklch(calc(50%) -100 0.5)" should set the property value
|
||||
Fail e.style['color'] = "oklch(none 0.2 calc(0.5))" should set the property value
|
||||
Fail e.style['color'] = "oklch(none none none / none)" should set the property value
|
||||
Fail e.style['color'] = "oklch(none none none)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.2 none none / none)" should set the property value
|
||||
Fail e.style['color'] = "oklch(none none none / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0 0 0 / none)" should set the property value
|
||||
Fail e.style['color'] = "lch(20% 80% 10/0.5)" should set the property value
|
||||
Fail e.style['color'] = "oklch(20% 60% 10/0.5)" should set the property value
|
||||
Fail e.style['color'] = "oklch(calc(infinity) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.5 calc(infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.5 calc(-infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "oklch(calc(NaN) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "oklch(calc(0 / 0) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "lch(0 0 0deg)" should set the property value
|
||||
Pass e.style['color'] = "lch(0 0 0deg / 1)" should set the property value
|
||||
Pass e.style['color'] = "lch(0 0 0deg / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "lch(100 230 0deg / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "lch(20 50 20deg/0.5)" should set the property value
|
||||
Pass e.style['color'] = "lch(20 50 20deg/50%)" should set the property value
|
||||
Pass e.style['color'] = "lch(10 20 20deg / -10%)" should set the property value
|
||||
Pass e.style['color'] = "lch(10 20 20deg / 110%)" should set the property value
|
||||
Pass e.style['color'] = "lch(10 20 1.28rad)" should set the property value
|
||||
Pass e.style['color'] = "lch(10 20 380deg)" should set the property value
|
||||
Pass e.style['color'] = "lch(10 20 -340deg)" should set the property value
|
||||
Pass e.style['color'] = "lch(10 20 740deg)" should set the property value
|
||||
Pass e.style['color'] = "lch(10 20 -700deg)" should set the property value
|
||||
Pass e.style['color'] = "lch(-40 0 0)" should set the property value
|
||||
Pass e.style['color'] = "lch(20 -20 0)" should set the property value
|
||||
Pass e.style['color'] = "lch(0 0 0 / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "lch(10 20 20 / 110%)" should set the property value
|
||||
Pass e.style['color'] = "lch(10 20 -700)" should set the property value
|
||||
Pass e.style['color'] = "lch(50% 50% 20)" should set the property value
|
||||
Pass e.style['color'] = "lch(0.5 -20% -20)" should set the property value
|
||||
Pass e.style['color'] = "lch(calc(50 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))" should set the property value
|
||||
Pass e.style['color'] = "lch(calc(-50 * 3) calc(0.5 + 1) calc(-20deg * 2) / calc(-0.5 * 2))" should set the property value
|
||||
Pass e.style['color'] = "lch(calc(50%) 50% 0.5)" should set the property value
|
||||
Pass e.style['color'] = "lch(200 calc(50%) 0.5)" should set the property value
|
||||
Pass e.style['color'] = "lch(-200 calc(50%) 0.5)" should set the property value
|
||||
Pass e.style['color'] = "lch(calc(50%) -100 0.5)" should set the property value
|
||||
Pass e.style['color'] = "lch(none 20 calc(0.5))" should set the property value
|
||||
Pass e.style['color'] = "lch(none none none / none)" should set the property value
|
||||
Pass e.style['color'] = "lch(none none none)" should set the property value
|
||||
Pass e.style['color'] = "lch(20 none none / none)" should set the property value
|
||||
Pass e.style['color'] = "lch(none none none / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "lch(0 0 0 / none)" should set the property value
|
||||
Pass e.style['color'] = "lch(calc(infinity) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "lch(50 calc(infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "lch(50 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "lch(calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "lch(calc(0 / 0) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0 0 0deg)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0 0 0deg / 1)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0 0 0deg / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "oklch(1 2.3 0deg / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.2 0.5 20deg/0.5)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.2 0.5 20deg/50%)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.1 0.2 20deg / -10%)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.1 0.2 20deg / 110%)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.1 0.2 1.28rad)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.1 0.2 380deg)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.1 0.2 -340deg)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.1 0.2 740deg)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.1 0.2 -700deg)" should set the property value
|
||||
Pass e.style['color'] = "oklch(-4 0 0)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.2 -0.2 0)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0 0 0 / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.1 0.2 20 / 110%)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.1 0.2 -700)" should set the property value
|
||||
Pass e.style['color'] = "oklch(50% 50% 20)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.5 -20% -20)" should set the property value
|
||||
Pass e.style['color'] = "oklch(calc(0.5 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))" should set the property value
|
||||
Pass e.style['color'] = "oklch(calc(-0.5 * 3) calc(0.5 + 1) calc(-20deg * 2) / calc(-0.5 * 2))" should set the property value
|
||||
Pass e.style['color'] = "oklch(calc(50%) 50% 0.5)" should set the property value
|
||||
Pass e.style['color'] = "oklch(200 calc(50%) 0.5)" should set the property value
|
||||
Pass e.style['color'] = "oklch(-200 calc(50%) 0.5)" should set the property value
|
||||
Pass e.style['color'] = "oklch(calc(50%) -100 0.5)" should set the property value
|
||||
Pass e.style['color'] = "oklch(none 0.2 calc(0.5))" should set the property value
|
||||
Pass e.style['color'] = "oklch(none none none / none)" should set the property value
|
||||
Pass e.style['color'] = "oklch(none none none)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.2 none none / none)" should set the property value
|
||||
Pass e.style['color'] = "oklch(none none none / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0 0 0 / none)" should set the property value
|
||||
Pass e.style['color'] = "lch(20% 80% 10/0.5)" should set the property value
|
||||
Pass e.style['color'] = "oklch(20% 60% 10/0.5)" should set the property value
|
||||
Pass e.style['color'] = "oklch(calc(infinity) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.5 calc(infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.5 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "oklch(calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "oklch(calc(0 / 0) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "lab(calc(50 + (sign(1em - 10px) * 10)) 30 50 / 50%)" should set the property value
|
||||
Pass e.style['color'] = "oklab(calc(0.5 + (sign(1em - 10px) * 0.1)) 0.3 0.5 / 50%)" should set the property value
|
||||
Pass e.style['color'] = "lab(60 30 50 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
Pass e.style['color'] = "oklab(0.6 0.3 0.5 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
Fail e.style['color'] = "lch(calc(50 + (sign(1em - 10px) * 10)) 30 50deg / 50%)" should set the property value
|
||||
Fail e.style['color'] = "oklch(calc(0.5 + (sign(1em - 10px) * 0.1)) 0.3 50deg / 50%)" should set the property value
|
||||
Fail e.style['color'] = "lch(60 30 50deg / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
Fail e.style['color'] = "oklch(0.6 0.3 50deg / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
Pass e.style['color'] = "lch(calc(50 + (sign(1em - 10px) * 10)) 30 50deg / 50%)" should set the property value
|
||||
Pass e.style['color'] = "oklch(calc(0.5 + (sign(1em - 10px) * 0.1)) 0.3 50deg / 50%)" should set the property value
|
||||
Pass e.style['color'] = "lch(60 30 50deg / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
Pass e.style['color'] = "oklch(0.6 0.3 50deg / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
Loading…
Add table
Add a link
Reference in a new issue