mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
CSS Values 5 now defines a `<boolean-expr[]>` type that is used in place of the bespoke grammar that previously existed for `@media` and `@supports` queries. This commit implements some BooleanExpression types to represent the nodes in a `<boolean-expr[]>`, and reimplements `@media` and `@supports` queries using this. The one part of this implementation I'm not convinced on is that the `evaluate()` methods take a `HTML::Window*`. This is a compromise because `@media` requires a Window, and `@supports` does not require anything at all. As more users of `<boolean-expr[]>` get implemented in the future, it will become clear if this is sufficient, or if we need to do something smarter. As a bonus, this actually improves our serialization of media queries!
17 lines
445 B
Plaintext
17 lines
445 B
Plaintext
Harness status: OK
|
|
|
|
Found 12 tests
|
|
|
|
12 Pass
|
|
Pass empty media query list
|
|
Pass type - no features
|
|
Pass type - no features - negation
|
|
Pass type - no features - character case normalization
|
|
Pass type - omission of all
|
|
Pass type - inclusion of negated all
|
|
Pass features - character case normalization
|
|
Pass features - preservation of overspecified features
|
|
Pass features - no lexicographical sorting
|
|
Pass media query list
|
|
Pass one rule
|
|
Pass many rules |