WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
212952
Remove "no-preference" value for prefers-color-scheme media query
https://bugs.webkit.org/show_bug.cgi?id=212952
Summary
Remove "no-preference" value for prefers-color-scheme media query
Simon Fraser (smfr)
Reported
2020-06-08 20:47:27 PDT
See
https://github.com/w3c/csswg-drafts/issues/3857#issuecomment-634779976
and
https://groups.google.com/a/chromium.org/d/msg/blink-dev/3RhZFvZE1LM/t7BpLBWkAwAJ
Attachments
Patch
(3.54 KB, patch)
2021-05-02 10:21 PDT
,
Tim Nguyen (:ntim)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Tim Nguyen (:ntim)
Comment 1
2021-05-02 10:21:04 PDT
Created
attachment 427530
[details]
Patch
Antti Koivisto
Comment 2
2021-05-02 23:45:12 PDT
Comment on
attachment 427530
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=427530&action=review
> Source/WebCore/css/MediaQueryEvaluator.cpp:-811 > switch (keyword) { > - case CSSValueNoPreference: > - return false;
The default for this switch is false so this doesn't seem to change anything at all.
Antti Koivisto
Comment 3
2021-05-03 00:21:43 PDT
Comment on
attachment 427530
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=427530&action=review
> LayoutTests/css-dark-mode/older-systems/prefers-color-scheme.html:25 > -@media (prefers-color-scheme: no-preference) { > +@media not (prefers-color-scheme) {
We may need to keep supporting 'no-preference' value even when parsing is fixed.
Antti Koivisto
Comment 4
2021-05-03 00:34:44 PDT
Comment on
attachment 427530
[details]
Patch I don't know if it is ok to remove 'no-preference' support but if it is, it can be done after the parsing fix. It should also be done properly by removing all the code, not by stealth test changes.
Tim Nguyen (:ntim)
Comment 5
2021-05-03 01:15:12 PDT
Comment on
attachment 427530
[details]
Patch Regarding tests: the test already tests for `foo` which is the invalid keyword case (like `no-preference`). WPT also has coverage for `no-preference`:
https://wpt.fyi/results/css/mediaqueries/prefers-color-scheme.html?label=master&label=experimental&aligned&q=prefers-color-scheme
Regarding removing all the code: CSSValueNoPreference can't be removed since other MQ use it (prefers-contrast/prefers-reduced-motion).
Antti Koivisto
Comment 6
2021-05-03 09:21:21 PDT
Tim Hatcher says getting rid of this is ok.
EWS
Comment 7
2021-05-03 10:36:09 PDT
Committed
r276908
(
237253@main
): <
https://commits.webkit.org/237253@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 427530
[details]
.
Radar WebKit Bug Importer
Comment 8
2021-05-03 10:37:19 PDT
<
rdar://problem/77461590
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug