Add support for prefers-color-scheme media query
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2018 23:43:02 +0000 (23:43 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2018 23:43:02 +0000 (23:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190499
rdar://problem/45212025

Reviewed by Dean Jackson.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.

Source/WebCore:

Test: css-dark-mode/prefers-color-scheme.html

* Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
* css/CSSValueKeywords.in: Added light and dark.
* css/MediaFeatureNames.h: Added prefers-color-scheme.
* css/MediaQueryEvaluator.cpp:
(WebCore::prefersColorSchemeEvaluate): Added.
* css/MediaQueryExpression.cpp:
(WebCore::featureWithValidIdent): Added prefers-color-scheme.
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setDarkModeCSSEnabled): Added.
(WebCore::RuntimeEnabledFeatures::darkModeCSSEnabled const): Added.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::resetToConsistentState): Reset setUseDarkAppearance.
(WebCore::InternalSettings::setUseDarkAppearance): Added.
* testing/InternalSettings.h: Added setUseDarkAppearance.
* testing/InternalSettings.idl: Ditto.

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.

Source/WebKit:

* Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
* Shared/WebPreferences.yaml: Added DarkModeCSSEnabled as experimental.

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.

Source/WTF:

* wtf/FeatureDefines.h: Added ENABLE_DARK_MODE_CSS.

Tools:

* Scripts/webkitperl/FeatureList.pm: Added ENABLE_DARK_MODE_CSS as dark-mode-css.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.

LayoutTests:

* css-dark-mode/prefers-color-scheme-expected.txt: Added.
* css-dark-mode/prefers-color-scheme.html: Added.
* platform/gtk/TestExpectations: Skip css-dark-mode.
* platform/ios/TestExpectations: Skip css-dark-mode.
* platform/mac-wk1/TestExpectations: Skip css-dark-mode.
* platform/win/TestExpectations: Skip css-dark-mode.
* platform/wincairo/TestExpectations: Skip css-dark-mode.
* platform/wpe/TestExpectations: Skip css-dark-mode.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237156 268f45cc-cd09-0410-ab3c-d52691b4dbfc

37 files changed:
LayoutTests/ChangeLog
LayoutTests/css-dark-mode/prefers-color-scheme-expected.txt [new file with mode: 0644]
LayoutTests/css-dark-mode/prefers-color-scheme.html [new file with mode: 0644]
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/mac-highsierra/css-dark-mode/prefers-color-scheme-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-sierra/css-dark-mode/prefers-color-scheme-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/wincairo/TestExpectations
LayoutTests/platform/wpe/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WTF/ChangeLog
Source/WTF/wtf/FeatureDefines.h
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/MediaFeatureNames.h
Source/WebCore/css/MediaQueryEvaluator.cpp
Source/WebCore/css/MediaQueryExpression.cpp
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebKit/ChangeLog
Source/WebKit/Configurations/FeatureDefines.xcconfig
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig
Source/cmake/tools/vsprops/FeatureDefines.props
Source/cmake/tools/vsprops/FeatureDefinesCairo.props
Tools/ChangeLog
Tools/Scripts/webkitperl/FeatureList.pm
Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig

index 73b288f..0287b53 100644 (file)
@@ -1,3 +1,20 @@
+2018-10-15  Timothy Hatcher  <timothy@apple.com>
+
+        Add support for prefers-color-scheme media query
+        https://bugs.webkit.org/show_bug.cgi?id=190499
+        rdar://problem/45212025
+
+        Reviewed by Dean Jackson.
+
+        * css-dark-mode/prefers-color-scheme-expected.txt: Added.
+        * css-dark-mode/prefers-color-scheme.html: Added.
+        * platform/gtk/TestExpectations: Skip css-dark-mode.
+        * platform/ios/TestExpectations: Skip css-dark-mode.
+        * platform/mac-wk1/TestExpectations: Skip css-dark-mode.
+        * platform/win/TestExpectations: Skip css-dark-mode.
+        * platform/wincairo/TestExpectations: Skip css-dark-mode.
+        * platform/wpe/TestExpectations: Skip css-dark-mode.
+
 2018-10-15  Matt Baker  <mattbaker@apple.com>
 
         Web Inspector: Cleanup Table test utilities
diff --git a/LayoutTests/css-dark-mode/prefers-color-scheme-expected.txt b/LayoutTests/css-dark-mode/prefers-color-scheme-expected.txt
new file mode 100644 (file)
index 0000000..75c2174
--- /dev/null
@@ -0,0 +1,5 @@
+
+PASS Element colors are correct in light color scheme 
+PASS Dark color scheme enabled 
+PASS Element colors are correct in dark color scheme 
+
diff --git a/LayoutTests/css-dark-mode/prefers-color-scheme.html b/LayoutTests/css-dark-mode/prefers-color-scheme.html
new file mode 100644 (file)
index 0000000..542cf5e
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+
+<!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
+
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<style>
+#test1 {
+    background-color: red;
+    color: text;
+}
+
+@media (prefers-color-scheme: light) {
+    #test1 {
+        background-color: lime;
+    }
+}
+
+@media (prefers-color-scheme: dark) {
+    #test1 {
+        background-color: blue;
+    }
+}
+
+@media (prefers-color-scheme: foo) {
+    /* This is invalid and should not apply. */
+    #test1 {
+        background-color: yellow;
+    }
+}
+
+@media (prefers-color-scheme) {
+    /* This is invalid and should not apply. */
+    #test1 {
+        background-color: orange;
+    }
+}
+</style>
+
+<div id="test1"></div>
+
+<script>
+function test_prop(id, prop, expected) {
+    assert_equals(window.getComputedStyle(document.getElementById(id)).getPropertyValue(prop).trim(), expected);
+}
+
+test(function() {
+    // Styled background-color in media query should be lime green.
+    test_prop("test1", "background-color", "rgb(0, 255, 0)");
+
+    // The semantic text color should be black.
+    test_prop("test1", "color", "rgb(0, 0, 0)");
+}, "Element colors are correct in light color scheme");
+
+test(function() {
+    if (window.internals)
+        internals.settings.setUseDarkAppearance(true);
+}, "Dark color scheme enabled");
+
+test(function() {
+    // Styled background-color in media query should be blue.
+    test_prop("test1", "background-color", "rgb(0, 0, 255)");
+
+    // The semantic text color should be black, and not change.
+    test_prop("test1", "color", "rgb(0, 0, 0)");
+}, "Element colors are correct in dark color scheme");
+</script>
index ecced70..ffb5b13 100644 (file)
@@ -765,6 +765,9 @@ Bug(GTK) plugins/quicktime-plugin-replacement.html [ Skip ]
 # ENABLE(CSS_SCROLL_SNAP) is disabled.
 css3/scroll-snap [ Skip ]
 
+# ENABLE(DARK_MODE_CSS) is disabled.
+css-dark-mode [ Skip ]
+
 # ENABLE(WEBVTT_REGIONS) is disabled
 webkit.org/b/109570 media/track/regions-webvtt [ Skip ]
 webkit.org/b/109570 media/track/w3c [ Skip ]
index eecf511..1163a78 100644 (file)
@@ -1117,6 +1117,9 @@ fast/viewport/ios/viewport-fit-cover.html [ Pass ]
 fast/viewport/ios/viewport-fit-auto.html [ Pass ]
 fast/css/variables/env/ios [ Pass ]
 
+# Dark mode not supported on iOS
+css-dark-mode [ Skip ]
+
 ###
 # Known failures
 ##
@@ -3205,4 +3208,4 @@ quicklook/pages.html [ ImageOnlyFailure ]
 compositing/contents-scale/non-decomposable-matrix.html [ ImageOnlyFailure ]
 
 # <rdar://problem/41546970> REGRESSION: LayoutTest media/media-fullscreen-loop-inline.html is a flaky timeout
-media/media-fullscreen-loop-inline.html [ Pass Timeout ]
\ No newline at end of file
+media/media-fullscreen-loop-inline.html [ Pass Timeout ]
diff --git a/LayoutTests/platform/mac-highsierra/css-dark-mode/prefers-color-scheme-expected.txt b/LayoutTests/platform/mac-highsierra/css-dark-mode/prefers-color-scheme-expected.txt
new file mode 100644 (file)
index 0000000..6f4c8f1
--- /dev/null
@@ -0,0 +1,5 @@
+
+FAIL Element colors are correct in light color scheme assert_equals: expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"
+PASS Dark color scheme enabled 
+FAIL Element colors are correct in dark color scheme assert_equals: expected "rgb(0, 0, 255)" but got "rgb(255, 0, 0)"
+
diff --git a/LayoutTests/platform/mac-sierra/css-dark-mode/prefers-color-scheme-expected.txt b/LayoutTests/platform/mac-sierra/css-dark-mode/prefers-color-scheme-expected.txt
new file mode 100644 (file)
index 0000000..6f4c8f1
--- /dev/null
@@ -0,0 +1,5 @@
+
+FAIL Element colors are correct in light color scheme assert_equals: expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"
+PASS Dark color scheme enabled 
+FAIL Element colors are correct in dark color scheme assert_equals: expected "rgb(0, 0, 255)" but got "rgb(255, 0, 0)"
+
index 6c4bdfb..8579c68 100644 (file)
@@ -631,6 +631,7 @@ webkit.org/b/188070 imported/w3c/web-platform-tests/streams/piping/error-propaga
 # Not supported on WK1
 imported/w3c/web-platform-tests/css/css-properties-values-api/ [ Skip ]
 css-custom-properties-api [ Skip ]
+css-dark-mode [ Skip ]
 
 webkit.org/b/189908 imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.html [ Failure ]
 
index f76c7bd..1504409 100644 (file)
@@ -149,6 +149,9 @@ svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard.html [ Skip ]
 svg/custom/svg-allowed-in-dashboard-object.html [ Skip ]
 mathml/mathml-in-dashboard.html [ Skip ]
 
+# Dark mode not supported on Windows
+css-dark-mode [ Skip ]
+
 # TODO Accelerated overflow scrolling (ENABLE_ACCELERATED_OVERFLOW_SCROLLING) is not enabled.
 fast/repaint/overflow-scroll-touch-repaint.html [ Skip ]
 
index e6b5050..b9a4cd6 100644 (file)
@@ -1467,6 +1467,9 @@ fast/css/sticky/sticky-top.html [ Pass ImageOnlyFailure ]
 
 css-custom-properties-api/ [ Failure ImageOnlyFailure ]
 
+# Dark mode not supported on Windows
+css-dark-mode [ Skip ]
+
 ################################################################################
 #################            End CSS Issues              #######################
 ################################################################################
index 9cd2bad..2592dfe 100644 (file)
@@ -181,6 +181,9 @@ fast/events/touch/gesture/long-press-on-draggable-element-triggers-drag.html [ S
 fast/events/touch/gesture/resources/drag-inside-iframe2.html [ Skip ]
 fast/events/touch/gesture/resources/drag-inside-nested-iframes3.html [ Skip ]
 
+# ENABLE_DARK_MODE_CSS is OFF in WPE.
+css-dark-mode [ Skip ]
+
 # Tests below are copied from wk2 expectations, because we've marked
 #  as passing the whole fast/events directory.
 
index 4d07100..c0a4945 100644 (file)
@@ -1,3 +1,13 @@
+2018-10-15  Timothy Hatcher  <timothy@apple.com>
+
+        Add support for prefers-color-scheme media query
+        https://bugs.webkit.org/show_bug.cgi?id=190499
+        rdar://problem/45212025
+
+        Reviewed by Dean Jackson.
+
+        * Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
+
 2018-10-15  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r237084, r237088, r237098, and
index 4ede6cf..9fc7a71 100644 (file)
@@ -96,6 +96,10 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
+ENABLE_DARK_MODE_CSS = $(ENABLE_DARK_MODE_CSS_$(WK_PLATFORM_NAME));
+ENABLE_DARK_MODE_CSS_macosx = $(ENABLE_DARK_MODE_CSS$(WK_MACOS_1014));
+ENABLE_DARK_MODE_CSS_MACOS_SINCE_1014 = ENABLE_DARK_MODE_CSS;
+
 ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(WK_PLATFORM_NAME));
 ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
@@ -370,4 +374,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 68f3802..a45b6bc 100644 (file)
@@ -1,3 +1,13 @@
+2018-10-15  Timothy Hatcher  <timothy@apple.com>
+
+        Add support for prefers-color-scheme media query
+        https://bugs.webkit.org/show_bug.cgi?id=190499
+        rdar://problem/45212025
+
+        Reviewed by Dean Jackson.
+
+        * wtf/FeatureDefines.h: Added ENABLE_DARK_MODE_CSS.
+
 2018-10-15  Saam barati  <sbarati@apple.com>
 
         Emit fjcvtzs on ARM64E on Darwin
index 839cb3f..a6b4687 100644 (file)
@@ -408,6 +408,10 @@ the public iOS SDK. See <https://webkit.org/b/179167>. */
 #define ENABLE_CUSTOM_SCHEME_HANDLER 0
 #endif
 
+#if !defined(ENABLE_DARK_MODE_CSS)
+#define ENABLE_DARK_MODE_CSS 0
+#endif
+
 #if !defined(ENABLE_DASHBOARD_SUPPORT)
 #define ENABLE_DASHBOARD_SUPPORT 0
 #endif
index 963e261..64184b2 100644 (file)
@@ -1,3 +1,29 @@
+2018-10-15  Timothy Hatcher  <timothy@apple.com>
+
+        Add support for prefers-color-scheme media query
+        https://bugs.webkit.org/show_bug.cgi?id=190499
+        rdar://problem/45212025
+
+        Reviewed by Dean Jackson.
+
+        Test: css-dark-mode/prefers-color-scheme.html
+
+        * Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
+        * css/CSSValueKeywords.in: Added light and dark.
+        * css/MediaFeatureNames.h: Added prefers-color-scheme.
+        * css/MediaQueryEvaluator.cpp:
+        (WebCore::prefersColorSchemeEvaluate): Added.
+        * css/MediaQueryExpression.cpp:
+        (WebCore::featureWithValidIdent): Added prefers-color-scheme.
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setDarkModeCSSEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::darkModeCSSEnabled const): Added.
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::resetToConsistentState): Reset setUseDarkAppearance.
+        (WebCore::InternalSettings::setUseDarkAppearance): Added.
+        * testing/InternalSettings.h: Added setUseDarkAppearance.
+        * testing/InternalSettings.idl: Ditto.
+
 2018-10-15  Alex Christensen  <achristensen@webkit.org>
 
         Remove unused WebView._globalHistoryItem
index 4ede6cf..9fc7a71 100644 (file)
@@ -96,6 +96,10 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
+ENABLE_DARK_MODE_CSS = $(ENABLE_DARK_MODE_CSS_$(WK_PLATFORM_NAME));
+ENABLE_DARK_MODE_CSS_macosx = $(ENABLE_DARK_MODE_CSS$(WK_MACOS_1014));
+ENABLE_DARK_MODE_CSS_MACOS_SINCE_1014 = ENABLE_DARK_MODE_CSS;
+
 ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(WK_PLATFORM_NAME));
 ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
@@ -370,4 +374,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index d6b31c9..06af2f8 100644 (file)
@@ -1,3 +1,13 @@
+2018-10-15  Timothy Hatcher  <timothy@apple.com>
+
+        Add support for prefers-color-scheme media query
+        https://bugs.webkit.org/show_bug.cgi?id=190499
+        rdar://problem/45212025
+
+        Reviewed by Dean Jackson.
+
+        * Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
+
 2018-10-14  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
 
         [JSC] Remove Option::useAsyncIterator
index 4ede6cf..9fc7a71 100644 (file)
@@ -96,6 +96,10 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
+ENABLE_DARK_MODE_CSS = $(ENABLE_DARK_MODE_CSS_$(WK_PLATFORM_NAME));
+ENABLE_DARK_MODE_CSS_macosx = $(ENABLE_DARK_MODE_CSS$(WK_MACOS_1014));
+ENABLE_DARK_MODE_CSS_MACOS_SINCE_1014 = ENABLE_DARK_MODE_CSS;
+
 ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(WK_PLATFORM_NAME));
 ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
@@ -370,4 +374,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index ce0649d..d133b6d 100644 (file)
@@ -1376,6 +1376,13 @@ prefers
 reduce
 no-preference
 
+#if defined(ENABLE_DARK_MODE_CSS) && ENABLE_DARK_MODE_CSS
+// prefers-color-scheme
+light
+dark
+// no-preference
+#endif
+
 // auto-repeat
 auto-fill
 auto-fit
index 81a6680..6b56455 100644 (file)
 #define CSS_MEDIAQUERY_DISPLAY_MODE(macro)
 #endif
 
+#if ENABLE(DARK_MODE_CSS)
+#define CSS_MEDIAQUERY_PREFERS_COLOR_SCHEME(macro) macro(prefersColorScheme, "prefers-color-scheme")
+#else
+#define CSS_MEDIAQUERY_PREFERS_COLOR_SCHEME(macro)
+#endif
+
 #define CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(macro) \
     macro(animation, "-webkit-animation") \
     macro(anyHover, "any-hover") \
@@ -79,6 +85,7 @@
     macro(videoPlayableInline, "-webkit-video-playable-inline") \
     macro(width, "width") \
     CSS_MEDIAQUERY_DISPLAY_MODE(macro) \
+    CSS_MEDIAQUERY_PREFERS_COLOR_SCHEME(macro) \
 
 // end of macro
 
index 0fb9e99..5e72143 100644 (file)
@@ -45,6 +45,7 @@
 #include "PlatformScreen.h"
 #include "RenderStyle.h"
 #include "RenderView.h"
+#include "RuntimeEnabledFeatures.h"
 #include "Settings.h"
 #include "StyleResolver.h"
 #include "Theme.h"
@@ -712,7 +713,7 @@ static bool anyPointerEvaluate(CSSValue* value, const CSSToLengthConversionData&
 {
     return pointerEvaluate(value, cssToLengthConversionData, frame, prefix);
 }
-    
+
 static bool prefersDarkInterfaceEvaluate(CSSValue* value, const CSSToLengthConversionData&, Frame& frame, MediaFeaturePrefix)
 {
     bool prefersDarkInterface = false;
@@ -726,6 +727,30 @@ static bool prefersDarkInterfaceEvaluate(CSSValue* value, const CSSToLengthConve
     return downcast<CSSPrimitiveValue>(*value).valueID() == (prefersDarkInterface ? CSSValuePrefers : CSSValueNoPreference);
 }
 
+#if ENABLE(DARK_MODE_CSS)
+static bool prefersColorSchemeEvaluate(CSSValue* value, const CSSToLengthConversionData&, Frame& frame, MediaFeaturePrefix)
+{
+    ASSERT(RuntimeEnabledFeatures::sharedFeatures().darkModeCSSEnabled());
+
+    if (!is<CSSPrimitiveValue>(value))
+        return false;
+
+    auto keyword = downcast<CSSPrimitiveValue>(*value).valueID();
+    bool useDarkAppearance = frame.page()->useDarkAppearance();
+
+    switch (keyword) {
+    case CSSValueNoPreference:
+        return true;
+    case CSSValueDark:
+        return useDarkAppearance;
+    case CSSValueLight:
+        return !useDarkAppearance;
+    default:
+        return false;
+    }
+}
+#endif
+
 static bool prefersReducedMotionEvaluate(CSSValue* value, const CSSToLengthConversionData&, Frame& frame, MediaFeaturePrefix)
 {
     bool userPrefersReducedMotion = false;
index 617cb6a..92087e4 100644 (file)
@@ -33,6 +33,7 @@
 #include "CSSPropertyParserHelpers.h"
 #include "MediaFeatureNames.h"
 #include "MediaQueryParserContext.h"
+#include "RuntimeEnabledFeatures.h"
 #include <wtf/text/TextStream.h>
 #include <wtf/text/StringBuilder.h>
 
@@ -53,6 +54,9 @@ static inline bool featureWithValidIdent(const AtomicString& mediaFeature, const
 #if ENABLE(APPLICATION_MANIFEST)
     || mediaFeature == MediaFeatureNames::displayMode
 #endif
+#if ENABLE(DARK_MODE_CSS)
+    || (mediaFeature == MediaFeatureNames::prefersColorScheme && RuntimeEnabledFeatures::sharedFeatures().darkModeCSSEnabled())
+#endif
     || mediaFeature == MediaFeatureNames::prefersReducedMotion
     || (mediaFeature == MediaFeatureNames::prefersDarkInterface && (context.useSystemAppearance || isUASheetBehavior(context.mode)));
 }
index f464cb9..09ef532 100644 (file)
@@ -84,6 +84,11 @@ public:
     void setDirectoryUploadEnabled(bool isEnabled) { m_isDirectoryUploadEnabled = isEnabled; }
     bool directoryUploadEnabled() const { return m_isDirectoryUploadEnabled; }
 
+#if ENABLE(DARK_MODE_CSS)
+    void setDarkModeCSSEnabled(bool isEnabled) { m_isDarkModeCSSEnabled = isEnabled; }
+    bool darkModeCSSEnabled() const { return m_isDarkModeCSSEnabled; }
+#endif
+
     void setDataTransferItemsEnabled(bool areEnabled) { m_areDataTransferItemsEnabled = areEnabled; }
     bool dataTransferItemsEnabled() const { return m_areDataTransferItemsEnabled; }
 
@@ -350,6 +355,10 @@ private:
     bool m_isAttachmentElementEnabled { false };
 #endif
 
+#if ENABLE(DARK_MODE_CSS)
+    bool m_isDarkModeCSSEnabled { false };
+#endif
+
 #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
     bool m_isIndexedDBWorkersEnabled { true };
 #endif
index bd1fa31..e7ce18b 100644 (file)
@@ -286,6 +286,7 @@ void InternalSettings::resetToConsistentState()
     m_page->setPageScaleFactor(1, { 0, 0 });
     m_page->mainFrame().setPageAndTextZoomFactors(1, 1);
     m_page->setCanStartMedia(true);
+    m_page->setUseDarkAppearance(false);
 
     settings().setForcePendingWebGLPolicy(false);
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
@@ -526,6 +527,14 @@ ExceptionOr<bool> InternalSettings::shouldDisplayTrackKind(const String& kind)
 #endif
 }
 
+ExceptionOr<void> InternalSettings::setUseDarkAppearance(bool useDarkAppearance)
+{
+    if (!m_page)
+        return Exception { InvalidAccessError };
+    m_page->setUseDarkAppearance(useDarkAppearance);
+    return { };
+}
+
 ExceptionOr<void> InternalSettings::setStorageBlockingPolicy(const String& mode)
 {
     if (!m_page)
index 35567f8..6cc7c60 100644 (file)
@@ -72,6 +72,7 @@ public:
     ExceptionOr<void> setPDFImageCachingPolicy(const String&);
     ExceptionOr<void> setShouldDisplayTrackKind(const String& kind, bool enabled);
     ExceptionOr<bool> shouldDisplayTrackKind(const String& kind);
+    ExceptionOr<void> setUseDarkAppearance(bool);
     ExceptionOr<void> setStorageBlockingPolicy(const String&);
     ExceptionOr<void> setImagesEnabled(bool);
     ExceptionOr<void> setMinimumTimerInterval(double intervalInSeconds);
index 51eb246..bbd8165 100644 (file)
@@ -71,6 +71,7 @@ enum FontLoadTimingOverride { "Block", "Swap", "Failure" };
     [MayThrowException] void setPreferMIMETypeForImages(boolean preferMimeTypeForImage);
 
     // Other switches
+    [MayThrowException] void setUseDarkAppearance(boolean enabled);
     [MayThrowException] void setStorageBlockingPolicy(DOMString policy);
     [MayThrowException] void setImagesEnabled(boolean enabled);
     [MayThrowException] void setPDFImageCachingPolicy(DOMString policy);
index 0964f68..91805a8 100644 (file)
@@ -1,3 +1,14 @@
+2018-10-15  Timothy Hatcher  <timothy@apple.com>
+
+        Add support for prefers-color-scheme media query
+        https://bugs.webkit.org/show_bug.cgi?id=190499
+        rdar://problem/45212025
+
+        Reviewed by Dean Jackson.
+
+        * Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
+        * Shared/WebPreferences.yaml: Added DarkModeCSSEnabled as experimental.
+
 2018-10-15  Patrick Griffis  <pgriffis@igalia.com>
 
         Remove StorageProcess leftover
index 4ede6cf..9fc7a71 100644 (file)
@@ -96,6 +96,10 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
+ENABLE_DARK_MODE_CSS = $(ENABLE_DARK_MODE_CSS_$(WK_PLATFORM_NAME));
+ENABLE_DARK_MODE_CSS_macosx = $(ENABLE_DARK_MODE_CSS$(WK_MACOS_1014));
+ENABLE_DARK_MODE_CSS_MACOS_SINCE_1014 = ENABLE_DARK_MODE_CSS;
+
 ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(WK_PLATFORM_NAME));
 ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
@@ -370,4 +374,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 4c1d3ff..2ec0adc 100644 (file)
@@ -1294,6 +1294,15 @@ CSSCustomPropertiesAndValuesEnabled:
   webcoreBinding: RuntimeEnabledFeatures
   category: experimental
 
+DarkModeCSSEnabled:
+  type: bool
+  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
+  humanReadableName: "Dark Mode CSS Support"
+  humanReadableDescription: "Enable Dark Mode CSS Support"
+  webcoreBinding: RuntimeEnabledFeatures
+  category: experimental
+  condition: ENABLE(DARK_MODE_CSS)
+
 # For internal features:
 # The type should be boolean.
 # You must provide a humanReadableName and humanReadableDescription for all debug features. They
index f76668c..be3a5ed 100644 (file)
@@ -1,3 +1,13 @@
+2018-10-15  Timothy Hatcher  <timothy@apple.com>
+
+        Add support for prefers-color-scheme media query
+        https://bugs.webkit.org/show_bug.cgi?id=190499
+        rdar://problem/45212025
+
+        Reviewed by Dean Jackson.
+
+        * Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
+
 2018-10-15  Alex Christensen  <achristensen@webkit.org>
 
         Remove unused WebView._globalHistoryItem
index 4ede6cf..9fc7a71 100644 (file)
@@ -96,6 +96,10 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
+ENABLE_DARK_MODE_CSS = $(ENABLE_DARK_MODE_CSS_$(WK_PLATFORM_NAME));
+ENABLE_DARK_MODE_CSS_macosx = $(ENABLE_DARK_MODE_CSS$(WK_MACOS_1014));
+ENABLE_DARK_MODE_CSS_MACOS_SINCE_1014 = ENABLE_DARK_MODE_CSS;
+
 ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(WK_PLATFORM_NAME));
 ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
@@ -370,4 +374,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 4d42faa..a53ee89 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup Label="UserMacros">
     <ENABLE_3D_TRANSFORMS>ENABLE_3D_TRANSFORMS</ENABLE_3D_TRANSFORMS>
@@ -17,6 +17,7 @@
     <ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED>ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED</ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED>
     <ENABLE_CURSOR_VISIBILITY>ENABLE_CURSOR_VISIBILITY</ENABLE_CURSOR_VISIBILITY>
     <ENABLE_CUSTOM_SCHEME_HANDLER />
+    <ENABLE_DARK_MODE_CSS />
     <ENABLE_DATAGRID />
     <ENABLE_DATALIST_ELEMENT />
     <ENABLE_DEVICE_ORIENTATION />
@@ -76,7 +77,7 @@
   </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
-      <PreprocessorDefinitions>$(ENABLE_3D_TRANSFORMS);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_ACCELERATED_OVERFLOW_SCROLLING);$(ENABLE_ATTACHMENT_ELEMENT);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CSS3_CONDITIONAL_RULES);$(ENABLE_CSS_IMAGE_SET);$(ENABLE_CSS3_TEXT);$(ENABLE_CSS_BOX_DECORATION_BREAK);$(ENABLE_CSS_SHADERS);$(ENABLE_CSS_COMPOSITING);$(ENABLE_CSS_SELECTORS_LEVEL4);$(ENABLE_CSS_SHAPE_INSIDE);$(ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED);$(ENABLE_CURSOR_VISIBILITY);$(ENABLE_CUSTOM_SCHEME_HANDLER);$(ENABLE_DATAGRID);$(ENABLE_DATALIST_ELEMENT);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_ENCRYPTED_MEDIA);$(ENABLE_FETCH_API);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GAMEPAD);$(ENABLE_GEOLOCATION);$(ENABLE_HIGH_DPI_CANVAS);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_TYPE_COLOR);$(ENABLE_INPUT_SPEECH);$(ENABLE_INPUT_TYPE_DATE);$(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE);$(ENABLE_INPUT_TYPE_DATETIMELOCAL);$(ENABLE_INPUT_TYPE_MONTH);$(ENABLE_INPUT_TYPE_TIME);$(ENABLE_INPUT_TYPE_WEEK);$(ENABLE_INTL);$(ENABLE_LEGACY_CSS_VENDOR_PREFIXES);$(ENABLE_LEGACY_ENCRYPTED_MEDIA);$(ENABLE_LINK_PRERENDER);$(ENABLE_MATHML);$(ENABLE_METER_ELEMENT);$(ENABLE_MICRODATA);$(ENABLE_MOUSE_CURSOR_SCALE);$(ENABLE_NOTIFICATIONS);$(ENABLE_QUOTA);$(ENABLE_NAVIGATOR_CONTENT_UTILS);$(ENABLE_STREAMS_API);$(ENABLE_SCRIPTED_SPEECH);$(ENABLE_SHARED_WORKERS);$(ENABLE_MEDIA_CONTROLS_SCRIPT);$(ENABLE_MEDIA_SOURCE);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_SQL_DATABASE);$(ENABLE_STYLE_SCOPED);$(ENABLE_SUBPIXEL_LAYOUT);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_VIDEO);$(ENABLE_VIDEO_TRACK);$(ENABLE_WEB_AUDIO);$(ENABLE_WEBGL);$(ENABLE_WEBGPU);$(ENABLE_WEBVTT_REGIONS);$(ENABLE_XHR_TIMEOUT);$(ENABLE_XSLT);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>$(ENABLE_3D_TRANSFORMS);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_ACCELERATED_OVERFLOW_SCROLLING);$(ENABLE_ATTACHMENT_ELEMENT);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CSS3_CONDITIONAL_RULES);$(ENABLE_CSS_IMAGE_SET);$(ENABLE_CSS3_TEXT);$(ENABLE_CSS_BOX_DECORATION_BREAK);$(ENABLE_CSS_SHADERS);$(ENABLE_CSS_COMPOSITING);$(ENABLE_CSS_SELECTORS_LEVEL4);$(ENABLE_CSS_SHAPE_INSIDE);$(ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED);$(ENABLE_CURSOR_VISIBILITY);$(ENABLE_CUSTOM_SCHEME_HANDLER);$(ENABLE_DARK_MODE_CSS);$(ENABLE_DATAGRID);$(ENABLE_DATALIST_ELEMENT);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_ENCRYPTED_MEDIA);$(ENABLE_FETCH_API);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GAMEPAD);$(ENABLE_GEOLOCATION);$(ENABLE_HIGH_DPI_CANVAS);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_TYPE_COLOR);$(ENABLE_INPUT_SPEECH);$(ENABLE_INPUT_TYPE_DATE);$(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE);$(ENABLE_INPUT_TYPE_DATETIMELOCAL);$(ENABLE_INPUT_TYPE_MONTH);$(ENABLE_INPUT_TYPE_TIME);$(ENABLE_INPUT_TYPE_WEEK);$(ENABLE_INTL);$(ENABLE_LEGACY_CSS_VENDOR_PREFIXES);$(ENABLE_LEGACY_ENCRYPTED_MEDIA);$(ENABLE_LINK_PRERENDER);$(ENABLE_MATHML);$(ENABLE_METER_ELEMENT);$(ENABLE_MICRODATA);$(ENABLE_MOUSE_CURSOR_SCALE);$(ENABLE_NOTIFICATIONS);$(ENABLE_QUOTA);$(ENABLE_NAVIGATOR_CONTENT_UTILS);$(ENABLE_STREAMS_API);$(ENABLE_SCRIPTED_SPEECH);$(ENABLE_SHARED_WORKERS);$(ENABLE_MEDIA_CONTROLS_SCRIPT);$(ENABLE_MEDIA_SOURCE);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_SQL_DATABASE);$(ENABLE_STYLE_SCOPED);$(ENABLE_SUBPIXEL_LAYOUT);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_VIDEO);$(ENABLE_VIDEO_TRACK);$(ENABLE_WEB_AUDIO);$(ENABLE_WEBGL);$(ENABLE_WEBGPU);$(ENABLE_WEBVTT_REGIONS);$(ENABLE_XHR_TIMEOUT);$(ENABLE_XSLT);%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
       <Value>$(ENABLE_CUSTOM_SCHEME_HANDLER)</Value>
       <EnvironmentVariable>true</EnvironmentVariable>
     </BuildMacro>
