-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MQ5] Ensure that media “scripting: initial-only” never matches
https://bugs.webkit.org/show_bug.cgi?id=260432 Reviewed by Tim Nguyen. w3c/csswg-drafts#8621 * LayoutTests/fast/css/media-query-scripting-initial-only-expected.html: Added. * LayoutTests/fast/css/media-query-scripting-initial-only.html: Added. * Source/WebCore/css/query/MediaQueryFeatures.cpp: (WebCore::MQ::Features::scripting): Canonical link: https://commits.webkit.org/267198@main
- Loading branch information
1 parent
508ac94
commit 706e894
Showing
3 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
LayoutTests/fast/css/media-query-scripting-initial-only-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!DOCTYPE html> | ||
<html style="color: green;"><p>This text should be green when printing.</p></html> |
18 changes: 18 additions & 0 deletions
18
LayoutTests/fast/css/media-query-scripting-initial-only.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<style> | ||
:root { | ||
color: green; | ||
} | ||
@media (scripting: initial-only) { | ||
:root { | ||
color: red; | ||
} | ||
} | ||
</style> | ||
<p>This text should be green when printing.</p> | ||
<script> | ||
if (window.internals) | ||
internals.settings.setMediaTypeOverride("print"); | ||
</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters