Title: [276908] trunk
Revision
276908
Author
[email protected]
Date
2021-05-03 10:36:01 -0700 (Mon, 03 May 2021)

Log Message

Remove "no-preference" value for prefers-color-scheme media query
https://bugs.webkit.org/show_bug.cgi?id=212952

Patch by Tim Nguyen <[email protected]> on 2021-05-03
Reviewed by Antti Koivisto.

WPT parsing tests still fail due to: https://bugs.webkit.org/show_bug.cgi?id=225282
Updated evaluation tests to use `not (prefers-color-scheme)` instead.

Source/WebCore:

* css/MediaQueryEvaluator.cpp:
(WebCore::prefersColorSchemeEvaluate):

LayoutTests:

* css-dark-mode/older-systems/prefers-color-scheme.html:
* css-dark-mode/prefers-color-scheme.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (276907 => 276908)


--- trunk/LayoutTests/ChangeLog	2021-05-03 17:28:41 UTC (rev 276907)
+++ trunk/LayoutTests/ChangeLog	2021-05-03 17:36:01 UTC (rev 276908)
@@ -1,3 +1,16 @@
+2021-05-03  Tim Nguyen  <[email protected]>
+
+        Remove "no-preference" value for prefers-color-scheme media query
+        https://bugs.webkit.org/show_bug.cgi?id=212952
+
+        Reviewed by Antti Koivisto.
+
+        WPT parsing tests still fail due to: https://bugs.webkit.org/show_bug.cgi?id=225282
+        Updated evaluation tests to use `not (prefers-color-scheme)` instead.
+
+        * css-dark-mode/older-systems/prefers-color-scheme.html:
+        * css-dark-mode/prefers-color-scheme.html:
+
 2021-05-03  Kyle Piddington  <[email protected]>
 
         [Metal ANGLE]: Fix conversions tests and remove failing test expectations

Modified: trunk/LayoutTests/css-dark-mode/older-systems/prefers-color-scheme.html (276907 => 276908)


--- trunk/LayoutTests/css-dark-mode/older-systems/prefers-color-scheme.html	2021-05-03 17:28:41 UTC (rev 276907)
+++ trunk/LayoutTests/css-dark-mode/older-systems/prefers-color-scheme.html	2021-05-03 17:36:01 UTC (rev 276908)
@@ -22,7 +22,7 @@
     }
 }
 
-@media (prefers-color-scheme: no-preference) {
+@media not (prefers-color-scheme) {
     /* This is valid, but should not apply for us since there is no option for no user preference. */
     #test1 {
         background-color: cyan;

Modified: trunk/LayoutTests/css-dark-mode/prefers-color-scheme.html (276907 => 276908)


--- trunk/LayoutTests/css-dark-mode/prefers-color-scheme.html	2021-05-03 17:28:41 UTC (rev 276907)
+++ trunk/LayoutTests/css-dark-mode/prefers-color-scheme.html	2021-05-03 17:36:01 UTC (rev 276908)
@@ -21,7 +21,7 @@
     }
 }
 
-@media (prefers-color-scheme: no-preference) {
+@media not (prefers-color-scheme) {
     /* This is valid, but should not apply for us since there is no option for no user preference. */
     #test1 {
         background-color: cyan;

Modified: trunk/Source/WebCore/ChangeLog (276907 => 276908)


--- trunk/Source/WebCore/ChangeLog	2021-05-03 17:28:41 UTC (rev 276907)
+++ trunk/Source/WebCore/ChangeLog	2021-05-03 17:36:01 UTC (rev 276908)
@@ -1,3 +1,16 @@
+2021-05-03  Tim Nguyen  <[email protected]>
+
+        Remove "no-preference" value for prefers-color-scheme media query
+        https://bugs.webkit.org/show_bug.cgi?id=212952
+
+        Reviewed by Antti Koivisto.
+
+        WPT parsing tests still fail due to: https://bugs.webkit.org/show_bug.cgi?id=225282
+        Updated evaluation tests to use `not (prefers-color-scheme)` instead.
+
+        * css/MediaQueryEvaluator.cpp:
+        (WebCore::prefersColorSchemeEvaluate):
+
 2021-05-03  Antti Koivisto  <[email protected]>
 
         Move Style::ScopeOrdinal to a header of its own

Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.cpp (276907 => 276908)


--- trunk/Source/WebCore/css/MediaQueryEvaluator.cpp	2021-05-03 17:28:41 UTC (rev 276907)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.cpp	2021-05-03 17:36:01 UTC (rev 276908)
@@ -807,8 +807,6 @@
     bool useDarkAppearance = frame.page()->useDarkAppearance();
 
     switch (keyword) {
-    case CSSValueNoPreference:
-        return false;
     case CSSValueDark:
         return useDarkAppearance;
     case CSSValueLight:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to