+    <BuildMacro Include="ENABLE_DARK_MODE_CSS">
+      <Value>$(ENABLE_DARK_MODE_CSS)</Value>
+      <EnvironmentVariable>true</EnvironmentVariable>
+    </BuildMacro>
     <BuildMacro Include="ENABLE_DATAGRID">
       <Value>$(ENABLE_DATAGRID)</Value>
       <EnvironmentVariable>true</EnvironmentVariable>
index 113aade..e350159 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup Label="UserMacros">
     <ENABLE_3D_TRANSFORMS>ENABLE_3D_TRANSFORMS</ENABLE_3D_TRANSFORMS>
@@ -17,6 +17,7 @@
     <ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED>ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED</ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED>
     <ENABLE_CURSOR_VISIBILITY>ENABLE_CURSOR_VISIBILITY</ENABLE_CURSOR_VISIBILITY>
     <ENABLE_CUSTOM_SCHEME_HANDLER />
+    <ENABLE_DARK_MODE_CSS />
     <ENABLE_DATAGRID />
     <ENABLE_DATALIST_ELEMENT />
     <ENABLE_DEVICE_ORIENTATION />
@@ -75,7 +76,7 @@
   </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
-      <PreprocessorDefinitions>$(ENABLE_3D_TRANSFORMS);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_ACCELERATED_OVERFLOW_SCROLLING);$(ENABLE_ATTACHMENT_ELEMENT);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CSS3_CONDITIONAL_RULES);$(ENABLE_CSS_IMAGE_SET);$(ENABLE_CSS3_TEXT);$(ENABLE_CSS_BOX_DECORATION_BREAK);$(ENABLE_CSS_SHADERS);$(ENABLE_CSS_COMPOSITING);$(ENABLE_CSS_SELECTORS_LEVEL4);$(ENABLE_CSS_SHAPE_INSIDE);$(ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED);$(ENABLE_CURSOR_VISIBILITY);$(ENABLE_CUSTOM_SCHEME_HANDLER);$(ENABLE_DATAGRID);$(ENABLE_DATALIST_ELEMENT);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_ENCRYPTED_MEDIA);$(ENABLE_FETCH_API);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GAMEPAD);$(ENABLE_GEOLOCATION);$(ENABLE_HIGH_DPI_CANVAS);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_TYPE_COLOR);$(ENABLE_INPUT_SPEECH);$(ENABLE_INPUT_TYPE_DATE);$(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE);$(ENABLE_INPUT_TYPE_DATETIMELOCAL);$(ENABLE_INPUT_TYPE_MONTH);$(ENABLE_INPUT_TYPE_TIME);$(ENABLE_INPUT_TYPE_WEEK);$(ENABLE_INTL);$(ENABLE_LEGACY_CSS_VENDOR_PREFIXES);$(ENABLE_LEGACY_ENCRYPTED_MEDIA);$(ENABLE_LINK_PRERENDER);$(ENABLE_MATHML);$(ENABLE_METER_ELEMENT);$(ENABLE_MICRODATA);$(ENABLE_MOUSE_CURSOR_SCALE);$(ENABLE_NOTIFICATIONS);$(ENABLE_QUOTA);$(ENABLE_NAVIGATOR_CONTENT_UTILS);$(ENABLE_SCRIPTED_SPEECH);$(ENABLE_SHARED_WORKERS);$(ENABLE_MEDIA_CONTROLS_SCRIPT);$(ENABLE_MEDIA_SOURCE);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_SQL_DATABASE);$(ENABLE_STYLE_SCOPED);$(ENABLE_SUBPIXEL_LAYOUT);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_VIDEO);$(ENABLE_VIDEO_TRACK);$(ENABLE_WEB_AUDIO);$(ENABLE_WEBGL);$(ENABLE_WEBVTT_REGIONS);$(ENABLE_XHR_TIMEOUT);$(ENABLE_XSLT);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>$(ENABLE_3D_TRANSFORMS);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_ACCELERATED_OVERFLOW_SCROLLING);$(ENABLE_ATTACHMENT_ELEMENT);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CSS3_CONDITIONAL_RULES);$(ENABLE_CSS_IMAGE_SET);$(ENABLE_CSS3_TEXT);$(ENABLE_CSS_BOX_DECORATION_BREAK);$(ENABLE_CSS_SHADERS);$(ENABLE_CSS_COMPOSITING);$(ENABLE_CSS_SELECTORS_LEVEL4);$(ENABLE_CSS_SHAPE_INSIDE);$(ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED);$(ENABLE_CURSOR_VISIBILITY);$(ENABLE_CUSTOM_SCHEME_HANDLER);$(ENABLE_DARK_MODE_CSS);$(ENABLE_DATAGRID);$(ENABLE_DATALIST_ELEMENT);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_ENCRYPTED_MEDIA);$(ENABLE_FETCH_API);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GAMEPAD);$(ENABLE_GEOLOCATION);$(ENABLE_HIGH_DPI_CANVAS);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_TYPE_COLOR);$(ENABLE_INPUT_SPEECH);$(ENABLE_INPUT_TYPE_DATE);$(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE);$(ENABLE_INPUT_TYPE_DATETIMELOCAL);$(ENABLE_INPUT_TYPE_MONTH);$(ENABLE_INPUT_TYPE_TIME);$(ENABLE_INPUT_TYPE_WEEK);$(ENABLE_INTL);$(ENABLE_LEGACY_CSS_VENDOR_PREFIXES);$(ENABLE_LEGACY_ENCRYPTED_MEDIA);$(ENABLE_LINK_PRERENDER);$(ENABLE_MATHML);$(ENABLE_METER_ELEMENT);$(ENABLE_MICRODATA);$(ENABLE_MOUSE_CURSOR_SCALE);$(ENABLE_NOTIFICATIONS);$(ENABLE_QUOTA);$(ENABLE_NAVIGATOR_CONTENT_UTILS);$(ENABLE_SCRIPTED_SPEECH);$(ENABLE_SHARED_WORKERS);$(ENABLE_MEDIA_CONTROLS_SCRIPT);$(ENABLE_MEDIA_SOURCE);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_SQL_DATABASE);$(ENABLE_STYLE_SCOPED);$(ENABLE_SUBPIXEL_LAYOUT);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_VIDEO);$(ENABLE_VIDEO_TRACK);$(ENABLE_WEB_AUDIO);$(ENABLE_WEBGL);$(ENABLE_WEBVTT_REGIONS);$(ENABLE_XHR_TIMEOUT);$(ENABLE_XSLT);%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
       <Value>$(ENABLE_CUSTOM_SCHEME_HANDLER)</Value>
       <EnvironmentVariable>true</EnvironmentVariable>
     </BuildMacro>
