RESOLVED FIXED309611
[Site Isolation] @prefers-color-scheme doesn't see color-scheme from parent frames and above
https://bugs.webkit.org/show_bug.cgi?id=309611
Summary [Site Isolation] @prefers-color-scheme doesn't see color-scheme from parent f...
Kiet Ho
Reported 2026-03-10 16:35:12 PDT
Created attachment 478621 [details] Test case 1 See the test case. We have an <iframe> (iframe 1) with color-scheme: dark. The inside document has another <iframe> (iframe 2) without color-scheme. The innermost document has a box which its background-color depends on @prefers-color-scheme. The color-scheme from iframe 1 should propagate through iframe 2 into the innermost document, so prefers-color-scheme should match "dark". But in WebKit, it doesn't match to "dark". On Chrome 147.0.7719.3 (Official Build) dev (arm64) and Firefox 150.0a1 (2026-03-10) (aarch64), the box is dark blue, regardless of environment color scheme. In WebKit, the box is light blue instead.
Attachments
Test case 1 (488 bytes, text/html)
2026-03-10 16:35 PDT, Kiet Ho
no flags
Radar WebKit Bug Importer
Comment 1 2026-03-10 16:35:19 PDT
Kiet Ho
Comment 2 2026-03-10 16:38:16 PDT
To add, this is found when investigating bug 284973.
Kiet Ho
Comment 3 2026-04-14 17:50:12 PDT
Kiet Ho
Comment 4 2026-04-27 13:43:17 PDT
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/59497
EWS
Comment 5 2026-04-28 10:35:23 PDT
Committed 312212@main (9e45d72ed9ea): <https://commits.webkit.org/312212@main> Reviewed commits have been landed. Closing PR #62786 and removing active labels.
Kiet Ho
Comment 6 2026-05-04 13:31:24 PDT
*** Bug 311812 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.