LibWeb/CSS: Make media-type more permissive

The current spec defines this simply as `<ident>`, but does apparently
serialize as lowercase.

Because of this change, we no longer need to care about the deprecated
media types, as they all behave the same as unknown ones.

We still keep an enum around for KnownMediaType, to avoid repeated
string comparisons when evaluating it.

Gets us 2 WPT passes.
This commit is contained in:
Sam Atkins 2025-05-19 15:37:56 +01:00
parent bb035fbfe0
commit 38aca62ef5
Notes: github-actions[bot] 2025-05-23 09:19:52 +00:00
4 changed files with 52 additions and 89 deletions

View file

@ -2,8 +2,7 @@ Harness status: OK
Found 34 tests
32 Pass
2 Fail
34 Pass
Pass Test parsing '' with matchMedia
Pass Test parsing ' ' with matchMedia
Pass Test parsing 'all' with matchMedia
@ -19,12 +18,12 @@ Pass Test parsing ' ( color ' with matchMedia
Pass Test parsing 'color)' with matchMedia
Pass Test parsing ' color)' with matchMedia
Pass Test parsing ' color ), ( color' with matchMedia
Fail Test parsing ' foo ' with matchMedia
Pass Test parsing ' foo ' with matchMedia
Pass Test parsing ',' with matchMedia
Pass Test parsing ' , ' with matchMedia
Pass Test parsing ',,' with matchMedia
Pass Test parsing ' , , ' with matchMedia
Fail Test parsing ' foo,' with matchMedia
Pass Test parsing ' foo,' with matchMedia
Pass Test parsing '(min-resolution: 1x)' with matchMedia
Pass Test parsing '(min-resolution: calc(1x))' with matchMedia
Pass Test parsing '(resolution: 2x)' with matchMedia