+    <BuildMacro Include="ENABLE_DARK_MODE_CSS">
+      <Value>$(ENABLE_DARK_MODE_CSS)</Value>
+      <EnvironmentVariable>true</EnvironmentVariable>
+    </BuildMacro>
     <BuildMacro Include="ENABLE_DATAGRID">
       <Value>$(ENABLE_DATAGRID)</Value>
       <EnvironmentVariable>true</EnvironmentVariable>
index 1eeafa0..365c2c3 100644 (file)
@@ -1,3 +1,14 @@
+2018-10-15  Timothy Hatcher  <timothy@apple.com>
+
+        Add support for prefers-color-scheme media query
+        https://bugs.webkit.org/show_bug.cgi?id=190499
+        rdar://problem/45212025
+
+        Reviewed by Dean Jackson.
+
+        * Scripts/webkitperl/FeatureList.pm: Added ENABLE_DARK_MODE_CSS as dark-mode-css.
+        * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
+
 2018-10-15  Patrick Griffis  <pgriffis@igalia.com>
 
         [JHBuild] Add xdg-dbus-proxy module
index 6c9060d..73e9310 100644 (file)
@@ -65,6 +65,7 @@ my (
     $customElementsSupport,
     $customSchemeHandlerSupport,
     $dataTransferItemsSupport,
+    $darkModeCSSSupport,
     $datalistElementSupport,
     $deviceOrientationSupport,
     $dom4EventsConstructor,
@@ -184,6 +185,9 @@ my @features = (
     { option => "custom-scheme-handler", desc => "Toggle Custom Scheme Handler support",
       define => "ENABLE_CUSTOM_SCHEME_HANDLER", value => \$customSchemeHandlerSupport },
 
+    { option => "dark-mode-css", desc => "Toggle Dark Mode CSS support",
+      define => "ENABLE_DARK_MODE_CSS", value => \$darkModeCSSSupport },
+
     { option => "data-transfer-items", desc => "Toggle Data Transfer Items support",
       define => "ENABLE_DATA_TRANSFER_ITEMS", value => \$dataTransferItemsSupport },
 
index 4ede6cf..9fc7a71 100644 (file)
@@ -96,6 +96,10 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
+ENABLE_DARK_MODE_CSS = $(ENABLE_DARK_MODE_CSS_$(WK_PLATFORM_NAME));
+ENABLE_DARK_MODE_CSS_macosx = $(ENABLE_DARK_MODE_CSS$(WK_MACOS_1014));
+ENABLE_DARK_MODE_CSS_MACOS_SINCE_1014 = ENABLE_DARK_MODE_CSS;
+
 ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(WK_PLATFORM_NAME));
 ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
@@ -370,4 +374,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);