mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Support top-level tree counting functions
Adds support for `sibling-index()` and `sibling-count()` when parsing
`<number>` and `<integer>`. This is achieved by a new
`TreeCountingFunctionStyleValue` class which is converted within
`absolutized` to `NumberStyleValue` and `IntegerStyleValue` respectively
There are still a few kinks to work out in order to support these
everywhere, namely:
- There are some `StyleValue`s which aren't absolutized (i.e. those
which are stored within another `StyleValue` without an
`absolutize()` method.
- We don't have a way to represent this new `StyleValue` within
`{Number,Integer}OrCalculated`. This would be fixed if we were to
instead just use the `StyleValue` classes until style computation at
which time they would be absolutized into their respective
primitives (double, i64, etc) bypassing the need for *OrCalculated
entirely.
This commit is contained in:
committed by
Tim Ledbetter
parent
9cd23e3ae5
commit
831e471444
Notes:
github-actions[bot]
2025-10-20 15:13:44 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/831e4714449 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6426 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -2,8 +2,7 @@ Harness status: OK
|
||||
|
||||
Found 22 tests
|
||||
|
||||
21 Pass
|
||||
1 Fail
|
||||
22 Pass
|
||||
Pass e.style['transition-timing-function'] = "linear" should set the property value
|
||||
Pass e.style['transition-timing-function'] = "linear(0 0%, 0.5 50%, 1 100%)" should set the property value
|
||||
Pass e.style['transition-timing-function'] = "linear(0 0%, 10 10%, 10 50%, 25.4 75%, 100 100%)" should set the property value
|
||||
@@ -24,5 +23,5 @@ Pass e.style['transition-timing-function'] = "steps(2, jump-start)" should set t
|
||||
Pass e.style['transition-timing-function'] = "steps(2, jump-end)" should set the property value
|
||||
Pass e.style['transition-timing-function'] = "steps(2, jump-both)" should set the property value
|
||||
Pass e.style['transition-timing-function'] = "steps(2, jump-none)" should set the property value
|
||||
Fail e.style['transition-timing-function'] = "steps(sibling-index(), jump-none)" should set the property value
|
||||
Pass e.style['transition-timing-function'] = "steps(sibling-index(), jump-none)" should set the property value
|
||||
Pass e.style['transition-timing-function'] = "linear, ease, linear" should set the property value
|
||||
Reference in New Issue
Block a user