mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
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.
13 lines
No EOL
687 B
Text
13 lines
No EOL
687 B
Text
Harness status: OK
|
|
|
|
Found 8 tests
|
|
|
|
8 Pass
|
|
Pass e.style['font-variation-settings'] = "\"wght\" sign(1em - 1px)" should set the property value
|
|
Pass e.style['font-variation-settings'] = "\"wght\" sibling-index()" should set the property value
|
|
Pass e.style['font-variation-settings'] = "\"wght\" calc(10)" should set the property value
|
|
Pass e.style['font-variation-settings'] = "\"wght\" sign(2px)" should set the property value
|
|
Pass Property font-variation-settings value '"wght" sign(1em - 1px)'
|
|
Pass Property font-variation-settings value '"wght" sibling-index()'
|
|
Pass Property font-variation-settings value '"wght" calc(10)'
|
|
Pass Property font-variation-settings value '"wght" sign(2px)' |