mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
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:
Notes:
github-actions[bot]
2025-12-08 13:32:06 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/fbcaa8eddef Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7021
@@ -2,17 +2,17 @@ Harness status: OK
|
||||
|
||||
Found 13 tests
|
||||
|
||||
13 Fail
|
||||
Fail @import url("nonexist.css") layer; should be a valid layered import rule
|
||||
Fail @import url("nonexist.css") layer(A); should be a valid layered import rule
|
||||
Fail @import url("nonexist.css") layer(A.B); should be a valid layered import rule
|
||||
Fail @import url(nonexist.css) layer; should be a valid layered import rule
|
||||
Fail @import url(nonexist.css) layer(A); should be a valid layered import rule
|
||||
Fail @import url(nonexist.css) layer(A.B); should be a valid layered import rule
|
||||
Fail @import "nonexist.css" layer; should be a valid layered import rule
|
||||
Fail @import "nonexist.css" layer(A); should be a valid layered import rule
|
||||
Fail @import "nonexist.css" layer(A.B); should be a valid layered import rule
|
||||
Fail @import url("nonexist.css") layer(); should still be a valid import rule with an invalid layer declaration
|
||||
Fail @import url("nonexist.css") layer(A B); should still be a valid import rule with an invalid layer declaration
|
||||
Fail @import url("nonexist.css") layer(A . B); should still be a valid import rule with an invalid layer declaration
|
||||
Fail @import url("nonexist.css") layer(A, B, C); should still be a valid import rule with an invalid layer declaration
|
||||
13 Pass
|
||||
Pass @import url("nonexist.css") layer; should be a valid layered import rule
|
||||
Pass @import url("nonexist.css") layer(A); should be a valid layered import rule
|
||||
Pass @import url("nonexist.css") layer(A.B); should be a valid layered import rule
|
||||
Pass @import url(nonexist.css) layer; should be a valid layered import rule
|
||||
Pass @import url(nonexist.css) layer(A); should be a valid layered import rule
|
||||
Pass @import url(nonexist.css) layer(A.B); should be a valid layered import rule
|
||||
Pass @import "nonexist.css" layer; should be a valid layered import rule
|
||||
Pass @import "nonexist.css" layer(A); should be a valid layered import rule
|
||||
Pass @import "nonexist.css" layer(A.B); should be a valid layered import rule
|
||||
Pass @import url("nonexist.css") layer(); should still be a valid import rule with an invalid layer declaration
|
||||
Pass @import url("nonexist.css") layer(A B); should still be a valid import rule with an invalid layer declaration
|
||||
Pass @import url("nonexist.css") layer(A . B); should still be a valid import rule with an invalid layer declaration
|
||||
Pass @import url("nonexist.css") layer(A, B, C); should still be a valid import rule with an invalid layer declaration
|
||||
Reference in New Issue
Block a user