LibWeb/CSS: Make CSSImportRule.media return its own MediaList

...instead of returning the one from its associated style sheet.

This reverts 848a250b29 where I made
`CSSImportRule.media` nullable.

CSSImportRule may not have an associated style sheet, because of not
matching a supports condition, or just failing to load the URL.
Regardless of whether we do or not, the expected (non-spec) behaviour
is that we should return a MediaList always, which matches the media
queries specified on the `@import` rule.
This commit is contained in:
Sam Atkins
2025-12-04 16:48:19 +00:00
parent 5d38a3639f
commit fbcaa8edde
Notes: github-actions[bot] 2025-12-08 13:32:06 +00:00
9 changed files with 48 additions and 46 deletions

View File

@@ -2,15 +2,15 @@ Harness status: OK
Found 11 tests
9 Pass
2 Fail
10 Pass
1 Fail
Pass CSSRule and CSSImportRule types
Pass Type of CSSRule#type and constant values
Pass Existence and writability of CSSRule attributes
Pass Values of CSSRule attributes
Pass Existence and writability of CSSImportRule attributes
Fail Values of CSSImportRule attributes
Fail CSSImportRule : MediaList mediaText attribute should be updated due to [PutForwards]
Pass CSSImportRule : MediaList mediaText attribute should be updated due to [PutForwards]
Pass CSSStyleDeclaration cssText attribute should be updated due to [PutForwards]
Pass StyleSheet : MediaList mediaText attribute should be updated due to [PutForwards]
Pass Existence and writability of CSSImportRule supportsText attribute