mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 21:12:08 +02:00
LibWeb: Produce computed values for custom properties
Custom properties are required to produce a computed value just like regular properties. The computed value is defined in the spec as "specified value with variables substituted, or the guaranteed-invalid value", though in reality all arbitrary substitution functions should be substituted, not just `var()`. To support this, we parse the CSS-wide keywords normally in custom properties, instead of ignoring them. We don't yet handle all of them properly, and because that will require us to cascade them like regular properties. This is just enough to prevent regressions when implementing ASFs. Our output in this new test is not quite correct, because of the awkward way we handle whitespace in property values - so it has 3 spaces in the middle instead of 1, until that's fixed. It's possible this computed-value production should go in cascade_custom_properties(), but I had issues with that. Hopefully once we start cascading custom properties properly, it'll be clearer how this should all work.
This commit is contained in:
committed by
Tim Ledbetter
parent
1ff1093a24
commit
26acd897bf
Notes:
github-actions[bot]
2025-07-09 15:45:57 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/26acd897bf9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5226 Reviewed-by: https://github.com/tcl3 ✅
@@ -2,11 +2,11 @@ Harness status: OK
|
||||
|
||||
Found 11 tests
|
||||
|
||||
1 Pass
|
||||
10 Fail
|
||||
Fail Self-cycle
|
||||
Fail Simple a/b cycle
|
||||
Fail Three-var cycle
|
||||
4 Pass
|
||||
7 Fail
|
||||
Pass Self-cycle
|
||||
Pass Simple a/b cycle
|
||||
Pass Three-var cycle
|
||||
Fail Cycle that starts in the middle of a chain
|
||||
Fail Cycle with extra edge
|
||||
Fail Cycle with extra edge (2)
|
||||
|
||||
Reference in New Issue
Block a user