Stop using SDK conditionals to control feature definitions
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2018 01:38:34 +0000 (01:38 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2018 01:38:34 +0000 (01:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=183430
<rdar://problem/38251619>

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig: Renamed.

Source/ThirdParty/libwebrtc:

* Configurations/WebKitTargetConditionals.xcconfig: Renamed.
* Configurations/opus.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig: Renamed.

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig: Renamed.

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig: Renamed.

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig: Renamed.

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
* TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: Renamed.

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

24 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/JavaScriptCore/Configurations/WebKitTargetConditionals.xcconfig [moved from Source/JavaScriptCore/Configurations/macOSTargetConditionals.xcconfig with 80% similarity]
Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/Configurations/WebKitTargetConditionals.xcconfig [moved from Source/WebKit/Configurations/macOSTargetConditionals.xcconfig with 80% similarity]
Source/ThirdParty/libwebrtc/Configurations/macOSTargetConditionals.xcconfig [deleted file]
Source/ThirdParty/libwebrtc/Configurations/opus.xcconfig
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/Configurations/WebKitTargetConditionals.xcconfig [moved from Source/WebCore/Configurations/macOSTargetConditionals.xcconfig with 80% similarity]
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
Source/WebCore/PAL/Configurations/WebKitTargetConditionals.xcconfig [moved from Source/WebCore/PAL/Configurations/macOSTargetConditionals.xcconfig with 80% similarity]
Source/WebKit/ChangeLog
Source/WebKit/Configurations/FeatureDefines.xcconfig
Source/WebKit/Configurations/WebKitTargetConditionals.xcconfig [new file with mode: 0644]
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig
Source/WebKitLegacy/mac/Configurations/WebKitTargetConditionals.xcconfig [new file with mode: 0644]
Source/WebKitLegacy/mac/Configurations/macOSTargetConditionals.xcconfig [deleted file]
Tools/ChangeLog
Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig
Tools/TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig [new file with mode: 0644]
Tools/TestWebKitAPI/Configurations/macOSTargetConditionals.xcconfig [deleted file]

index 5af2d70..c9a7bf3 100644 (file)
@@ -1,3 +1,14 @@
+2018-03-12  Tim Horton  <timothy_horton@apple.com>
+
+        Stop using SDK conditionals to control feature definitions
+        https://bugs.webkit.org/show_bug.cgi?id=183430
+        <rdar://problem/38251619>
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/FeatureDefines.xcconfig:
+        * Configurations/WebKitTargetConditionals.xcconfig: Renamed.
+
 2018-03-12  Yoav Weiss  <yoav@yoav.ws>
 
         Runtime flag for link prefetch and remove link subresource.
index f38453a..be4f975 100644 (file)
 
 // Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
 
-#include "macOSTargetConditionals.xcconfig"
+#include "WebKitTargetConditionals.xcconfig"
+
+WK_COCOA_TOUCH = $(WK_COCOA_TOUCH_$(PLATFORM_NAME));
+WK_COCOA_TOUCH_iphoneos = cocoatouch;
+WK_COCOA_TOUCH_iphonesimulator = cocoatouch;
+WK_COCOA_TOUCH_watchos = cocoatouch;
+WK_COCOA_TOUCH_watchsimulator = cocoatouch;
+WK_COCOA_TOUCH_appletvos = cocoatouch;
+WK_COCOA_TOUCH_appletvsimulator = cocoatouch;
 
 ENABLE_3D_TRANSFORMS = ENABLE_3D_TRANSFORMS;
 
 ENABLE_ACCELERATED_2D_CANVAS = ;
 
-ENABLE_ACCELERATED_OVERFLOW_SCROLLING[sdk=iphone*] = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING = $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING_$(WK_COCOA_TOUCH));
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING_cocoatouch = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
 
-ENABLE_APPLE_PAY[sdk=iphone*] = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_iphoneos = ENABLE_APPLE_PAY;
 ENABLE_APPLE_PAY_iphonesimulator = ENABLE_APPLE_PAY;
-ENABLE_APPLE_PAY[sdk=macosx*] = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
+ENABLE_APPLE_PAY_macosx = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
 ENABLE_APPLE_PAY_MACOS_SINCE_1012 = ENABLE_APPLE_PAY;
 
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphone*] = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY_SESSION_V3 = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_SESSION_V3_iphoneos = ENABLE_APPLE_PAY_SESSION_V3;
 ENABLE_APPLE_PAY_SESSION_V3_iphonesimulator = ENABLE_APPLE_PAY_SESSION_V3;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphoneos10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphonesimulator10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=macosx*] = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
+ENABLE_APPLE_PAY_SESSION_V3_macosx = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
 ENABLE_APPLE_PAY_SESSION_V3_MACOS_SINCE_1013 = ENABLE_APPLE_PAY_SESSION_V3;
 
 ENABLE_APPLICATION_MANIFEST = ENABLE_APPLICATION_MANIFEST;
@@ -63,10 +70,10 @@ ENABLE_CACHE_PARTITIONING = ENABLE_CACHE_PARTITIONING;
 
 ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
 
-ENABLE_CONTENT_FILTERING[sdk=appletv*] = ;
-ENABLE_CONTENT_FILTERING[sdk=watch*] = ;
-ENABLE_CONTENT_FILTERING[sdk=iphone*] = ENABLE_CONTENT_FILTERING;
-ENABLE_CONTENT_FILTERING[sdk=macosx*] = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING = $(ENABLE_CONTENT_FILTERING_$(PLATFORM_NAME));
+ENABLE_CONTENT_FILTERING_iphoneos = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_iphonesimulator = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_macosx = ENABLE_CONTENT_FILTERING;
 
 ENABLE_CSS3_TEXT = ;
 
@@ -92,78 +99,83 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
-ENABLE_DASHBOARD_SUPPORT[sdk=macosx*] = ENABLE_DASHBOARD_SUPPORT;
+ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
 ENABLE_DATACUE_VALUE = ENABLE_DATACUE_VALUE;
 
 ENABLE_DATALIST_ELEMENT = ;
 
-ENABLE_DATA_INTERACTION[sdk=iphone*] = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
+ENABLE_DATA_INTERACTION = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
 ENABLE_DATA_INTERACTION_iphoneos = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION_iphonesimulator = ENABLE_DATA_INTERACTION;
-ENABLE_DATA_INTERACTION[sdk=iphoneos10*] = ;
-ENABLE_DATA_INTERACTION[sdk=iphonesimulator10*] = ;
 
-ENABLE_DEVICE_ORIENTATION[sdk=iphone*] = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION = $(ENABLE_DEVICE_ORIENTATION_$(PLATFORM_NAME));
+ENABLE_DEVICE_ORIENTATION_iphoneos = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION_iphonesimulator = ENABLE_DEVICE_ORIENTATION;
 
-ENABLE_DRAG_SUPPORT[sdk=iphone*] = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DRAG_SUPPORT = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
 ENABLE_DRAG_SUPPORT_iphoneos = ENABLE_DRAG_SUPPORT;
 ENABLE_DRAG_SUPPORT_iphonesimulator = ENABLE_DRAG_SUPPORT;
-ENABLE_DRAG_SUPPORT[sdk=iphoneos10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=iphonesimulator10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=watch*] = ;
-ENABLE_DRAG_SUPPORT[sdk=appletv*] = ;
 
 ENABLE_ENCRYPTED_MEDIA = ENABLE_ENCRYPTED_MEDIA;
 
 ENABLE_EXTRA_ZOOM_MODE = ;
 
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphone*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios);
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphoneos10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphonesimulator10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS_ios[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios_$(USE_INTERNAL_SDK))
-ENABLE_FAST_JIT_PERMISSIONS_ios_YES = ENABLE_FAST_JIT_PERMISSIONS;
+ENABLE_FAST_JIT_PERMISSIONS = $(ENABLE_FAST_JIT_PERMISSIONS_$(PLATFORM_NAME));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_iphoneos_$(USE_INTERNAL_SDK));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos_YES = ENABLE_FAST_JIT_PERMISSIONS;
 
 ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
 
-ENABLE_FTL_JIT[sdk=macosx*] = ENABLE_FTL_JIT;
-ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT = $(ENABLE_FTL_JIT_$(PLATFORM_NAME))
+ENABLE_FTL_JIT_macosx = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT_iphoneos = ENABLE_FTL_JIT;
 
-ENABLE_FULLSCREEN_API[sdk=iphone*] = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
-ENABLE_FULLSCREEN_API_iphoneos = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API_iphonesimulator = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API[sdk=iphoneos10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphoneos11*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator11*] = ;
-ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
+ENABLE_FULLSCREEN_API_iphoneos = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_iphonesimulator = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_IOS_SINCE_12 = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API_macosx = ENABLE_FULLSCREEN_API;
 
-ENABLE_GAMEPAD = ENABLE_GAMEPAD;
-ENABLE_GAMEPAD[sdk=watch*] = ;
+ENABLE_GAMEPAD = $(ENABLE_GAMEPAD_$(PLATFORM_NAME));
+ENABLE_GAMEPAD_iphoneos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_iphonesimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvsimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_macosx = ENABLE_GAMEPAD;
 
 ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
 
-ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;
+ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(PLATFORM_NAME));
+ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
 
 ENABLE_INDEXED_DATABASE = ENABLE_INDEXED_DATABASE;
 
 ENABLE_INDEXED_DATABASE_IN_WORKERS = ENABLE_INDEXED_DATABASE_IN_WORKERS;
 
-ENABLE_INPUT_TYPE_COLOR[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR;
+ENABLE_INPUT_TYPE_COLOR = $(ENABLE_INPUT_TYPE_COLOR_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_macosx = ENABLE_INPUT_TYPE_COLOR;
 
-ENABLE_INPUT_TYPE_COLOR_POPOVER[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR_POPOVER;
+ENABLE_INPUT_TYPE_COLOR_POPOVER = $(ENABLE_INPUT_TYPE_COLOR_POPOVER_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_POPOVER_macosx = ENABLE_INPUT_TYPE_COLOR_POPOVER;
 
-ENABLE_INPUT_TYPE_DATETIMELOCAL[sdk=iphone*] = ENABLE_INPUT_TYPE_DATETIMELOCAL;
+ENABLE_INPUT_TYPE_DATETIMELOCAL = $(ENABLE_INPUT_TYPE_DATETIMELOCAL_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATETIMELOCAL_cocoatouch = ENABLE_INPUT_TYPE_DATETIMELOCAL;
 
 ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE = ;
 
-ENABLE_INPUT_TYPE_DATE[sdk=iphone*] = ENABLE_INPUT_TYPE_DATE;
+ENABLE_INPUT_TYPE_DATE = $(ENABLE_INPUT_TYPE_DATE_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATE_cocoatouch = ENABLE_INPUT_TYPE_DATE;
 
-ENABLE_INPUT_TYPE_MONTH[sdk=iphone*] = ENABLE_INPUT_TYPE_MONTH;
+ENABLE_INPUT_TYPE_MONTH = $(ENABLE_INPUT_TYPE_MONTH_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_MONTH_cocoatouch = ENABLE_INPUT_TYPE_MONTH;
 
-ENABLE_INPUT_TYPE_TIME[sdk=iphone*] = ENABLE_INPUT_TYPE_TIME;
+ENABLE_INPUT_TYPE_TIME = $(ENABLE_INPUT_TYPE_TIME_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_TIME_cocoatouch = ENABLE_INPUT_TYPE_TIME;
 
-ENABLE_INPUT_TYPE_WEEK[sdk=iphone*] = ENABLE_INPUT_TYPE_WEEK;
+ENABLE_INPUT_TYPE_WEEK = $(ENABLE_INPUT_TYPE_WEEK_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_WEEK_cocoatouch = ENABLE_INPUT_TYPE_WEEK;
 
 ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS = ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS;
 
@@ -171,12 +183,11 @@ ENABLE_INTERSECTION_OBSERVER = ENABLE_INTERSECTION_OBSERVER;
 
 ENABLE_INTL = ENABLE_INTL;
 
-ENABLE_IOS_GESTURE_EVENTS = ;
-ENABLE_IOS_GESTURE_EVENTS[sdk=iphone*] = $(ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
+ENABLE_IOS_GESTURE_EVENTS = $(ENABLE_IOS_GESTURE_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_GESTURE_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
 
-ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
+ENABLE_IOS_TOUCH_EVENTS = $(ENABLE_IOS_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
 
 ENABLE_JS_ASYNC_ITERATION = ENABLE_JS_ASYNC_ITERATION;
 
@@ -190,25 +201,27 @@ ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER = ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER;
 
 ENABLE_LEGACY_ENCRYPTED_MEDIA = ENABLE_LEGACY_ENCRYPTED_MEDIA;
 
-ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
+ENABLE_LETTERPRESS = $(ENABLE_LETTERPRESS_$(WK_COCOA_TOUCH));
+ENABLE_LETTERPRESS_cocoatouch = ENABLE_LETTERPRESS;
 
-ENABLE_MAC_GESTURE_EVENTS = ;
-ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_GESTURE_EVENTS = $(ENABLE_MAC_GESTURE_EVENTS_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
 
-ENABLE_MAC_VIDEO_TOOLBOX = ;
-ENABLE_MAC_VIDEO_TOOLBOX[sdk=macosx*] = $(ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_VIDEO_TOOLBOX = $(ENABLE_MAC_VIDEO_TOOLBOX_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_VIDEO_TOOLBOX;
 
 ENABLE_MATHML = ENABLE_MATHML;
 
-ENABLE_MEDIA_CAPTURE[sdk=iphone*] = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE = $(ENABLE_MEDIA_CAPTURE_$(PLATFORM_NAME));
+ENABLE_MEDIA_CAPTURE_iphoneos = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE_iphonesimulator = ENABLE_MEDIA_CAPTURE;
 
 ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 
 ENABLE_MEDIA_SESSION = ;
 
-ENABLE_MEDIA_SOURCE[sdk=macosx*] = ENABLE_MEDIA_SOURCE;
+ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;
 
@@ -218,19 +231,24 @@ ENABLE_METER_ELEMENT = ENABLE_METER_ELEMENT;
 
 ENABLE_MHTML = ;
 
-ENABLE_MOUSE_CURSOR_SCALE[sdk=macosx*] = ENABLE_MOUSE_CURSOR_SCALE;
+ENABLE_MOUSE_CURSOR_SCALE = $(ENABLE_MOUSE_CURSOR_SCALE_$(PLATFORM_NAME));
+ENABLE_MOUSE_CURSOR_SCALE_macosx = ENABLE_MOUSE_CURSOR_SCALE;
 
 ENABLE_NAVIGATOR_CONTENT_UTILS = ;
 
-ENABLE_NAVIGATOR_STANDALONE[sdk=iphone*] = ENABLE_NAVIGATOR_STANDALONE;
+ENABLE_NAVIGATOR_STANDALONE = $(ENABLE_NAVIGATOR_STANDALONE_$(WK_COCOA_TOUCH));
+ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE;
 
-ENABLE_NOTIFICATIONS[sdk=macosx*] = ENABLE_NOTIFICATIONS;
+ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(PLATFORM_NAME));
+ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS;
 
 ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST;
 
-ENABLE_PDFKIT_PLUGIN[sdk=macosx*] = ENABLE_PDFKIT_PLUGIN;
+ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(PLATFORM_NAME));
+ENABLE_PDFKIT_PLUGIN_macosx = ENABLE_PDFKIT_PLUGIN;
 
-ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
+ENABLE_POINTER_LOCK = $(ENABLE_POINTER_LOCK_$(PLATFORM_NAME));
+ENABLE_POINTER_LOCK_macosx = ENABLE_POINTER_LOCK;
 
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 
@@ -242,9 +260,11 @@ ENABLE_RESOLUTION_MEDIA_QUERY = ;
 
 ENABLE_RESOURCE_USAGE = ENABLE_RESOURCE_USAGE;
 
-ENABLE_RUBBER_BANDING[sdk=macosx*] = ENABLE_RUBBER_BANDING;
+ENABLE_RUBBER_BANDING = $(ENABLE_RUBBER_BANDING_$(PLATFORM_NAME));
+ENABLE_RUBBER_BANDING_macosx = ENABLE_RUBBER_BANDING;
 
-ENABLE_SERVICE_CONTROLS[sdk=macosx*] = ENABLE_SERVICE_CONTROLS;
+ENABLE_SERVICE_CONTROLS = $(ENABLE_SERVICE_CONTROLS_$(PLATFORM_NAME));
+ENABLE_SERVICE_CONTROLS_macosx = ENABLE_SERVICE_CONTROLS;
 
 ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 
@@ -262,30 +282,35 @@ ENABLE_TEXT_AUTOSIZING = ENABLE_TEXT_AUTOSIZING;
 
 // FIXME: Remove the USE_INTERNAL_SDK condition once we support touch events when building for iOS with
 // the public SDK. See <https://webkit.org/b/179167>.
-ENABLE_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
+ENABLE_TOUCH_EVENTS = $(ENABLE_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
 
 ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL;
 
 ENABLE_USER_MESSAGE_HANDLERS = ENABLE_USER_MESSAGE_HANDLERS;
 
-ENABLE_VARIATION_FONTS[sdk=iphone*] = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
+ENABLE_VARIATION_FONTS = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
 ENABLE_VARIATION_FONTS_iphoneos = ENABLE_VARIATION_FONTS;
 ENABLE_VARIATION_FONTS_iphonesimulator = ENABLE_VARIATION_FONTS;
-ENABLE_VARIATION_FONTS[sdk=iphoneos10*] = ;
-ENABLE_VARIATION_FONTS[sdk=iphonesimulator10*] = ;
-ENABLE_VARIATION_FONTS[sdk=macosx*] = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
+ENABLE_VARIATION_FONTS_macosx = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
 ENABLE_VARIATION_FONTS_MACOS_SINCE_1013 = ENABLE_VARIATION_FONTS;
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=iphone*] = ENABLE_VIDEO_PRESENTATION_MODE;
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_iphonesimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
 ENABLE_VIDEO_PRESENTATION_MODE_MACOS_SINCE_1012 = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 
-ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN[sdk=macosx*] = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN = $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_$(PLATFORM_NAME));
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
 
 ENABLE_WEBASSEMBLY = ;
 
@@ -293,25 +318,19 @@ ENABLE_WEBGL = ENABLE_WEBGL;
 
 ENABLE_WEBGL2 = ENABLE_WEBGL2;
 
-ENABLE_WEBGPU = ENABLE_WEBGPU;
-ENABLE_WEBGPU[sdk=iphonesimulator*] = ;
+ENABLE_WEBGPU = $(ENABLE_WEBGPU_$(PLATFORM_NAME));
+ENABLE_WEBGPU_iphoneos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_watchos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_appletvos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_macosx = ENABLE_WEBGPU;
 
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 
 ENABLE_WEB_AUTHN = ENABLE_WEB_AUTHN;
 
-ENABLE_WEB_RTC[sdk=watch*] = ;
-ENABLE_WEB_RTC[sdk=appletv*] = ;
-ENABLE_WEB_RTC[sdk=iphone*] = $(ENABLE_WEB_RTC_ios);
-ENABLE_WEB_RTC_ios[arch=arm64*] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios[arch=x86_64] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios_10_Production = ;
-ENABLE_WEB_RTC_ios_10_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_10_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Production = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC[sdk=macosx*] = $(ENABLE_WEB_RTC_macosx);
+ENABLE_WEB_RTC = $(ENABLE_WEB_RTC_$(PLATFORM_NAME));
+ENABLE_WEB_RTC_iphoneos = ENABLE_WEB_RTC;
+ENABLE_WEB_RTC_iphonesimulator = ENABLE_WEB_RTC;
 ENABLE_WEB_RTC_macosx[arch=x86_64] = ENABLE_WEB_RTC;
 
 ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
@@ -46,6 +46,8 @@
 //     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
 //     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
 
+// macOS
+
 WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
 WK_MACOS_BEFORE_1012_101100 = YES;
 
@@ -103,3 +105,41 @@ WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
 WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
 WK_MACOS_1015_ = _MACOS_SINCE_1015;
 WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
+
+// iOS
+
+WK_IOS_BEFORE_12 = $(WK_IOS_BEFORE_12_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_12_11 = YES;
+
+WK_IOS_BEFORE_13 = $(WK_IOS_BEFORE_13_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_13_11 = YES;
+WK_IOS_BEFORE_13_12 = YES;
+
+WK_IOS_BEFORE_14 = $(WK_IOS_BEFORE_14_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_14_11 = YES;
+WK_IOS_BEFORE_14_12 = YES;
+WK_IOS_BEFORE_14_13 = YES;
+
+WK_IOS_12 = $(WK_IOS_12_$(WK_IOS_BEFORE_12));
+WK_IOS_12_ = _IOS_SINCE_12;
+WK_IOS_12_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_13 = $(WK_IOS_12_13_$(WK_IOS_BEFORE_12));
+WK_IOS_12_13_ = $(WK_IOS_13);
+WK_IOS_12_13_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_14 = $(WK_IOS_12_14_$(WK_IOS_BEFORE_12));
+WK_IOS_12_14_ = $(WK_IOS_14);
+WK_IOS_12_14_YES = _IOS_BEFORE_12;
+
+WK_IOS_13 = $(WK_IOS_13_$(WK_IOS_BEFORE_13));
+WK_IOS_13_ = _IOS_SINCE_13;
+WK_IOS_13_YES = _IOS_BEFORE_13;
+
+WK_IOS_13_14 = $(WK_IOS_13_14_$(WK_IOS_BEFORE_13));
+WK_IOS_13_14_ = $(WK_IOS_14);
+WK_IOS_13_14_YES = _IOS_BEFORE_13;
+
+WK_IOS_14 = $(WK_IOS_14_$(WK_IOS_BEFORE_14));
+WK_IOS_14_ = _IOS_SINCE_14;
+WK_IOS_14_YES = _IOS_BEFORE_14;
index d2a3d2d..34df833 100644 (file)
@@ -1,3 +1,14 @@
+2018-03-12  Tim Horton  <timothy_horton@apple.com>
+
+        Stop using SDK conditionals to control feature definitions
+        https://bugs.webkit.org/show_bug.cgi?id=183430
+        <rdar://problem/38251619>
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/WebKitTargetConditionals.xcconfig: Renamed.
+        * Configurations/opus.xcconfig:
+
 2018-03-12  Youenn Fablet  <youenn@apple.com>
 
         Remove empty cpp files in Source/ThirdParty/libwebrtc
@@ -46,6 +46,8 @@
 //     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
 //     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
 
+// macOS
+
 WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
 WK_MACOS_BEFORE_1012_101100 = YES;
 
@@ -103,3 +105,41 @@ WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
 WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
 WK_MACOS_1015_ = _MACOS_SINCE_1015;
 WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
+
+// iOS
+
+WK_IOS_BEFORE_12 = $(WK_IOS_BEFORE_12_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_12_11 = YES;
+
+WK_IOS_BEFORE_13 = $(WK_IOS_BEFORE_13_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_13_11 = YES;
+WK_IOS_BEFORE_13_12 = YES;
+
+WK_IOS_BEFORE_14 = $(WK_IOS_BEFORE_14_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_14_11 = YES;
+WK_IOS_BEFORE_14_12 = YES;
+WK_IOS_BEFORE_14_13 = YES;
+
+WK_IOS_12 = $(WK_IOS_12_$(WK_IOS_BEFORE_12));
+WK_IOS_12_ = _IOS_SINCE_12;
+WK_IOS_12_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_13 = $(WK_IOS_12_13_$(WK_IOS_BEFORE_12));
+WK_IOS_12_13_ = $(WK_IOS_13);
+WK_IOS_12_13_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_14 = $(WK_IOS_12_14_$(WK_IOS_BEFORE_12));
+WK_IOS_12_14_ = $(WK_IOS_14);
+WK_IOS_12_14_YES = _IOS_BEFORE_12;
+
+WK_IOS_13 = $(WK_IOS_13_$(WK_IOS_BEFORE_13));
+WK_IOS_13_ = _IOS_SINCE_13;
+WK_IOS_13_YES = _IOS_BEFORE_13;
+
+WK_IOS_13_14 = $(WK_IOS_13_14_$(WK_IOS_BEFORE_13));
+WK_IOS_13_14_ = $(WK_IOS_14);
+WK_IOS_13_14_YES = _IOS_BEFORE_13;
+
+WK_IOS_14 = $(WK_IOS_14_$(WK_IOS_BEFORE_14));
+WK_IOS_14_ = _IOS_SINCE_14;
+WK_IOS_14_YES = _IOS_BEFORE_14;
diff --git a/Source/ThirdParty/libwebrtc/Configurations/macOSTargetConditionals.xcconfig b/Source/ThirdParty/libwebrtc/Configurations/macOSTargetConditionals.xcconfig
deleted file mode 100644 (file)
index 75e4862..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-// Use the following helpers to define build settings whose value depends on the target
-// macOS version in a succinct and future-proof way.
-//
-// Example 1: To give the SMOOTHNESS build setting the value 3 in macOS 10.12 and later and the
-// value 2 in earlier versions, write:
-//
-//     SMOOTHNESS = $(SMOOTHNESS$(WK_MACOS_1012));
-//     SMOOTHNESS_MACOS_BEFORE_1012 = 2;
-//     SMOOTHNESS_MACOS_SINCE_1012 = 3;
-//
-// Example 2: To define ENABLE_COLOR to ENABLE_COLOR in all platforms except macOS 10.12 and
-// earlier write:
-//
-//     ENABLE_COLOR = ENABLE_COLOR;
-//     ENABLE_COLOR[sdk=macosx*] = $(ENABLE_COLOR$(WK_MACOS_1013));
-//     ENABLE_COLOR_MACOS_SINCE_1013 = $(ENABLE_COLOR);
-//
-// Example 3: To give EXTRA_PATH one value before macOS 10.12, another value in macOS 10.12 and
-// macOS 10.13, and a third value in macOS 10.14 and later, write:
-//
-//     EXTRA_PATH = $(EXTRA_PATH$(WK_MACOS_1012_1014));
-//     EXTRA_PATH_MACOS_BEFORE_1012 = "/Library/Application Support/WebKit";
-//     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
-//     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
-
-WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1012_101100 = YES;
-
-WK_MACOS_BEFORE_1013 = $(WK_MACOS_BEFORE_1013_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1013_101100 = YES;
-WK_MACOS_BEFORE_1013_101200 = YES;
-
-WK_MACOS_BEFORE_1014 = $(WK_MACOS_BEFORE_1014_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1014_101100 = YES;
-WK_MACOS_BEFORE_1014_101200 = YES;
-WK_MACOS_BEFORE_1014_101300 = YES;
-
-WK_MACOS_BEFORE_1015 = $(WK_MACOS_BEFORE_1015_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1015_101100 = YES;
-WK_MACOS_BEFORE_1015_101200 = YES;
-WK_MACOS_BEFORE_1015_101300 = YES;
-WK_MACOS_BEFORE_1015_101400 = YES;
-
-WK_MACOS_1012 = $(WK_MACOS_1012_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_ = _MACOS_SINCE_1012;
-WK_MACOS_1012_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1012_1013 = $(WK_MACOS_1012_1013_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_1013_ = $(WK_MACOS_1013);
-WK_MACOS_1012_1013_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1012_1014 = $(WK_MACOS_1012_1014_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_1014_ = $(WK_MACOS_1014);
-WK_MACOS_1012_1014_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1012_1015 = $(WK_MACOS_1012_1015_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_1015_ = $(WK_MACOS_1015);
-WK_MACOS_1012_1015_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1013 = $(WK_MACOS_1013_$(WK_MACOS_BEFORE_1013));
-WK_MACOS_1013_ = _MACOS_SINCE_1013;
-WK_MACOS_1013_YES = _MACOS_BEFORE_1013;
-
-WK_MACOS_1013_1014 = $(WK_MACOS_1013_1014_$(WK_MACOS_BEFORE_1013));
-WK_MACOS_1013_1014_ = $(WK_MACOS_1014);
-WK_MACOS_1013_1014_YES = _MACOS_BEFORE_1013;
-
-WK_MACOS_1013_1015 = $(WK_MACOS_1013_1015_$(WK_MACOS_BEFORE_1013));
-WK_MACOS_1013_1015_ = $(WK_MACOS_1015);
-WK_MACOS_1013_1015_YES = _MACOS_BEFORE_1013;
-
-WK_MACOS_1014 = $(WK_MACOS_1014_$(WK_MACOS_BEFORE_1014));
-WK_MACOS_1014_ = _MACOS_SINCE_1014;
-WK_MACOS_1014_YES = _MACOS_BEFORE_1014;
-
-WK_MACOS_1014_1015 = $(WK_MACOS_1014_1015_$(WK_MACOS_BEFORE_1014));
-WK_MACOS_1014_1015_ = $(WK_MACOS_1015);
-WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
-
-WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
-WK_MACOS_1015_ = _MACOS_SINCE_1015;
-WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
index 5225a60..8f0f8b7 100644 (file)
@@ -1,4 +1,4 @@
-#include "macOSTargetConditionals.xcconfig"
+#include "WebKitTargetConditionals.xcconfig"
 
 PRODUCT_NAME = opus;
 
index 8ef25bf..39ea499 100644 (file)
@@ -1,3 +1,14 @@
+2018-03-12  Tim Horton  <timothy_horton@apple.com>
+
+        Stop using SDK conditionals to control feature definitions
+        https://bugs.webkit.org/show_bug.cgi?id=183430
+        <rdar://problem/38251619>
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/FeatureDefines.xcconfig:
+        * Configurations/WebKitTargetConditionals.xcconfig: Renamed.
+
 2018-03-12  Chris Dumez  <cdumez@apple.com>
 
         Return boolean from DOMTokenList's replace() method
index f38453a..be4f975 100644 (file)
 
 // Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
 
-#include "macOSTargetConditionals.xcconfig"
+#include "WebKitTargetConditionals.xcconfig"
+
+WK_COCOA_TOUCH = $(WK_COCOA_TOUCH_$(PLATFORM_NAME));
+WK_COCOA_TOUCH_iphoneos = cocoatouch;
+WK_COCOA_TOUCH_iphonesimulator = cocoatouch;
+WK_COCOA_TOUCH_watchos = cocoatouch;
+WK_COCOA_TOUCH_watchsimulator = cocoatouch;
+WK_COCOA_TOUCH_appletvos = cocoatouch;
+WK_COCOA_TOUCH_appletvsimulator = cocoatouch;
 
 ENABLE_3D_TRANSFORMS = ENABLE_3D_TRANSFORMS;
 
 ENABLE_ACCELERATED_2D_CANVAS = ;
 
-ENABLE_ACCELERATED_OVERFLOW_SCROLLING[sdk=iphone*] = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING = $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING_$(WK_COCOA_TOUCH));
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING_cocoatouch = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
 
-ENABLE_APPLE_PAY[sdk=iphone*] = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_iphoneos = ENABLE_APPLE_PAY;
 ENABLE_APPLE_PAY_iphonesimulator = ENABLE_APPLE_PAY;
-ENABLE_APPLE_PAY[sdk=macosx*] = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
+ENABLE_APPLE_PAY_macosx = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
 ENABLE_APPLE_PAY_MACOS_SINCE_1012 = ENABLE_APPLE_PAY;
 
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphone*] = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY_SESSION_V3 = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_SESSION_V3_iphoneos = ENABLE_APPLE_PAY_SESSION_V3;
 ENABLE_APPLE_PAY_SESSION_V3_iphonesimulator = ENABLE_APPLE_PAY_SESSION_V3;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphoneos10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphonesimulator10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=macosx*] = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
+ENABLE_APPLE_PAY_SESSION_V3_macosx = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
 ENABLE_APPLE_PAY_SESSION_V3_MACOS_SINCE_1013 = ENABLE_APPLE_PAY_SESSION_V3;
 
 ENABLE_APPLICATION_MANIFEST = ENABLE_APPLICATION_MANIFEST;
@@ -63,10 +70,10 @@ ENABLE_CACHE_PARTITIONING = ENABLE_CACHE_PARTITIONING;
 
 ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
 
-ENABLE_CONTENT_FILTERING[sdk=appletv*] = ;
-ENABLE_CONTENT_FILTERING[sdk=watch*] = ;
-ENABLE_CONTENT_FILTERING[sdk=iphone*] = ENABLE_CONTENT_FILTERING;
-ENABLE_CONTENT_FILTERING[sdk=macosx*] = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING = $(ENABLE_CONTENT_FILTERING_$(PLATFORM_NAME));
+ENABLE_CONTENT_FILTERING_iphoneos = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_iphonesimulator = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_macosx = ENABLE_CONTENT_FILTERING;
 
 ENABLE_CSS3_TEXT = ;
 
@@ -92,78 +99,83 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
-ENABLE_DASHBOARD_SUPPORT[sdk=macosx*] = ENABLE_DASHBOARD_SUPPORT;
+ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
 ENABLE_DATACUE_VALUE = ENABLE_DATACUE_VALUE;
 
 ENABLE_DATALIST_ELEMENT = ;
 
-ENABLE_DATA_INTERACTION[sdk=iphone*] = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
+ENABLE_DATA_INTERACTION = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
 ENABLE_DATA_INTERACTION_iphoneos = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION_iphonesimulator = ENABLE_DATA_INTERACTION;
-ENABLE_DATA_INTERACTION[sdk=iphoneos10*] = ;
-ENABLE_DATA_INTERACTION[sdk=iphonesimulator10*] = ;
 
-ENABLE_DEVICE_ORIENTATION[sdk=iphone*] = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION = $(ENABLE_DEVICE_ORIENTATION_$(PLATFORM_NAME));
+ENABLE_DEVICE_ORIENTATION_iphoneos = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION_iphonesimulator = ENABLE_DEVICE_ORIENTATION;
 
-ENABLE_DRAG_SUPPORT[sdk=iphone*] = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DRAG_SUPPORT = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
 ENABLE_DRAG_SUPPORT_iphoneos = ENABLE_DRAG_SUPPORT;
 ENABLE_DRAG_SUPPORT_iphonesimulator = ENABLE_DRAG_SUPPORT;
-ENABLE_DRAG_SUPPORT[sdk=iphoneos10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=iphonesimulator10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=watch*] = ;
-ENABLE_DRAG_SUPPORT[sdk=appletv*] = ;
 
 ENABLE_ENCRYPTED_MEDIA = ENABLE_ENCRYPTED_MEDIA;
 
 ENABLE_EXTRA_ZOOM_MODE = ;
 
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphone*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios);
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphoneos10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphonesimulator10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS_ios[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios_$(USE_INTERNAL_SDK))
-ENABLE_FAST_JIT_PERMISSIONS_ios_YES = ENABLE_FAST_JIT_PERMISSIONS;
+ENABLE_FAST_JIT_PERMISSIONS = $(ENABLE_FAST_JIT_PERMISSIONS_$(PLATFORM_NAME));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_iphoneos_$(USE_INTERNAL_SDK));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos_YES = ENABLE_FAST_JIT_PERMISSIONS;
 
 ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
 
-ENABLE_FTL_JIT[sdk=macosx*] = ENABLE_FTL_JIT;
-ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT = $(ENABLE_FTL_JIT_$(PLATFORM_NAME))
+ENABLE_FTL_JIT_macosx = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT_iphoneos = ENABLE_FTL_JIT;
 
-ENABLE_FULLSCREEN_API[sdk=iphone*] = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
-ENABLE_FULLSCREEN_API_iphoneos = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API_iphonesimulator = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API[sdk=iphoneos10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphoneos11*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator11*] = ;
-ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
+ENABLE_FULLSCREEN_API_iphoneos = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_iphonesimulator = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_IOS_SINCE_12 = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API_macosx = ENABLE_FULLSCREEN_API;
 
-ENABLE_GAMEPAD = ENABLE_GAMEPAD;
-ENABLE_GAMEPAD[sdk=watch*] = ;
+ENABLE_GAMEPAD = $(ENABLE_GAMEPAD_$(PLATFORM_NAME));
+ENABLE_GAMEPAD_iphoneos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_iphonesimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvsimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_macosx = ENABLE_GAMEPAD;
 
 ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
 
-ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;
+ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(PLATFORM_NAME));
+ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
 
 ENABLE_INDEXED_DATABASE = ENABLE_INDEXED_DATABASE;
 
 ENABLE_INDEXED_DATABASE_IN_WORKERS = ENABLE_INDEXED_DATABASE_IN_WORKERS;
 
-ENABLE_INPUT_TYPE_COLOR[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR;
+ENABLE_INPUT_TYPE_COLOR = $(ENABLE_INPUT_TYPE_COLOR_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_macosx = ENABLE_INPUT_TYPE_COLOR;
 
-ENABLE_INPUT_TYPE_COLOR_POPOVER[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR_POPOVER;
+ENABLE_INPUT_TYPE_COLOR_POPOVER = $(ENABLE_INPUT_TYPE_COLOR_POPOVER_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_POPOVER_macosx = ENABLE_INPUT_TYPE_COLOR_POPOVER;
 
-ENABLE_INPUT_TYPE_DATETIMELOCAL[sdk=iphone*] = ENABLE_INPUT_TYPE_DATETIMELOCAL;
+ENABLE_INPUT_TYPE_DATETIMELOCAL = $(ENABLE_INPUT_TYPE_DATETIMELOCAL_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATETIMELOCAL_cocoatouch = ENABLE_INPUT_TYPE_DATETIMELOCAL;
 
 ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE = ;
 
-ENABLE_INPUT_TYPE_DATE[sdk=iphone*] = ENABLE_INPUT_TYPE_DATE;
+ENABLE_INPUT_TYPE_DATE = $(ENABLE_INPUT_TYPE_DATE_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATE_cocoatouch = ENABLE_INPUT_TYPE_DATE;
 
-ENABLE_INPUT_TYPE_MONTH[sdk=iphone*] = ENABLE_INPUT_TYPE_MONTH;
+ENABLE_INPUT_TYPE_MONTH = $(ENABLE_INPUT_TYPE_MONTH_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_MONTH_cocoatouch = ENABLE_INPUT_TYPE_MONTH;
 
-ENABLE_INPUT_TYPE_TIME[sdk=iphone*] = ENABLE_INPUT_TYPE_TIME;
+ENABLE_INPUT_TYPE_TIME = $(ENABLE_INPUT_TYPE_TIME_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_TIME_cocoatouch = ENABLE_INPUT_TYPE_TIME;
 
-ENABLE_INPUT_TYPE_WEEK[sdk=iphone*] = ENABLE_INPUT_TYPE_WEEK;
+ENABLE_INPUT_TYPE_WEEK = $(ENABLE_INPUT_TYPE_WEEK_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_WEEK_cocoatouch = ENABLE_INPUT_TYPE_WEEK;
 
 ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS = ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS;
 
@@ -171,12 +183,11 @@ ENABLE_INTERSECTION_OBSERVER = ENABLE_INTERSECTION_OBSERVER;
 
 ENABLE_INTL = ENABLE_INTL;
 
-ENABLE_IOS_GESTURE_EVENTS = ;
-ENABLE_IOS_GESTURE_EVENTS[sdk=iphone*] = $(ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
+ENABLE_IOS_GESTURE_EVENTS = $(ENABLE_IOS_GESTURE_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_GESTURE_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
 
-ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
+ENABLE_IOS_TOUCH_EVENTS = $(ENABLE_IOS_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
 
 ENABLE_JS_ASYNC_ITERATION = ENABLE_JS_ASYNC_ITERATION;
 
@@ -190,25 +201,27 @@ ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER = ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER;
 
 ENABLE_LEGACY_ENCRYPTED_MEDIA = ENABLE_LEGACY_ENCRYPTED_MEDIA;
 
-ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
+ENABLE_LETTERPRESS = $(ENABLE_LETTERPRESS_$(WK_COCOA_TOUCH));
+ENABLE_LETTERPRESS_cocoatouch = ENABLE_LETTERPRESS;
 
-ENABLE_MAC_GESTURE_EVENTS = ;
-ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_GESTURE_EVENTS = $(ENABLE_MAC_GESTURE_EVENTS_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
 
-ENABLE_MAC_VIDEO_TOOLBOX = ;
-ENABLE_MAC_VIDEO_TOOLBOX[sdk=macosx*] = $(ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_VIDEO_TOOLBOX = $(ENABLE_MAC_VIDEO_TOOLBOX_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_VIDEO_TOOLBOX;
 
 ENABLE_MATHML = ENABLE_MATHML;
 
-ENABLE_MEDIA_CAPTURE[sdk=iphone*] = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE = $(ENABLE_MEDIA_CAPTURE_$(PLATFORM_NAME));
+ENABLE_MEDIA_CAPTURE_iphoneos = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE_iphonesimulator = ENABLE_MEDIA_CAPTURE;
 
 ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 
 ENABLE_MEDIA_SESSION = ;
 
-ENABLE_MEDIA_SOURCE[sdk=macosx*] = ENABLE_MEDIA_SOURCE;
+ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;
 
@@ -218,19 +231,24 @@ ENABLE_METER_ELEMENT = ENABLE_METER_ELEMENT;
 
 ENABLE_MHTML = ;
 
-ENABLE_MOUSE_CURSOR_SCALE[sdk=macosx*] = ENABLE_MOUSE_CURSOR_SCALE;
+ENABLE_MOUSE_CURSOR_SCALE = $(ENABLE_MOUSE_CURSOR_SCALE_$(PLATFORM_NAME));
+ENABLE_MOUSE_CURSOR_SCALE_macosx = ENABLE_MOUSE_CURSOR_SCALE;
 
 ENABLE_NAVIGATOR_CONTENT_UTILS = ;
 
-ENABLE_NAVIGATOR_STANDALONE[sdk=iphone*] = ENABLE_NAVIGATOR_STANDALONE;
+ENABLE_NAVIGATOR_STANDALONE = $(ENABLE_NAVIGATOR_STANDALONE_$(WK_COCOA_TOUCH));
+ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE;
 
-ENABLE_NOTIFICATIONS[sdk=macosx*] = ENABLE_NOTIFICATIONS;
+ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(PLATFORM_NAME));
+ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS;
 
 ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST;
 
-ENABLE_PDFKIT_PLUGIN[sdk=macosx*] = ENABLE_PDFKIT_PLUGIN;
+ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(PLATFORM_NAME));
+ENABLE_PDFKIT_PLUGIN_macosx = ENABLE_PDFKIT_PLUGIN;
 
-ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
+ENABLE_POINTER_LOCK = $(ENABLE_POINTER_LOCK_$(PLATFORM_NAME));
+ENABLE_POINTER_LOCK_macosx = ENABLE_POINTER_LOCK;
 
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 
@@ -242,9 +260,11 @@ ENABLE_RESOLUTION_MEDIA_QUERY = ;
 
 ENABLE_RESOURCE_USAGE = ENABLE_RESOURCE_USAGE;
 
-ENABLE_RUBBER_BANDING[sdk=macosx*] = ENABLE_RUBBER_BANDING;
+ENABLE_RUBBER_BANDING = $(ENABLE_RUBBER_BANDING_$(PLATFORM_NAME));
+ENABLE_RUBBER_BANDING_macosx = ENABLE_RUBBER_BANDING;
 
-ENABLE_SERVICE_CONTROLS[sdk=macosx*] = ENABLE_SERVICE_CONTROLS;
+ENABLE_SERVICE_CONTROLS = $(ENABLE_SERVICE_CONTROLS_$(PLATFORM_NAME));
+ENABLE_SERVICE_CONTROLS_macosx = ENABLE_SERVICE_CONTROLS;
 
 ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 
@@ -262,30 +282,35 @@ ENABLE_TEXT_AUTOSIZING = ENABLE_TEXT_AUTOSIZING;
 
 // FIXME: Remove the USE_INTERNAL_SDK condition once we support touch events when building for iOS with
 // the public SDK. See <https://webkit.org/b/179167>.
-ENABLE_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
+ENABLE_TOUCH_EVENTS = $(ENABLE_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
 
 ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL;
 
 ENABLE_USER_MESSAGE_HANDLERS = ENABLE_USER_MESSAGE_HANDLERS;
 
-ENABLE_VARIATION_FONTS[sdk=iphone*] = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
+ENABLE_VARIATION_FONTS = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
 ENABLE_VARIATION_FONTS_iphoneos = ENABLE_VARIATION_FONTS;
 ENABLE_VARIATION_FONTS_iphonesimulator = ENABLE_VARIATION_FONTS;
-ENABLE_VARIATION_FONTS[sdk=iphoneos10*] = ;
-ENABLE_VARIATION_FONTS[sdk=iphonesimulator10*] = ;
-ENABLE_VARIATION_FONTS[sdk=macosx*] = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
+ENABLE_VARIATION_FONTS_macosx = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
 ENABLE_VARIATION_FONTS_MACOS_SINCE_1013 = ENABLE_VARIATION_FONTS;
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=iphone*] = ENABLE_VIDEO_PRESENTATION_MODE;
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_iphonesimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
 ENABLE_VIDEO_PRESENTATION_MODE_MACOS_SINCE_1012 = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 
-ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN[sdk=macosx*] = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN = $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_$(PLATFORM_NAME));
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
 
 ENABLE_WEBASSEMBLY = ;
 
@@ -293,25 +318,19 @@ ENABLE_WEBGL = ENABLE_WEBGL;
 
 ENABLE_WEBGL2 = ENABLE_WEBGL2;
 
-ENABLE_WEBGPU = ENABLE_WEBGPU;
-ENABLE_WEBGPU[sdk=iphonesimulator*] = ;
+ENABLE_WEBGPU = $(ENABLE_WEBGPU_$(PLATFORM_NAME));
+ENABLE_WEBGPU_iphoneos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_watchos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_appletvos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_macosx = ENABLE_WEBGPU;
 
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 
 ENABLE_WEB_AUTHN = ENABLE_WEB_AUTHN;
 
-ENABLE_WEB_RTC[sdk=watch*] = ;
-ENABLE_WEB_RTC[sdk=appletv*] = ;
-ENABLE_WEB_RTC[sdk=iphone*] = $(ENABLE_WEB_RTC_ios);
-ENABLE_WEB_RTC_ios[arch=arm64*] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios[arch=x86_64] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios_10_Production = ;
-ENABLE_WEB_RTC_ios_10_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_10_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Production = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC[sdk=macosx*] = $(ENABLE_WEB_RTC_macosx);
+ENABLE_WEB_RTC = $(ENABLE_WEB_RTC_$(PLATFORM_NAME));
+ENABLE_WEB_RTC_iphoneos = ENABLE_WEB_RTC;
+ENABLE_WEB_RTC_iphonesimulator = ENABLE_WEB_RTC;
 ENABLE_WEB_RTC_macosx[arch=x86_64] = ENABLE_WEB_RTC;
 
 ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
@@ -46,6 +46,8 @@
 //     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
 //     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
 
+// macOS
+
 WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
 WK_MACOS_BEFORE_1012_101100 = YES;
 
@@ -103,3 +105,41 @@ WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
 WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
 WK_MACOS_1015_ = _MACOS_SINCE_1015;
 WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
+
+// iOS
+
+WK_IOS_BEFORE_12 = $(WK_IOS_BEFORE_12_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_12_11 = YES;
+
+WK_IOS_BEFORE_13 = $(WK_IOS_BEFORE_13_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_13_11 = YES;
+WK_IOS_BEFORE_13_12 = YES;
+
+WK_IOS_BEFORE_14 = $(WK_IOS_BEFORE_14_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_14_11 = YES;
+WK_IOS_BEFORE_14_12 = YES;
+WK_IOS_BEFORE_14_13 = YES;
+
+WK_IOS_12 = $(WK_IOS_12_$(WK_IOS_BEFORE_12));
+WK_IOS_12_ = _IOS_SINCE_12;
+WK_IOS_12_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_13 = $(WK_IOS_12_13_$(WK_IOS_BEFORE_12));
+WK_IOS_12_13_ = $(WK_IOS_13);
+WK_IOS_12_13_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_14 = $(WK_IOS_12_14_$(WK_IOS_BEFORE_12));
+WK_IOS_12_14_ = $(WK_IOS_14);
+WK_IOS_12_14_YES = _IOS_BEFORE_12;
+
+WK_IOS_13 = $(WK_IOS_13_$(WK_IOS_BEFORE_13));
+WK_IOS_13_ = _IOS_SINCE_13;
+WK_IOS_13_YES = _IOS_BEFORE_13;
+
+WK_IOS_13_14 = $(WK_IOS_13_14_$(WK_IOS_BEFORE_13));
+WK_IOS_13_14_ = $(WK_IOS_14);
+WK_IOS_13_14_YES = _IOS_BEFORE_13;
+
+WK_IOS_14 = $(WK_IOS_14_$(WK_IOS_BEFORE_14));
+WK_IOS_14_ = _IOS_SINCE_14;
+WK_IOS_14_YES = _IOS_BEFORE_14;
index c9dcaac..d8cd3a1 100644 (file)
@@ -1,3 +1,14 @@
+2018-03-12  Tim Horton  <timothy_horton@apple.com>
+
+        Stop using SDK conditionals to control feature definitions
+        https://bugs.webkit.org/show_bug.cgi?id=183430
+        <rdar://problem/38251619>
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/FeatureDefines.xcconfig:
+        * Configurations/WebKitTargetConditionals.xcconfig: Renamed.
+
 2018-03-12  Yoav Weiss  <yoav@yoav.ws>
 
         Runtime flag for link prefetch and remove link subresource.
index f38453a..be4f975 100644 (file)
 
 // Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
 
-#include "macOSTargetConditionals.xcconfig"
+#include "WebKitTargetConditionals.xcconfig"
+
+WK_COCOA_TOUCH = $(WK_COCOA_TOUCH_$(PLATFORM_NAME));
+WK_COCOA_TOUCH_iphoneos = cocoatouch;
+WK_COCOA_TOUCH_iphonesimulator = cocoatouch;
+WK_COCOA_TOUCH_watchos = cocoatouch;
+WK_COCOA_TOUCH_watchsimulator = cocoatouch;
+WK_COCOA_TOUCH_appletvos = cocoatouch;
+WK_COCOA_TOUCH_appletvsimulator = cocoatouch;
 
 ENABLE_3D_TRANSFORMS = ENABLE_3D_TRANSFORMS;
 
 ENABLE_ACCELERATED_2D_CANVAS = ;
 
-ENABLE_ACCELERATED_OVERFLOW_SCROLLING[sdk=iphone*] = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING = $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING_$(WK_COCOA_TOUCH));
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING_cocoatouch = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
 
-ENABLE_APPLE_PAY[sdk=iphone*] = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_iphoneos = ENABLE_APPLE_PAY;
 ENABLE_APPLE_PAY_iphonesimulator = ENABLE_APPLE_PAY;
-ENABLE_APPLE_PAY[sdk=macosx*] = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
+ENABLE_APPLE_PAY_macosx = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
 ENABLE_APPLE_PAY_MACOS_SINCE_1012 = ENABLE_APPLE_PAY;
 
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphone*] = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY_SESSION_V3 = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_SESSION_V3_iphoneos = ENABLE_APPLE_PAY_SESSION_V3;
 ENABLE_APPLE_PAY_SESSION_V3_iphonesimulator = ENABLE_APPLE_PAY_SESSION_V3;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphoneos10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphonesimulator10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=macosx*] = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
+ENABLE_APPLE_PAY_SESSION_V3_macosx = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
 ENABLE_APPLE_PAY_SESSION_V3_MACOS_SINCE_1013 = ENABLE_APPLE_PAY_SESSION_V3;
 
 ENABLE_APPLICATION_MANIFEST = ENABLE_APPLICATION_MANIFEST;
@@ -63,10 +70,10 @@ ENABLE_CACHE_PARTITIONING = ENABLE_CACHE_PARTITIONING;
 
 ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
 
-ENABLE_CONTENT_FILTERING[sdk=appletv*] = ;
-ENABLE_CONTENT_FILTERING[sdk=watch*] = ;
-ENABLE_CONTENT_FILTERING[sdk=iphone*] = ENABLE_CONTENT_FILTERING;
-ENABLE_CONTENT_FILTERING[sdk=macosx*] = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING = $(ENABLE_CONTENT_FILTERING_$(PLATFORM_NAME));
+ENABLE_CONTENT_FILTERING_iphoneos = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_iphonesimulator = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_macosx = ENABLE_CONTENT_FILTERING;
 
 ENABLE_CSS3_TEXT = ;
 
@@ -92,78 +99,83 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
-ENABLE_DASHBOARD_SUPPORT[sdk=macosx*] = ENABLE_DASHBOARD_SUPPORT;
+ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
 ENABLE_DATACUE_VALUE = ENABLE_DATACUE_VALUE;
 
 ENABLE_DATALIST_ELEMENT = ;
 
-ENABLE_DATA_INTERACTION[sdk=iphone*] = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
+ENABLE_DATA_INTERACTION = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
 ENABLE_DATA_INTERACTION_iphoneos = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION_iphonesimulator = ENABLE_DATA_INTERACTION;
-ENABLE_DATA_INTERACTION[sdk=iphoneos10*] = ;
-ENABLE_DATA_INTERACTION[sdk=iphonesimulator10*] = ;
 
-ENABLE_DEVICE_ORIENTATION[sdk=iphone*] = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION = $(ENABLE_DEVICE_ORIENTATION_$(PLATFORM_NAME));
+ENABLE_DEVICE_ORIENTATION_iphoneos = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION_iphonesimulator = ENABLE_DEVICE_ORIENTATION;
 
-ENABLE_DRAG_SUPPORT[sdk=iphone*] = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DRAG_SUPPORT = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
 ENABLE_DRAG_SUPPORT_iphoneos = ENABLE_DRAG_SUPPORT;
 ENABLE_DRAG_SUPPORT_iphonesimulator = ENABLE_DRAG_SUPPORT;
-ENABLE_DRAG_SUPPORT[sdk=iphoneos10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=iphonesimulator10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=watch*] = ;
-ENABLE_DRAG_SUPPORT[sdk=appletv*] = ;
 
 ENABLE_ENCRYPTED_MEDIA = ENABLE_ENCRYPTED_MEDIA;
 
 ENABLE_EXTRA_ZOOM_MODE = ;
 
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphone*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios);
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphoneos10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphonesimulator10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS_ios[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios_$(USE_INTERNAL_SDK))
-ENABLE_FAST_JIT_PERMISSIONS_ios_YES = ENABLE_FAST_JIT_PERMISSIONS;
+ENABLE_FAST_JIT_PERMISSIONS = $(ENABLE_FAST_JIT_PERMISSIONS_$(PLATFORM_NAME));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_iphoneos_$(USE_INTERNAL_SDK));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos_YES = ENABLE_FAST_JIT_PERMISSIONS;
 
 ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
 
-ENABLE_FTL_JIT[sdk=macosx*] = ENABLE_FTL_JIT;
-ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT = $(ENABLE_FTL_JIT_$(PLATFORM_NAME))
+ENABLE_FTL_JIT_macosx = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT_iphoneos = ENABLE_FTL_JIT;
 
-ENABLE_FULLSCREEN_API[sdk=iphone*] = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
-ENABLE_FULLSCREEN_API_iphoneos = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API_iphonesimulator = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API[sdk=iphoneos10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphoneos11*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator11*] = ;
-ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
+ENABLE_FULLSCREEN_API_iphoneos = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_iphonesimulator = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_IOS_SINCE_12 = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API_macosx = ENABLE_FULLSCREEN_API;
 
-ENABLE_GAMEPAD = ENABLE_GAMEPAD;
-ENABLE_GAMEPAD[sdk=watch*] = ;
+ENABLE_GAMEPAD = $(ENABLE_GAMEPAD_$(PLATFORM_NAME));
+ENABLE_GAMEPAD_iphoneos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_iphonesimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvsimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_macosx = ENABLE_GAMEPAD;
 
 ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
 
-ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;
+ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(PLATFORM_NAME));
+ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
 
 ENABLE_INDEXED_DATABASE = ENABLE_INDEXED_DATABASE;
 
 ENABLE_INDEXED_DATABASE_IN_WORKERS = ENABLE_INDEXED_DATABASE_IN_WORKERS;
 
-ENABLE_INPUT_TYPE_COLOR[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR;
+ENABLE_INPUT_TYPE_COLOR = $(ENABLE_INPUT_TYPE_COLOR_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_macosx = ENABLE_INPUT_TYPE_COLOR;
 
-ENABLE_INPUT_TYPE_COLOR_POPOVER[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR_POPOVER;
+ENABLE_INPUT_TYPE_COLOR_POPOVER = $(ENABLE_INPUT_TYPE_COLOR_POPOVER_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_POPOVER_macosx = ENABLE_INPUT_TYPE_COLOR_POPOVER;
 
-ENABLE_INPUT_TYPE_DATETIMELOCAL[sdk=iphone*] = ENABLE_INPUT_TYPE_DATETIMELOCAL;
+ENABLE_INPUT_TYPE_DATETIMELOCAL = $(ENABLE_INPUT_TYPE_DATETIMELOCAL_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATETIMELOCAL_cocoatouch = ENABLE_INPUT_TYPE_DATETIMELOCAL;
 
 ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE = ;
 
-ENABLE_INPUT_TYPE_DATE[sdk=iphone*] = ENABLE_INPUT_TYPE_DATE;
+ENABLE_INPUT_TYPE_DATE = $(ENABLE_INPUT_TYPE_DATE_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATE_cocoatouch = ENABLE_INPUT_TYPE_DATE;
 
-ENABLE_INPUT_TYPE_MONTH[sdk=iphone*] = ENABLE_INPUT_TYPE_MONTH;
+ENABLE_INPUT_TYPE_MONTH = $(ENABLE_INPUT_TYPE_MONTH_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_MONTH_cocoatouch = ENABLE_INPUT_TYPE_MONTH;
 
-ENABLE_INPUT_TYPE_TIME[sdk=iphone*] = ENABLE_INPUT_TYPE_TIME;
+ENABLE_INPUT_TYPE_TIME = $(ENABLE_INPUT_TYPE_TIME_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_TIME_cocoatouch = ENABLE_INPUT_TYPE_TIME;
 
-ENABLE_INPUT_TYPE_WEEK[sdk=iphone*] = ENABLE_INPUT_TYPE_WEEK;
+ENABLE_INPUT_TYPE_WEEK = $(ENABLE_INPUT_TYPE_WEEK_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_WEEK_cocoatouch = ENABLE_INPUT_TYPE_WEEK;
 
 ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS = ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS;
 
@@ -171,12 +183,11 @@ ENABLE_INTERSECTION_OBSERVER = ENABLE_INTERSECTION_OBSERVER;
 
 ENABLE_INTL = ENABLE_INTL;
 
-ENABLE_IOS_GESTURE_EVENTS = ;
-ENABLE_IOS_GESTURE_EVENTS[sdk=iphone*] = $(ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
+ENABLE_IOS_GESTURE_EVENTS = $(ENABLE_IOS_GESTURE_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_GESTURE_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
 
-ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
+ENABLE_IOS_TOUCH_EVENTS = $(ENABLE_IOS_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
 
 ENABLE_JS_ASYNC_ITERATION = ENABLE_JS_ASYNC_ITERATION;
 
@@ -190,25 +201,27 @@ ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER = ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER;
 
 ENABLE_LEGACY_ENCRYPTED_MEDIA = ENABLE_LEGACY_ENCRYPTED_MEDIA;
 
-ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
+ENABLE_LETTERPRESS = $(ENABLE_LETTERPRESS_$(WK_COCOA_TOUCH));
+ENABLE_LETTERPRESS_cocoatouch = ENABLE_LETTERPRESS;
 
-ENABLE_MAC_GESTURE_EVENTS = ;
-ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_GESTURE_EVENTS = $(ENABLE_MAC_GESTURE_EVENTS_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
 
-ENABLE_MAC_VIDEO_TOOLBOX = ;
-ENABLE_MAC_VIDEO_TOOLBOX[sdk=macosx*] = $(ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_VIDEO_TOOLBOX = $(ENABLE_MAC_VIDEO_TOOLBOX_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_VIDEO_TOOLBOX;
 
 ENABLE_MATHML = ENABLE_MATHML;
 
-ENABLE_MEDIA_CAPTURE[sdk=iphone*] = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE = $(ENABLE_MEDIA_CAPTURE_$(PLATFORM_NAME));
+ENABLE_MEDIA_CAPTURE_iphoneos = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE_iphonesimulator = ENABLE_MEDIA_CAPTURE;
 
 ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 
 ENABLE_MEDIA_SESSION = ;
 
-ENABLE_MEDIA_SOURCE[sdk=macosx*] = ENABLE_MEDIA_SOURCE;
+ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;
 
@@ -218,19 +231,24 @@ ENABLE_METER_ELEMENT = ENABLE_METER_ELEMENT;
 
 ENABLE_MHTML = ;
 
-ENABLE_MOUSE_CURSOR_SCALE[sdk=macosx*] = ENABLE_MOUSE_CURSOR_SCALE;
+ENABLE_MOUSE_CURSOR_SCALE = $(ENABLE_MOUSE_CURSOR_SCALE_$(PLATFORM_NAME));
+ENABLE_MOUSE_CURSOR_SCALE_macosx = ENABLE_MOUSE_CURSOR_SCALE;
 
 ENABLE_NAVIGATOR_CONTENT_UTILS = ;
 
-ENABLE_NAVIGATOR_STANDALONE[sdk=iphone*] = ENABLE_NAVIGATOR_STANDALONE;
+ENABLE_NAVIGATOR_STANDALONE = $(ENABLE_NAVIGATOR_STANDALONE_$(WK_COCOA_TOUCH));
+ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE;
 
-ENABLE_NOTIFICATIONS[sdk=macosx*] = ENABLE_NOTIFICATIONS;
+ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(PLATFORM_NAME));
+ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS;
 
 ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST;
 
-ENABLE_PDFKIT_PLUGIN[sdk=macosx*] = ENABLE_PDFKIT_PLUGIN;
+ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(PLATFORM_NAME));
+ENABLE_PDFKIT_PLUGIN_macosx = ENABLE_PDFKIT_PLUGIN;
 
-ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
+ENABLE_POINTER_LOCK = $(ENABLE_POINTER_LOCK_$(PLATFORM_NAME));
+ENABLE_POINTER_LOCK_macosx = ENABLE_POINTER_LOCK;
 
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 
@@ -242,9 +260,11 @@ ENABLE_RESOLUTION_MEDIA_QUERY = ;
 
 ENABLE_RESOURCE_USAGE = ENABLE_RESOURCE_USAGE;
 
-ENABLE_RUBBER_BANDING[sdk=macosx*] = ENABLE_RUBBER_BANDING;
+ENABLE_RUBBER_BANDING = $(ENABLE_RUBBER_BANDING_$(PLATFORM_NAME));
+ENABLE_RUBBER_BANDING_macosx = ENABLE_RUBBER_BANDING;
 
-ENABLE_SERVICE_CONTROLS[sdk=macosx*] = ENABLE_SERVICE_CONTROLS;
+ENABLE_SERVICE_CONTROLS = $(ENABLE_SERVICE_CONTROLS_$(PLATFORM_NAME));
+ENABLE_SERVICE_CONTROLS_macosx = ENABLE_SERVICE_CONTROLS;
 
 ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 
@@ -262,30 +282,35 @@ ENABLE_TEXT_AUTOSIZING = ENABLE_TEXT_AUTOSIZING;
 
 // FIXME: Remove the USE_INTERNAL_SDK condition once we support touch events when building for iOS with
 // the public SDK. See <https://webkit.org/b/179167>.
-ENABLE_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
+ENABLE_TOUCH_EVENTS = $(ENABLE_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
 
 ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL;
 
 ENABLE_USER_MESSAGE_HANDLERS = ENABLE_USER_MESSAGE_HANDLERS;
 
-ENABLE_VARIATION_FONTS[sdk=iphone*] = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
+ENABLE_VARIATION_FONTS = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
 ENABLE_VARIATION_FONTS_iphoneos = ENABLE_VARIATION_FONTS;
 ENABLE_VARIATION_FONTS_iphonesimulator = ENABLE_VARIATION_FONTS;
-ENABLE_VARIATION_FONTS[sdk=iphoneos10*] = ;
-ENABLE_VARIATION_FONTS[sdk=iphonesimulator10*] = ;
-ENABLE_VARIATION_FONTS[sdk=macosx*] = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
+ENABLE_VARIATION_FONTS_macosx = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
 ENABLE_VARIATION_FONTS_MACOS_SINCE_1013 = ENABLE_VARIATION_FONTS;
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=iphone*] = ENABLE_VIDEO_PRESENTATION_MODE;
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_iphonesimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
 ENABLE_VIDEO_PRESENTATION_MODE_MACOS_SINCE_1012 = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 
-ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN[sdk=macosx*] = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN = $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_$(PLATFORM_NAME));
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
 
 ENABLE_WEBASSEMBLY = ;
 
@@ -293,25 +318,19 @@ ENABLE_WEBGL = ENABLE_WEBGL;
 
 ENABLE_WEBGL2 = ENABLE_WEBGL2;
 
-ENABLE_WEBGPU = ENABLE_WEBGPU;
-ENABLE_WEBGPU[sdk=iphonesimulator*] = ;
+ENABLE_WEBGPU = $(ENABLE_WEBGPU_$(PLATFORM_NAME));
+ENABLE_WEBGPU_iphoneos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_watchos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_appletvos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_macosx = ENABLE_WEBGPU;
 
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 
 ENABLE_WEB_AUTHN = ENABLE_WEB_AUTHN;
 
-ENABLE_WEB_RTC[sdk=watch*] = ;
-ENABLE_WEB_RTC[sdk=appletv*] = ;
-ENABLE_WEB_RTC[sdk=iphone*] = $(ENABLE_WEB_RTC_ios);
-ENABLE_WEB_RTC_ios[arch=arm64*] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios[arch=x86_64] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios_10_Production = ;
-ENABLE_WEB_RTC_ios_10_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_10_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Production = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC[sdk=macosx*] = $(ENABLE_WEB_RTC_macosx);
+ENABLE_WEB_RTC = $(ENABLE_WEB_RTC_$(PLATFORM_NAME));
+ENABLE_WEB_RTC_iphoneos = ENABLE_WEB_RTC;
+ENABLE_WEB_RTC_iphonesimulator = ENABLE_WEB_RTC;
 ENABLE_WEB_RTC_macosx[arch=x86_64] = ENABLE_WEB_RTC;
 
 ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
@@ -46,6 +46,8 @@
 //     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
 //     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
 
+// macOS
+
 WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
 WK_MACOS_BEFORE_1012_101100 = YES;
 
@@ -103,3 +105,41 @@ WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
 WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
 WK_MACOS_1015_ = _MACOS_SINCE_1015;
 WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
+
+// iOS
+
+WK_IOS_BEFORE_12 = $(WK_IOS_BEFORE_12_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_12_11 = YES;
+
+WK_IOS_BEFORE_13 = $(WK_IOS_BEFORE_13_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_13_11 = YES;
+WK_IOS_BEFORE_13_12 = YES;
+
+WK_IOS_BEFORE_14 = $(WK_IOS_BEFORE_14_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_14_11 = YES;
+WK_IOS_BEFORE_14_12 = YES;
+WK_IOS_BEFORE_14_13 = YES;
+
+WK_IOS_12 = $(WK_IOS_12_$(WK_IOS_BEFORE_12));
+WK_IOS_12_ = _IOS_SINCE_12;
+WK_IOS_12_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_13 = $(WK_IOS_12_13_$(WK_IOS_BEFORE_12));
+WK_IOS_12_13_ = $(WK_IOS_13);
+WK_IOS_12_13_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_14 = $(WK_IOS_12_14_$(WK_IOS_BEFORE_12));
+WK_IOS_12_14_ = $(WK_IOS_14);
+WK_IOS_12_14_YES = _IOS_BEFORE_12;
+
+WK_IOS_13 = $(WK_IOS_13_$(WK_IOS_BEFORE_13));
+WK_IOS_13_ = _IOS_SINCE_13;
+WK_IOS_13_YES = _IOS_BEFORE_13;
+
+WK_IOS_13_14 = $(WK_IOS_13_14_$(WK_IOS_BEFORE_13));
+WK_IOS_13_14_ = $(WK_IOS_14);
+WK_IOS_13_14_YES = _IOS_BEFORE_13;
+
+WK_IOS_14 = $(WK_IOS_14_$(WK_IOS_BEFORE_14));
+WK_IOS_14_ = _IOS_SINCE_14;
+WK_IOS_14_YES = _IOS_BEFORE_14;
index 19bd204..3d94412 100644 (file)
@@ -1,3 +1,14 @@
+2018-03-12  Tim Horton  <timothy_horton@apple.com>
+
+        Stop using SDK conditionals to control feature definitions
+        https://bugs.webkit.org/show_bug.cgi?id=183430
+        <rdar://problem/38251619>
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/FeatureDefines.xcconfig:
+        * Configurations/WebKitTargetConditionals.xcconfig: Renamed.
+
 2018-03-12  Yoav Weiss  <yoav@yoav.ws>
 
         Runtime flag for link prefetch and remove link subresource.
index f38453a..be4f975 100644 (file)
 
 // Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
 
-#include "macOSTargetConditionals.xcconfig"
+#include "WebKitTargetConditionals.xcconfig"
+
+WK_COCOA_TOUCH = $(WK_COCOA_TOUCH_$(PLATFORM_NAME));
+WK_COCOA_TOUCH_iphoneos = cocoatouch;
+WK_COCOA_TOUCH_iphonesimulator = cocoatouch;
+WK_COCOA_TOUCH_watchos = cocoatouch;
+WK_COCOA_TOUCH_watchsimulator = cocoatouch;
+WK_COCOA_TOUCH_appletvos = cocoatouch;
+WK_COCOA_TOUCH_appletvsimulator = cocoatouch;
 
 ENABLE_3D_TRANSFORMS = ENABLE_3D_TRANSFORMS;
 
 ENABLE_ACCELERATED_2D_CANVAS = ;
 
-ENABLE_ACCELERATED_OVERFLOW_SCROLLING[sdk=iphone*] = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING = $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING_$(WK_COCOA_TOUCH));
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING_cocoatouch = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
 
-ENABLE_APPLE_PAY[sdk=iphone*] = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_iphoneos = ENABLE_APPLE_PAY;
 ENABLE_APPLE_PAY_iphonesimulator = ENABLE_APPLE_PAY;
-ENABLE_APPLE_PAY[sdk=macosx*] = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
+ENABLE_APPLE_PAY_macosx = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
 ENABLE_APPLE_PAY_MACOS_SINCE_1012 = ENABLE_APPLE_PAY;
 
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphone*] = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY_SESSION_V3 = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_SESSION_V3_iphoneos = ENABLE_APPLE_PAY_SESSION_V3;
 ENABLE_APPLE_PAY_SESSION_V3_iphonesimulator = ENABLE_APPLE_PAY_SESSION_V3;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphoneos10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphonesimulator10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=macosx*] = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
+ENABLE_APPLE_PAY_SESSION_V3_macosx = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
 ENABLE_APPLE_PAY_SESSION_V3_MACOS_SINCE_1013 = ENABLE_APPLE_PAY_SESSION_V3;
 
 ENABLE_APPLICATION_MANIFEST = ENABLE_APPLICATION_MANIFEST;
@@ -63,10 +70,10 @@ ENABLE_CACHE_PARTITIONING = ENABLE_CACHE_PARTITIONING;
 
 ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
 
-ENABLE_CONTENT_FILTERING[sdk=appletv*] = ;
-ENABLE_CONTENT_FILTERING[sdk=watch*] = ;
-ENABLE_CONTENT_FILTERING[sdk=iphone*] = ENABLE_CONTENT_FILTERING;
-ENABLE_CONTENT_FILTERING[sdk=macosx*] = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING = $(ENABLE_CONTENT_FILTERING_$(PLATFORM_NAME));
+ENABLE_CONTENT_FILTERING_iphoneos = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_iphonesimulator = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_macosx = ENABLE_CONTENT_FILTERING;
 
 ENABLE_CSS3_TEXT = ;
 
@@ -92,78 +99,83 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
-ENABLE_DASHBOARD_SUPPORT[sdk=macosx*] = ENABLE_DASHBOARD_SUPPORT;
+ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
 ENABLE_DATACUE_VALUE = ENABLE_DATACUE_VALUE;
 
 ENABLE_DATALIST_ELEMENT = ;
 
-ENABLE_DATA_INTERACTION[sdk=iphone*] = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
+ENABLE_DATA_INTERACTION = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
 ENABLE_DATA_INTERACTION_iphoneos = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION_iphonesimulator = ENABLE_DATA_INTERACTION;
-ENABLE_DATA_INTERACTION[sdk=iphoneos10*] = ;
-ENABLE_DATA_INTERACTION[sdk=iphonesimulator10*] = ;
 
-ENABLE_DEVICE_ORIENTATION[sdk=iphone*] = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION = $(ENABLE_DEVICE_ORIENTATION_$(PLATFORM_NAME));
+ENABLE_DEVICE_ORIENTATION_iphoneos = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION_iphonesimulator = ENABLE_DEVICE_ORIENTATION;
 
-ENABLE_DRAG_SUPPORT[sdk=iphone*] = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DRAG_SUPPORT = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
 ENABLE_DRAG_SUPPORT_iphoneos = ENABLE_DRAG_SUPPORT;
 ENABLE_DRAG_SUPPORT_iphonesimulator = ENABLE_DRAG_SUPPORT;
-ENABLE_DRAG_SUPPORT[sdk=iphoneos10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=iphonesimulator10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=watch*] = ;
-ENABLE_DRAG_SUPPORT[sdk=appletv*] = ;
 
 ENABLE_ENCRYPTED_MEDIA = ENABLE_ENCRYPTED_MEDIA;
 
 ENABLE_EXTRA_ZOOM_MODE = ;
 
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphone*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios);
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphoneos10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphonesimulator10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS_ios[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios_$(USE_INTERNAL_SDK))
-ENABLE_FAST_JIT_PERMISSIONS_ios_YES = ENABLE_FAST_JIT_PERMISSIONS;
+ENABLE_FAST_JIT_PERMISSIONS = $(ENABLE_FAST_JIT_PERMISSIONS_$(PLATFORM_NAME));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_iphoneos_$(USE_INTERNAL_SDK));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos_YES = ENABLE_FAST_JIT_PERMISSIONS;
 
 ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
 
-ENABLE_FTL_JIT[sdk=macosx*] = ENABLE_FTL_JIT;
-ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT = $(ENABLE_FTL_JIT_$(PLATFORM_NAME))
+ENABLE_FTL_JIT_macosx = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT_iphoneos = ENABLE_FTL_JIT;
 
-ENABLE_FULLSCREEN_API[sdk=iphone*] = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
-ENABLE_FULLSCREEN_API_iphoneos = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API_iphonesimulator = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API[sdk=iphoneos10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphoneos11*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator11*] = ;
-ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
+ENABLE_FULLSCREEN_API_iphoneos = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_iphonesimulator = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_IOS_SINCE_12 = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API_macosx = ENABLE_FULLSCREEN_API;
 
-ENABLE_GAMEPAD = ENABLE_GAMEPAD;
-ENABLE_GAMEPAD[sdk=watch*] = ;
+ENABLE_GAMEPAD = $(ENABLE_GAMEPAD_$(PLATFORM_NAME));
+ENABLE_GAMEPAD_iphoneos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_iphonesimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvsimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_macosx = ENABLE_GAMEPAD;
 
 ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
 
-ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;
+ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(PLATFORM_NAME));
+ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
 
 ENABLE_INDEXED_DATABASE = ENABLE_INDEXED_DATABASE;
 
 ENABLE_INDEXED_DATABASE_IN_WORKERS = ENABLE_INDEXED_DATABASE_IN_WORKERS;
 
-ENABLE_INPUT_TYPE_COLOR[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR;
+ENABLE_INPUT_TYPE_COLOR = $(ENABLE_INPUT_TYPE_COLOR_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_macosx = ENABLE_INPUT_TYPE_COLOR;
 
-ENABLE_INPUT_TYPE_COLOR_POPOVER[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR_POPOVER;
+ENABLE_INPUT_TYPE_COLOR_POPOVER = $(ENABLE_INPUT_TYPE_COLOR_POPOVER_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_POPOVER_macosx = ENABLE_INPUT_TYPE_COLOR_POPOVER;
 
-ENABLE_INPUT_TYPE_DATETIMELOCAL[sdk=iphone*] = ENABLE_INPUT_TYPE_DATETIMELOCAL;
+ENABLE_INPUT_TYPE_DATETIMELOCAL = $(ENABLE_INPUT_TYPE_DATETIMELOCAL_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATETIMELOCAL_cocoatouch = ENABLE_INPUT_TYPE_DATETIMELOCAL;
 
 ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE = ;
 
-ENABLE_INPUT_TYPE_DATE[sdk=iphone*] = ENABLE_INPUT_TYPE_DATE;
+ENABLE_INPUT_TYPE_DATE = $(ENABLE_INPUT_TYPE_DATE_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATE_cocoatouch = ENABLE_INPUT_TYPE_DATE;
 
-ENABLE_INPUT_TYPE_MONTH[sdk=iphone*] = ENABLE_INPUT_TYPE_MONTH;
+ENABLE_INPUT_TYPE_MONTH = $(ENABLE_INPUT_TYPE_MONTH_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_MONTH_cocoatouch = ENABLE_INPUT_TYPE_MONTH;
 
-ENABLE_INPUT_TYPE_TIME[sdk=iphone*] = ENABLE_INPUT_TYPE_TIME;
+ENABLE_INPUT_TYPE_TIME = $(ENABLE_INPUT_TYPE_TIME_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_TIME_cocoatouch = ENABLE_INPUT_TYPE_TIME;
 
-ENABLE_INPUT_TYPE_WEEK[sdk=iphone*] = ENABLE_INPUT_TYPE_WEEK;
+ENABLE_INPUT_TYPE_WEEK = $(ENABLE_INPUT_TYPE_WEEK_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_WEEK_cocoatouch = ENABLE_INPUT_TYPE_WEEK;
 
 ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS = ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS;
 
@@ -171,12 +183,11 @@ ENABLE_INTERSECTION_OBSERVER = ENABLE_INTERSECTION_OBSERVER;
 
 ENABLE_INTL = ENABLE_INTL;
 
-ENABLE_IOS_GESTURE_EVENTS = ;
-ENABLE_IOS_GESTURE_EVENTS[sdk=iphone*] = $(ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
+ENABLE_IOS_GESTURE_EVENTS = $(ENABLE_IOS_GESTURE_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_GESTURE_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
 
-ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
+ENABLE_IOS_TOUCH_EVENTS = $(ENABLE_IOS_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
 
 ENABLE_JS_ASYNC_ITERATION = ENABLE_JS_ASYNC_ITERATION;
 
@@ -190,25 +201,27 @@ ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER = ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER;
 
 ENABLE_LEGACY_ENCRYPTED_MEDIA = ENABLE_LEGACY_ENCRYPTED_MEDIA;
 
-ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
+ENABLE_LETTERPRESS = $(ENABLE_LETTERPRESS_$(WK_COCOA_TOUCH));
+ENABLE_LETTERPRESS_cocoatouch = ENABLE_LETTERPRESS;
 
-ENABLE_MAC_GESTURE_EVENTS = ;
-ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_GESTURE_EVENTS = $(ENABLE_MAC_GESTURE_EVENTS_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
 
-ENABLE_MAC_VIDEO_TOOLBOX = ;
-ENABLE_MAC_VIDEO_TOOLBOX[sdk=macosx*] = $(ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_VIDEO_TOOLBOX = $(ENABLE_MAC_VIDEO_TOOLBOX_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_VIDEO_TOOLBOX;
 
 ENABLE_MATHML = ENABLE_MATHML;
 
-ENABLE_MEDIA_CAPTURE[sdk=iphone*] = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE = $(ENABLE_MEDIA_CAPTURE_$(PLATFORM_NAME));
+ENABLE_MEDIA_CAPTURE_iphoneos = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE_iphonesimulator = ENABLE_MEDIA_CAPTURE;
 
 ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 
 ENABLE_MEDIA_SESSION = ;
 
-ENABLE_MEDIA_SOURCE[sdk=macosx*] = ENABLE_MEDIA_SOURCE;
+ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;
 
@@ -218,19 +231,24 @@ ENABLE_METER_ELEMENT = ENABLE_METER_ELEMENT;
 
 ENABLE_MHTML = ;
 
-ENABLE_MOUSE_CURSOR_SCALE[sdk=macosx*] = ENABLE_MOUSE_CURSOR_SCALE;
+ENABLE_MOUSE_CURSOR_SCALE = $(ENABLE_MOUSE_CURSOR_SCALE_$(PLATFORM_NAME));
+ENABLE_MOUSE_CURSOR_SCALE_macosx = ENABLE_MOUSE_CURSOR_SCALE;
 
 ENABLE_NAVIGATOR_CONTENT_UTILS = ;
 
-ENABLE_NAVIGATOR_STANDALONE[sdk=iphone*] = ENABLE_NAVIGATOR_STANDALONE;
+ENABLE_NAVIGATOR_STANDALONE = $(ENABLE_NAVIGATOR_STANDALONE_$(WK_COCOA_TOUCH));
+ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE;
 
-ENABLE_NOTIFICATIONS[sdk=macosx*] = ENABLE_NOTIFICATIONS;
+ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(PLATFORM_NAME));
+ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS;
 
 ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST;
 
-ENABLE_PDFKIT_PLUGIN[sdk=macosx*] = ENABLE_PDFKIT_PLUGIN;
+ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(PLATFORM_NAME));
+ENABLE_PDFKIT_PLUGIN_macosx = ENABLE_PDFKIT_PLUGIN;
 
-ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
+ENABLE_POINTER_LOCK = $(ENABLE_POINTER_LOCK_$(PLATFORM_NAME));
+ENABLE_POINTER_LOCK_macosx = ENABLE_POINTER_LOCK;
 
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 
@@ -242,9 +260,11 @@ ENABLE_RESOLUTION_MEDIA_QUERY = ;
 
 ENABLE_RESOURCE_USAGE = ENABLE_RESOURCE_USAGE;
 
-ENABLE_RUBBER_BANDING[sdk=macosx*] = ENABLE_RUBBER_BANDING;
+ENABLE_RUBBER_BANDING = $(ENABLE_RUBBER_BANDING_$(PLATFORM_NAME));
+ENABLE_RUBBER_BANDING_macosx = ENABLE_RUBBER_BANDING;
 
-ENABLE_SERVICE_CONTROLS[sdk=macosx*] = ENABLE_SERVICE_CONTROLS;
+ENABLE_SERVICE_CONTROLS = $(ENABLE_SERVICE_CONTROLS_$(PLATFORM_NAME));
+ENABLE_SERVICE_CONTROLS_macosx = ENABLE_SERVICE_CONTROLS;
 
 ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 
@@ -262,30 +282,35 @@ ENABLE_TEXT_AUTOSIZING = ENABLE_TEXT_AUTOSIZING;
 
 // FIXME: Remove the USE_INTERNAL_SDK condition once we support touch events when building for iOS with
 // the public SDK. See <https://webkit.org/b/179167>.
-ENABLE_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
+ENABLE_TOUCH_EVENTS = $(ENABLE_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
 
 ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL;
 
 ENABLE_USER_MESSAGE_HANDLERS = ENABLE_USER_MESSAGE_HANDLERS;
 
-ENABLE_VARIATION_FONTS[sdk=iphone*] = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
+ENABLE_VARIATION_FONTS = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
 ENABLE_VARIATION_FONTS_iphoneos = ENABLE_VARIATION_FONTS;
 ENABLE_VARIATION_FONTS_iphonesimulator = ENABLE_VARIATION_FONTS;
-ENABLE_VARIATION_FONTS[sdk=iphoneos10*] = ;
-ENABLE_VARIATION_FONTS[sdk=iphonesimulator10*] = ;
-ENABLE_VARIATION_FONTS[sdk=macosx*] = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
+ENABLE_VARIATION_FONTS_macosx = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
 ENABLE_VARIATION_FONTS_MACOS_SINCE_1013 = ENABLE_VARIATION_FONTS;
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=iphone*] = ENABLE_VIDEO_PRESENTATION_MODE;
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_iphonesimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
 ENABLE_VIDEO_PRESENTATION_MODE_MACOS_SINCE_1012 = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 
-ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN[sdk=macosx*] = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN = $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_$(PLATFORM_NAME));
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
 
 ENABLE_WEBASSEMBLY = ;
 
@@ -293,25 +318,19 @@ ENABLE_WEBGL = ENABLE_WEBGL;
 
 ENABLE_WEBGL2 = ENABLE_WEBGL2;
 
-ENABLE_WEBGPU = ENABLE_WEBGPU;
-ENABLE_WEBGPU[sdk=iphonesimulator*] = ;
+ENABLE_WEBGPU = $(ENABLE_WEBGPU_$(PLATFORM_NAME));
+ENABLE_WEBGPU_iphoneos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_watchos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_appletvos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_macosx = ENABLE_WEBGPU;
 
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 
 ENABLE_WEB_AUTHN = ENABLE_WEB_AUTHN;
 
-ENABLE_WEB_RTC[sdk=watch*] = ;
-ENABLE_WEB_RTC[sdk=appletv*] = ;
-ENABLE_WEB_RTC[sdk=iphone*] = $(ENABLE_WEB_RTC_ios);
-ENABLE_WEB_RTC_ios[arch=arm64*] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios[arch=x86_64] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios_10_Production = ;
-ENABLE_WEB_RTC_ios_10_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_10_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Production = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC[sdk=macosx*] = $(ENABLE_WEB_RTC_macosx);
+ENABLE_WEB_RTC = $(ENABLE_WEB_RTC_$(PLATFORM_NAME));
+ENABLE_WEB_RTC_iphoneos = ENABLE_WEB_RTC;
+ENABLE_WEB_RTC_iphonesimulator = ENABLE_WEB_RTC;
 ENABLE_WEB_RTC_macosx[arch=x86_64] = ENABLE_WEB_RTC;
 
 ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
diff --git a/Source/WebKit/Configurations/WebKitTargetConditionals.xcconfig b/Source/WebKit/Configurations/WebKitTargetConditionals.xcconfig
new file mode 100644 (file)
index 0000000..6111fed
--- /dev/null
@@ -0,0 +1,145 @@
+// Copyright (C) 2018 Apple Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+//    notice, this list of conditions and the following disclaimer in the
+//    documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Use the following helpers to define build settings whose value depends on the target
+// macOS version in a succinct and future-proof way.
+//
+// Example 1: To give the SMOOTHNESS build setting the value 3 in macOS 10.12 and later and the
+// value 2 in earlier versions, write:
+//
+//     SMOOTHNESS = $(SMOOTHNESS$(WK_MACOS_1012));
+//     SMOOTHNESS_MACOS_BEFORE_1012 = 2;
+//     SMOOTHNESS_MACOS_SINCE_1012 = 3;
+//
+// Example 2: To define ENABLE_COLOR to ENABLE_COLOR in all platforms except macOS 10.12 and
+// earlier write:
+//
+//     ENABLE_COLOR = ENABLE_COLOR;
+//     ENABLE_COLOR[sdk=macosx*] = $(ENABLE_COLOR$(WK_MACOS_1013));
+//     ENABLE_COLOR_MACOS_SINCE_1013 = $(ENABLE_COLOR);
+//
+// Example 3: To give EXTRA_PATH one value before macOS 10.12, another value in macOS 10.12 and
+// macOS 10.13, and a third value in macOS 10.14 and later, write:
+//
+//     EXTRA_PATH = $(EXTRA_PATH$(WK_MACOS_1012_1014));
+//     EXTRA_PATH_MACOS_BEFORE_1012 = "/Library/Application Support/WebKit";
+//     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
+//     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
+
+// macOS
+
+WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1012_101100 = YES;
+
+WK_MACOS_BEFORE_1013 = $(WK_MACOS_BEFORE_1013_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1013_101100 = YES;
+WK_MACOS_BEFORE_1013_101200 = YES;
+
+WK_MACOS_BEFORE_1014 = $(WK_MACOS_BEFORE_1014_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1014_101100 = YES;
+WK_MACOS_BEFORE_1014_101200 = YES;
+WK_MACOS_BEFORE_1014_101300 = YES;
+
+WK_MACOS_BEFORE_1015 = $(WK_MACOS_BEFORE_1015_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1015_101100 = YES;
+WK_MACOS_BEFORE_1015_101200 = YES;
+WK_MACOS_BEFORE_1015_101300 = YES;
+WK_MACOS_BEFORE_1015_101400 = YES;
+
+WK_MACOS_1012 = $(WK_MACOS_1012_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_ = _MACOS_SINCE_1012;
+WK_MACOS_1012_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1012_1013 = $(WK_MACOS_1012_1013_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_1013_ = $(WK_MACOS_1013);
+WK_MACOS_1012_1013_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1012_1014 = $(WK_MACOS_1012_1014_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_1014_ = $(WK_MACOS_1014);
+WK_MACOS_1012_1014_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1012_1015 = $(WK_MACOS_1012_1015_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_1015_ = $(WK_MACOS_1015);
+WK_MACOS_1012_1015_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1013 = $(WK_MACOS_1013_$(WK_MACOS_BEFORE_1013));
+WK_MACOS_1013_ = _MACOS_SINCE_1013;
+WK_MACOS_1013_YES = _MACOS_BEFORE_1013;
+
+WK_MACOS_1013_1014 = $(WK_MACOS_1013_1014_$(WK_MACOS_BEFORE_1013));
+WK_MACOS_1013_1014_ = $(WK_MACOS_1014);
+WK_MACOS_1013_1014_YES = _MACOS_BEFORE_1013;
+
+WK_MACOS_1013_1015 = $(WK_MACOS_1013_1015_$(WK_MACOS_BEFORE_1013));
+WK_MACOS_1013_1015_ = $(WK_MACOS_1015);
+WK_MACOS_1013_1015_YES = _MACOS_BEFORE_1013;
+
+WK_MACOS_1014 = $(WK_MACOS_1014_$(WK_MACOS_BEFORE_1014));
+WK_MACOS_1014_ = _MACOS_SINCE_1014;
+WK_MACOS_1014_YES = _MACOS_BEFORE_1014;
+
+WK_MACOS_1014_1015 = $(WK_MACOS_1014_1015_$(WK_MACOS_BEFORE_1014));
+WK_MACOS_1014_1015_ = $(WK_MACOS_1015);
+WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
+
+WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
+WK_MACOS_1015_ = _MACOS_SINCE_1015;
+WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
+
+// iOS
+
+WK_IOS_BEFORE_12 = $(WK_IOS_BEFORE_12_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_12_11 = YES;
+
+WK_IOS_BEFORE_13 = $(WK_IOS_BEFORE_13_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_13_11 = YES;
+WK_IOS_BEFORE_13_12 = YES;
+
+WK_IOS_BEFORE_14 = $(WK_IOS_BEFORE_14_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_14_11 = YES;
+WK_IOS_BEFORE_14_12 = YES;
+WK_IOS_BEFORE_14_13 = YES;
+
+WK_IOS_12 = $(WK_IOS_12_$(WK_IOS_BEFORE_12));
+WK_IOS_12_ = _IOS_SINCE_12;
+WK_IOS_12_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_13 = $(WK_IOS_12_13_$(WK_IOS_BEFORE_12));
+WK_IOS_12_13_ = $(WK_IOS_13);
+WK_IOS_12_13_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_14 = $(WK_IOS_12_14_$(WK_IOS_BEFORE_12));
+WK_IOS_12_14_ = $(WK_IOS_14);
+WK_IOS_12_14_YES = _IOS_BEFORE_12;
+
+WK_IOS_13 = $(WK_IOS_13_$(WK_IOS_BEFORE_13));
+WK_IOS_13_ = _IOS_SINCE_13;
+WK_IOS_13_YES = _IOS_BEFORE_13;
+
+WK_IOS_13_14 = $(WK_IOS_13_14_$(WK_IOS_BEFORE_13));
+WK_IOS_13_14_ = $(WK_IOS_14);
+WK_IOS_13_14_YES = _IOS_BEFORE_13;
+
+WK_IOS_14 = $(WK_IOS_14_$(WK_IOS_BEFORE_14));
+WK_IOS_14_ = _IOS_SINCE_14;
+WK_IOS_14_YES = _IOS_BEFORE_14;
index ec6ef26..1c45b39 100644 (file)
@@ -1,3 +1,14 @@
+2018-03-12  Tim Horton  <timothy_horton@apple.com>
+
+        Stop using SDK conditionals to control feature definitions
+        https://bugs.webkit.org/show_bug.cgi?id=183430
+        <rdar://problem/38251619>
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/FeatureDefines.xcconfig:
+        * Configurations/WebKitTargetConditionals.xcconfig: Renamed.
+
 2018-03-12  Yoav Weiss  <yoav@yoav.ws>
 
         Runtime flag for link prefetch and remove link subresource.
index f38453a..be4f975 100644 (file)
 
 // Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
 
-#include "macOSTargetConditionals.xcconfig"
+#include "WebKitTargetConditionals.xcconfig"
+
+WK_COCOA_TOUCH = $(WK_COCOA_TOUCH_$(PLATFORM_NAME));
+WK_COCOA_TOUCH_iphoneos = cocoatouch;
+WK_COCOA_TOUCH_iphonesimulator = cocoatouch;
+WK_COCOA_TOUCH_watchos = cocoatouch;
+WK_COCOA_TOUCH_watchsimulator = cocoatouch;
+WK_COCOA_TOUCH_appletvos = cocoatouch;
+WK_COCOA_TOUCH_appletvsimulator = cocoatouch;
 
 ENABLE_3D_TRANSFORMS = ENABLE_3D_TRANSFORMS;
 
 ENABLE_ACCELERATED_2D_CANVAS = ;
 
-ENABLE_ACCELERATED_OVERFLOW_SCROLLING[sdk=iphone*] = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING = $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING_$(WK_COCOA_TOUCH));
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING_cocoatouch = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
 
-ENABLE_APPLE_PAY[sdk=iphone*] = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_iphoneos = ENABLE_APPLE_PAY;
 ENABLE_APPLE_PAY_iphonesimulator = ENABLE_APPLE_PAY;
-ENABLE_APPLE_PAY[sdk=macosx*] = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
+ENABLE_APPLE_PAY_macosx = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
 ENABLE_APPLE_PAY_MACOS_SINCE_1012 = ENABLE_APPLE_PAY;
 
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphone*] = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY_SESSION_V3 = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_SESSION_V3_iphoneos = ENABLE_APPLE_PAY_SESSION_V3;
 ENABLE_APPLE_PAY_SESSION_V3_iphonesimulator = ENABLE_APPLE_PAY_SESSION_V3;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphoneos10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphonesimulator10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=macosx*] = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
+ENABLE_APPLE_PAY_SESSION_V3_macosx = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
 ENABLE_APPLE_PAY_SESSION_V3_MACOS_SINCE_1013 = ENABLE_APPLE_PAY_SESSION_V3;
 
 ENABLE_APPLICATION_MANIFEST = ENABLE_APPLICATION_MANIFEST;
@@ -63,10 +70,10 @@ ENABLE_CACHE_PARTITIONING = ENABLE_CACHE_PARTITIONING;
 
 ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
 
-ENABLE_CONTENT_FILTERING[sdk=appletv*] = ;
-ENABLE_CONTENT_FILTERING[sdk=watch*] = ;
-ENABLE_CONTENT_FILTERING[sdk=iphone*] = ENABLE_CONTENT_FILTERING;
-ENABLE_CONTENT_FILTERING[sdk=macosx*] = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING = $(ENABLE_CONTENT_FILTERING_$(PLATFORM_NAME));
+ENABLE_CONTENT_FILTERING_iphoneos = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_iphonesimulator = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_macosx = ENABLE_CONTENT_FILTERING;
 
 ENABLE_CSS3_TEXT = ;
 
@@ -92,78 +99,83 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
-ENABLE_DASHBOARD_SUPPORT[sdk=macosx*] = ENABLE_DASHBOARD_SUPPORT;
+ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
 ENABLE_DATACUE_VALUE = ENABLE_DATACUE_VALUE;
 
 ENABLE_DATALIST_ELEMENT = ;
 
-ENABLE_DATA_INTERACTION[sdk=iphone*] = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
+ENABLE_DATA_INTERACTION = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
 ENABLE_DATA_INTERACTION_iphoneos = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION_iphonesimulator = ENABLE_DATA_INTERACTION;
-ENABLE_DATA_INTERACTION[sdk=iphoneos10*] = ;
-ENABLE_DATA_INTERACTION[sdk=iphonesimulator10*] = ;
 
-ENABLE_DEVICE_ORIENTATION[sdk=iphone*] = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION = $(ENABLE_DEVICE_ORIENTATION_$(PLATFORM_NAME));
+ENABLE_DEVICE_ORIENTATION_iphoneos = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION_iphonesimulator = ENABLE_DEVICE_ORIENTATION;
 
-ENABLE_DRAG_SUPPORT[sdk=iphone*] = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DRAG_SUPPORT = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
 ENABLE_DRAG_SUPPORT_iphoneos = ENABLE_DRAG_SUPPORT;
 ENABLE_DRAG_SUPPORT_iphonesimulator = ENABLE_DRAG_SUPPORT;
-ENABLE_DRAG_SUPPORT[sdk=iphoneos10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=iphonesimulator10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=watch*] = ;
-ENABLE_DRAG_SUPPORT[sdk=appletv*] = ;
 
 ENABLE_ENCRYPTED_MEDIA = ENABLE_ENCRYPTED_MEDIA;
 
 ENABLE_EXTRA_ZOOM_MODE = ;
 
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphone*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios);
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphoneos10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphonesimulator10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS_ios[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios_$(USE_INTERNAL_SDK))
-ENABLE_FAST_JIT_PERMISSIONS_ios_YES = ENABLE_FAST_JIT_PERMISSIONS;
+ENABLE_FAST_JIT_PERMISSIONS = $(ENABLE_FAST_JIT_PERMISSIONS_$(PLATFORM_NAME));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_iphoneos_$(USE_INTERNAL_SDK));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos_YES = ENABLE_FAST_JIT_PERMISSIONS;
 
 ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
 
-ENABLE_FTL_JIT[sdk=macosx*] = ENABLE_FTL_JIT;
-ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT = $(ENABLE_FTL_JIT_$(PLATFORM_NAME))
+ENABLE_FTL_JIT_macosx = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT_iphoneos = ENABLE_FTL_JIT;
 
-ENABLE_FULLSCREEN_API[sdk=iphone*] = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
-ENABLE_FULLSCREEN_API_iphoneos = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API_iphonesimulator = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API[sdk=iphoneos10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphoneos11*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator11*] = ;
-ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
+ENABLE_FULLSCREEN_API_iphoneos = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_iphonesimulator = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_IOS_SINCE_12 = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API_macosx = ENABLE_FULLSCREEN_API;
 
-ENABLE_GAMEPAD = ENABLE_GAMEPAD;
-ENABLE_GAMEPAD[sdk=watch*] = ;
+ENABLE_GAMEPAD = $(ENABLE_GAMEPAD_$(PLATFORM_NAME));
+ENABLE_GAMEPAD_iphoneos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_iphonesimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvsimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_macosx = ENABLE_GAMEPAD;
 
 ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
 
-ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;
+ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(PLATFORM_NAME));
+ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
 
 ENABLE_INDEXED_DATABASE = ENABLE_INDEXED_DATABASE;
 
 ENABLE_INDEXED_DATABASE_IN_WORKERS = ENABLE_INDEXED_DATABASE_IN_WORKERS;
 
-ENABLE_INPUT_TYPE_COLOR[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR;
+ENABLE_INPUT_TYPE_COLOR = $(ENABLE_INPUT_TYPE_COLOR_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_macosx = ENABLE_INPUT_TYPE_COLOR;
 
-ENABLE_INPUT_TYPE_COLOR_POPOVER[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR_POPOVER;
+ENABLE_INPUT_TYPE_COLOR_POPOVER = $(ENABLE_INPUT_TYPE_COLOR_POPOVER_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_POPOVER_macosx = ENABLE_INPUT_TYPE_COLOR_POPOVER;
 
-ENABLE_INPUT_TYPE_DATETIMELOCAL[sdk=iphone*] = ENABLE_INPUT_TYPE_DATETIMELOCAL;
+ENABLE_INPUT_TYPE_DATETIMELOCAL = $(ENABLE_INPUT_TYPE_DATETIMELOCAL_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATETIMELOCAL_cocoatouch = ENABLE_INPUT_TYPE_DATETIMELOCAL;
 
 ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE = ;
 
-ENABLE_INPUT_TYPE_DATE[sdk=iphone*] = ENABLE_INPUT_TYPE_DATE;
+ENABLE_INPUT_TYPE_DATE = $(ENABLE_INPUT_TYPE_DATE_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATE_cocoatouch = ENABLE_INPUT_TYPE_DATE;
 
-ENABLE_INPUT_TYPE_MONTH[sdk=iphone*] = ENABLE_INPUT_TYPE_MONTH;
+ENABLE_INPUT_TYPE_MONTH = $(ENABLE_INPUT_TYPE_MONTH_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_MONTH_cocoatouch = ENABLE_INPUT_TYPE_MONTH;
 
-ENABLE_INPUT_TYPE_TIME[sdk=iphone*] = ENABLE_INPUT_TYPE_TIME;
+ENABLE_INPUT_TYPE_TIME = $(ENABLE_INPUT_TYPE_TIME_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_TIME_cocoatouch = ENABLE_INPUT_TYPE_TIME;
 
-ENABLE_INPUT_TYPE_WEEK[sdk=iphone*] = ENABLE_INPUT_TYPE_WEEK;
+ENABLE_INPUT_TYPE_WEEK = $(ENABLE_INPUT_TYPE_WEEK_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_WEEK_cocoatouch = ENABLE_INPUT_TYPE_WEEK;
 
 ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS = ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS;
 
@@ -171,12 +183,11 @@ ENABLE_INTERSECTION_OBSERVER = ENABLE_INTERSECTION_OBSERVER;
 
 ENABLE_INTL = ENABLE_INTL;
 
-ENABLE_IOS_GESTURE_EVENTS = ;
-ENABLE_IOS_GESTURE_EVENTS[sdk=iphone*] = $(ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
+ENABLE_IOS_GESTURE_EVENTS = $(ENABLE_IOS_GESTURE_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_GESTURE_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
 
-ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
+ENABLE_IOS_TOUCH_EVENTS = $(ENABLE_IOS_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
 
 ENABLE_JS_ASYNC_ITERATION = ENABLE_JS_ASYNC_ITERATION;
 
@@ -190,25 +201,27 @@ ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER = ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER;
 
 ENABLE_LEGACY_ENCRYPTED_MEDIA = ENABLE_LEGACY_ENCRYPTED_MEDIA;
 
-ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
+ENABLE_LETTERPRESS = $(ENABLE_LETTERPRESS_$(WK_COCOA_TOUCH));
+ENABLE_LETTERPRESS_cocoatouch = ENABLE_LETTERPRESS;
 
-ENABLE_MAC_GESTURE_EVENTS = ;
-ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_GESTURE_EVENTS = $(ENABLE_MAC_GESTURE_EVENTS_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
 
-ENABLE_MAC_VIDEO_TOOLBOX = ;
-ENABLE_MAC_VIDEO_TOOLBOX[sdk=macosx*] = $(ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_VIDEO_TOOLBOX = $(ENABLE_MAC_VIDEO_TOOLBOX_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_VIDEO_TOOLBOX;
 
 ENABLE_MATHML = ENABLE_MATHML;
 
-ENABLE_MEDIA_CAPTURE[sdk=iphone*] = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE = $(ENABLE_MEDIA_CAPTURE_$(PLATFORM_NAME));
+ENABLE_MEDIA_CAPTURE_iphoneos = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE_iphonesimulator = ENABLE_MEDIA_CAPTURE;
 
 ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 
 ENABLE_MEDIA_SESSION = ;
 
-ENABLE_MEDIA_SOURCE[sdk=macosx*] = ENABLE_MEDIA_SOURCE;
+ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;
 
@@ -218,19 +231,24 @@ ENABLE_METER_ELEMENT = ENABLE_METER_ELEMENT;
 
 ENABLE_MHTML = ;
 
-ENABLE_MOUSE_CURSOR_SCALE[sdk=macosx*] = ENABLE_MOUSE_CURSOR_SCALE;
+ENABLE_MOUSE_CURSOR_SCALE = $(ENABLE_MOUSE_CURSOR_SCALE_$(PLATFORM_NAME));
+ENABLE_MOUSE_CURSOR_SCALE_macosx = ENABLE_MOUSE_CURSOR_SCALE;
 
 ENABLE_NAVIGATOR_CONTENT_UTILS = ;
 
-ENABLE_NAVIGATOR_STANDALONE[sdk=iphone*] = ENABLE_NAVIGATOR_STANDALONE;
+ENABLE_NAVIGATOR_STANDALONE = $(ENABLE_NAVIGATOR_STANDALONE_$(WK_COCOA_TOUCH));
+ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE;
 
-ENABLE_NOTIFICATIONS[sdk=macosx*] = ENABLE_NOTIFICATIONS;
+ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(PLATFORM_NAME));
+ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS;
 
 ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST;
 
-ENABLE_PDFKIT_PLUGIN[sdk=macosx*] = ENABLE_PDFKIT_PLUGIN;
+ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(PLATFORM_NAME));
+ENABLE_PDFKIT_PLUGIN_macosx = ENABLE_PDFKIT_PLUGIN;
 
-ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
+ENABLE_POINTER_LOCK = $(ENABLE_POINTER_LOCK_$(PLATFORM_NAME));
+ENABLE_POINTER_LOCK_macosx = ENABLE_POINTER_LOCK;
 
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 
@@ -242,9 +260,11 @@ ENABLE_RESOLUTION_MEDIA_QUERY = ;
 
 ENABLE_RESOURCE_USAGE = ENABLE_RESOURCE_USAGE;
 
-ENABLE_RUBBER_BANDING[sdk=macosx*] = ENABLE_RUBBER_BANDING;
+ENABLE_RUBBER_BANDING = $(ENABLE_RUBBER_BANDING_$(PLATFORM_NAME));
+ENABLE_RUBBER_BANDING_macosx = ENABLE_RUBBER_BANDING;
 
-ENABLE_SERVICE_CONTROLS[sdk=macosx*] = ENABLE_SERVICE_CONTROLS;
+ENABLE_SERVICE_CONTROLS = $(ENABLE_SERVICE_CONTROLS_$(PLATFORM_NAME));
+ENABLE_SERVICE_CONTROLS_macosx = ENABLE_SERVICE_CONTROLS;
 
 ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 
@@ -262,30 +282,35 @@ ENABLE_TEXT_AUTOSIZING = ENABLE_TEXT_AUTOSIZING;
 
 // FIXME: Remove the USE_INTERNAL_SDK condition once we support touch events when building for iOS with
 // the public SDK. See <https://webkit.org/b/179167>.
-ENABLE_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
+ENABLE_TOUCH_EVENTS = $(ENABLE_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
 
 ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL;
 
 ENABLE_USER_MESSAGE_HANDLERS = ENABLE_USER_MESSAGE_HANDLERS;
 
-ENABLE_VARIATION_FONTS[sdk=iphone*] = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
+ENABLE_VARIATION_FONTS = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
 ENABLE_VARIATION_FONTS_iphoneos = ENABLE_VARIATION_FONTS;
 ENABLE_VARIATION_FONTS_iphonesimulator = ENABLE_VARIATION_FONTS;
-ENABLE_VARIATION_FONTS[sdk=iphoneos10*] = ;
-ENABLE_VARIATION_FONTS[sdk=iphonesimulator10*] = ;
-ENABLE_VARIATION_FONTS[sdk=macosx*] = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
+ENABLE_VARIATION_FONTS_macosx = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
 ENABLE_VARIATION_FONTS_MACOS_SINCE_1013 = ENABLE_VARIATION_FONTS;
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=iphone*] = ENABLE_VIDEO_PRESENTATION_MODE;
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_iphonesimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
 ENABLE_VIDEO_PRESENTATION_MODE_MACOS_SINCE_1012 = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 
-ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN[sdk=macosx*] = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN = $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_$(PLATFORM_NAME));
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
 
 ENABLE_WEBASSEMBLY = ;
 
@@ -293,25 +318,19 @@ ENABLE_WEBGL = ENABLE_WEBGL;
 
 ENABLE_WEBGL2 = ENABLE_WEBGL2;
 
-ENABLE_WEBGPU = ENABLE_WEBGPU;
-ENABLE_WEBGPU[sdk=iphonesimulator*] = ;
+ENABLE_WEBGPU = $(ENABLE_WEBGPU_$(PLATFORM_NAME));
+ENABLE_WEBGPU_iphoneos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_watchos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_appletvos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_macosx = ENABLE_WEBGPU;
 
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 
 ENABLE_WEB_AUTHN = ENABLE_WEB_AUTHN;
 
-ENABLE_WEB_RTC[sdk=watch*] = ;
-ENABLE_WEB_RTC[sdk=appletv*] = ;
-ENABLE_WEB_RTC[sdk=iphone*] = $(ENABLE_WEB_RTC_ios);
-ENABLE_WEB_RTC_ios[arch=arm64*] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios[arch=x86_64] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios_10_Production = ;
-ENABLE_WEB_RTC_ios_10_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_10_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Production = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC[sdk=macosx*] = $(ENABLE_WEB_RTC_macosx);
+ENABLE_WEB_RTC = $(ENABLE_WEB_RTC_$(PLATFORM_NAME));
+ENABLE_WEB_RTC_iphoneos = ENABLE_WEB_RTC;
+ENABLE_WEB_RTC_iphonesimulator = ENABLE_WEB_RTC;
 ENABLE_WEB_RTC_macosx[arch=x86_64] = ENABLE_WEB_RTC;
 
 ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
diff --git a/Source/WebKitLegacy/mac/Configurations/WebKitTargetConditionals.xcconfig b/Source/WebKitLegacy/mac/Configurations/WebKitTargetConditionals.xcconfig
new file mode 100644 (file)
index 0000000..6111fed
--- /dev/null
@@ -0,0 +1,145 @@
+// Copyright (C) 2018 Apple Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+//    notice, this list of conditions and the following disclaimer in the
+//    documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Use the following helpers to define build settings whose value depends on the target
+// macOS version in a succinct and future-proof way.
+//
+// Example 1: To give the SMOOTHNESS build setting the value 3 in macOS 10.12 and later and the
+// value 2 in earlier versions, write:
+//
+//     SMOOTHNESS = $(SMOOTHNESS$(WK_MACOS_1012));
+//     SMOOTHNESS_MACOS_BEFORE_1012 = 2;
+//     SMOOTHNESS_MACOS_SINCE_1012 = 3;
+//
+// Example 2: To define ENABLE_COLOR to ENABLE_COLOR in all platforms except macOS 10.12 and
+// earlier write:
+//
+//     ENABLE_COLOR = ENABLE_COLOR;
+//     ENABLE_COLOR[sdk=macosx*] = $(ENABLE_COLOR$(WK_MACOS_1013));
+//     ENABLE_COLOR_MACOS_SINCE_1013 = $(ENABLE_COLOR);
+//
+// Example 3: To give EXTRA_PATH one value before macOS 10.12, another value in macOS 10.12 and
+// macOS 10.13, and a third value in macOS 10.14 and later, write:
+//
+//     EXTRA_PATH = $(EXTRA_PATH$(WK_MACOS_1012_1014));
+//     EXTRA_PATH_MACOS_BEFORE_1012 = "/Library/Application Support/WebKit";
+//     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
+//     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
+
+// macOS
+
+WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1012_101100 = YES;
+
+WK_MACOS_BEFORE_1013 = $(WK_MACOS_BEFORE_1013_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1013_101100 = YES;
+WK_MACOS_BEFORE_1013_101200 = YES;
+
+WK_MACOS_BEFORE_1014 = $(WK_MACOS_BEFORE_1014_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1014_101100 = YES;
+WK_MACOS_BEFORE_1014_101200 = YES;
+WK_MACOS_BEFORE_1014_101300 = YES;
+
+WK_MACOS_BEFORE_1015 = $(WK_MACOS_BEFORE_1015_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1015_101100 = YES;
+WK_MACOS_BEFORE_1015_101200 = YES;
+WK_MACOS_BEFORE_1015_101300 = YES;
+WK_MACOS_BEFORE_1015_101400 = YES;
+
+WK_MACOS_1012 = $(WK_MACOS_1012_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_ = _MACOS_SINCE_1012;
+WK_MACOS_1012_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1012_1013 = $(WK_MACOS_1012_1013_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_1013_ = $(WK_MACOS_1013);
+WK_MACOS_1012_1013_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1012_1014 = $(WK_MACOS_1012_1014_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_1014_ = $(WK_MACOS_1014);
+WK_MACOS_1012_1014_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1012_1015 = $(WK_MACOS_1012_1015_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_1015_ = $(WK_MACOS_1015);
+WK_MACOS_1012_1015_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1013 = $(WK_MACOS_1013_$(WK_MACOS_BEFORE_1013));
+WK_MACOS_1013_ = _MACOS_SINCE_1013;
+WK_MACOS_1013_YES = _MACOS_BEFORE_1013;
+
+WK_MACOS_1013_1014 = $(WK_MACOS_1013_1014_$(WK_MACOS_BEFORE_1013));
+WK_MACOS_1013_1014_ = $(WK_MACOS_1014);
+WK_MACOS_1013_1014_YES = _MACOS_BEFORE_1013;
+
+WK_MACOS_1013_1015 = $(WK_MACOS_1013_1015_$(WK_MACOS_BEFORE_1013));
+WK_MACOS_1013_1015_ = $(WK_MACOS_1015);
+WK_MACOS_1013_1015_YES = _MACOS_BEFORE_1013;
+
+WK_MACOS_1014 = $(WK_MACOS_1014_$(WK_MACOS_BEFORE_1014));
+WK_MACOS_1014_ = _MACOS_SINCE_1014;
+WK_MACOS_1014_YES = _MACOS_BEFORE_1014;
+
+WK_MACOS_1014_1015 = $(WK_MACOS_1014_1015_$(WK_MACOS_BEFORE_1014));
+WK_MACOS_1014_1015_ = $(WK_MACOS_1015);
+WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
+
+WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
+WK_MACOS_1015_ = _MACOS_SINCE_1015;
+WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
+
+// iOS
+
+WK_IOS_BEFORE_12 = $(WK_IOS_BEFORE_12_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_12_11 = YES;
+
+WK_IOS_BEFORE_13 = $(WK_IOS_BEFORE_13_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_13_11 = YES;
+WK_IOS_BEFORE_13_12 = YES;
+
+WK_IOS_BEFORE_14 = $(WK_IOS_BEFORE_14_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_14_11 = YES;
+WK_IOS_BEFORE_14_12 = YES;
+WK_IOS_BEFORE_14_13 = YES;
+
+WK_IOS_12 = $(WK_IOS_12_$(WK_IOS_BEFORE_12));
+WK_IOS_12_ = _IOS_SINCE_12;
+WK_IOS_12_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_13 = $(WK_IOS_12_13_$(WK_IOS_BEFORE_12));
+WK_IOS_12_13_ = $(WK_IOS_13);
+WK_IOS_12_13_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_14 = $(WK_IOS_12_14_$(WK_IOS_BEFORE_12));
+WK_IOS_12_14_ = $(WK_IOS_14);
+WK_IOS_12_14_YES = _IOS_BEFORE_12;
+
+WK_IOS_13 = $(WK_IOS_13_$(WK_IOS_BEFORE_13));
+WK_IOS_13_ = _IOS_SINCE_13;
+WK_IOS_13_YES = _IOS_BEFORE_13;
+
+WK_IOS_13_14 = $(WK_IOS_13_14_$(WK_IOS_BEFORE_13));
+WK_IOS_13_14_ = $(WK_IOS_14);
+WK_IOS_13_14_YES = _IOS_BEFORE_13;
+
+WK_IOS_14 = $(WK_IOS_14_$(WK_IOS_BEFORE_14));
+WK_IOS_14_ = _IOS_SINCE_14;
+WK_IOS_14_YES = _IOS_BEFORE_14;
diff --git a/Source/WebKitLegacy/mac/Configurations/macOSTargetConditionals.xcconfig b/Source/WebKitLegacy/mac/Configurations/macOSTargetConditionals.xcconfig
deleted file mode 100644 (file)
index d1c77ed..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (C) 2018 Apple Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-//    notice, this list of conditions and the following disclaimer in the
-//    documentation and/or other materials provided with the distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
-// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
-// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Use the following helpers to define build settings whose value depends on the target
-// macOS version in a succinct and future-proof way.
-//
-// Example 1: To give the SMOOTHNESS build setting the value 3 in macOS 10.12 and later and the
-// value 2 in earlier versions, write:
-//
-//     SMOOTHNESS = $(SMOOTHNESS$(WK_MACOS_1012));
-//     SMOOTHNESS_MACOS_BEFORE_1012 = 2;
-//     SMOOTHNESS_MACOS_SINCE_1012 = 3;
-//
-// Example 2: To define ENABLE_COLOR to ENABLE_COLOR in all platforms except macOS 10.12 and
-// earlier write:
-//
-//     ENABLE_COLOR = ENABLE_COLOR;
-//     ENABLE_COLOR[sdk=macosx*] = $(ENABLE_COLOR$(WK_MACOS_1013));
-//     ENABLE_COLOR_MACOS_SINCE_1013 = $(ENABLE_COLOR);
-//
-// Example 3: To give EXTRA_PATH one value before macOS 10.12, another value in macOS 10.12 and
-// macOS 10.13, and a third value in macOS 10.14 and later, write:
-//
-//     EXTRA_PATH = $(EXTRA_PATH$(WK_MACOS_1012_1014));
-//     EXTRA_PATH_MACOS_BEFORE_1012 = "/Library/Application Support/WebKit";
-//     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
-//     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
-
-WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1012_101100 = YES;
-
-WK_MACOS_BEFORE_1013 = $(WK_MACOS_BEFORE_1013_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1013_101100 = YES;
-WK_MACOS_BEFORE_1013_101200 = YES;
-
-WK_MACOS_BEFORE_1014 = $(WK_MACOS_BEFORE_1014_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1014_101100 = YES;
-WK_MACOS_BEFORE_1014_101200 = YES;
-WK_MACOS_BEFORE_1014_101300 = YES;
-
-WK_MACOS_BEFORE_1015 = $(WK_MACOS_BEFORE_1015_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1015_101100 = YES;
-WK_MACOS_BEFORE_1015_101200 = YES;
-WK_MACOS_BEFORE_1015_101300 = YES;
-WK_MACOS_BEFORE_1015_101400 = YES;
-
-WK_MACOS_1012 = $(WK_MACOS_1012_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_ = _MACOS_SINCE_1012;
-WK_MACOS_1012_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1012_1013 = $(WK_MACOS_1012_1013_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_1013_ = $(WK_MACOS_1013);
-WK_MACOS_1012_1013_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1012_1014 = $(WK_MACOS_1012_1014_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_1014_ = $(WK_MACOS_1014);
-WK_MACOS_1012_1014_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1012_1015 = $(WK_MACOS_1012_1015_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_1015_ = $(WK_MACOS_1015);
-WK_MACOS_1012_1015_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1013 = $(WK_MACOS_1013_$(WK_MACOS_BEFORE_1013));
-WK_MACOS_1013_ = _MACOS_SINCE_1013;
-WK_MACOS_1013_YES = _MACOS_BEFORE_1013;
-
-WK_MACOS_1013_1014 = $(WK_MACOS_1013_1014_$(WK_MACOS_BEFORE_1013));
-WK_MACOS_1013_1014_ = $(WK_MACOS_1014);
-WK_MACOS_1013_1014_YES = _MACOS_BEFORE_1013;
-
-WK_MACOS_1013_1015 = $(WK_MACOS_1013_1015_$(WK_MACOS_BEFORE_1013));
-WK_MACOS_1013_1015_ = $(WK_MACOS_1015);
-WK_MACOS_1013_1015_YES = _MACOS_BEFORE_1013;
-
-WK_MACOS_1014 = $(WK_MACOS_1014_$(WK_MACOS_BEFORE_1014));
-WK_MACOS_1014_ = _MACOS_SINCE_1014;
-WK_MACOS_1014_YES = _MACOS_BEFORE_1014;
-
-WK_MACOS_1014_1015 = $(WK_MACOS_1014_1015_$(WK_MACOS_BEFORE_1014));
-WK_MACOS_1014_1015_ = $(WK_MACOS_1015);
-WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
-
-WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
-WK_MACOS_1015_ = _MACOS_SINCE_1015;
-WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
index fd38440..87c8cd0 100644 (file)
@@ -1,3 +1,14 @@
+2018-03-12  Tim Horton  <timothy_horton@apple.com>
+
+        Stop using SDK conditionals to control feature definitions
+        https://bugs.webkit.org/show_bug.cgi?id=183430
+        <rdar://problem/38251619>
+
+        Reviewed by Dan Bernstein.
+
+        * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
+        * TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: Renamed.
+
 2018-03-12  Ross Kirsling  <ross.kirsling@sony.com>
 
         [DRT] TestOptions should not be ObjC.
index f38453a..be4f975 100644 (file)
 
 // Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
 
-#include "macOSTargetConditionals.xcconfig"
+#include "WebKitTargetConditionals.xcconfig"
+
+WK_COCOA_TOUCH = $(WK_COCOA_TOUCH_$(PLATFORM_NAME));
+WK_COCOA_TOUCH_iphoneos = cocoatouch;
+WK_COCOA_TOUCH_iphonesimulator = cocoatouch;
+WK_COCOA_TOUCH_watchos = cocoatouch;
+WK_COCOA_TOUCH_watchsimulator = cocoatouch;
+WK_COCOA_TOUCH_appletvos = cocoatouch;
+WK_COCOA_TOUCH_appletvsimulator = cocoatouch;
 
 ENABLE_3D_TRANSFORMS = ENABLE_3D_TRANSFORMS;
 
 ENABLE_ACCELERATED_2D_CANVAS = ;
 
-ENABLE_ACCELERATED_OVERFLOW_SCROLLING[sdk=iphone*] = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING = $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING_$(WK_COCOA_TOUCH));
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING_cocoatouch = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
 
-ENABLE_APPLE_PAY[sdk=iphone*] = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_iphoneos = ENABLE_APPLE_PAY;
 ENABLE_APPLE_PAY_iphonesimulator = ENABLE_APPLE_PAY;
-ENABLE_APPLE_PAY[sdk=macosx*] = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
+ENABLE_APPLE_PAY_macosx = $(ENABLE_APPLE_PAY$(WK_MACOS_1012));
 ENABLE_APPLE_PAY_MACOS_SINCE_1012 = ENABLE_APPLE_PAY;
 
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphone*] = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY_SESSION_V3 = $(ENABLE_APPLE_PAY_SESSION_V3_$(PLATFORM_NAME));
 ENABLE_APPLE_PAY_SESSION_V3_iphoneos = ENABLE_APPLE_PAY_SESSION_V3;
 ENABLE_APPLE_PAY_SESSION_V3_iphonesimulator = ENABLE_APPLE_PAY_SESSION_V3;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphoneos10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=iphonesimulator10*] = ;
-ENABLE_APPLE_PAY_SESSION_V3[sdk=macosx*] = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
+ENABLE_APPLE_PAY_SESSION_V3_macosx = $(ENABLE_APPLE_PAY_SESSION_V3$(WK_MACOS_1013));
 ENABLE_APPLE_PAY_SESSION_V3_MACOS_SINCE_1013 = ENABLE_APPLE_PAY_SESSION_V3;
 
 ENABLE_APPLICATION_MANIFEST = ENABLE_APPLICATION_MANIFEST;
@@ -63,10 +70,10 @@ ENABLE_CACHE_PARTITIONING = ENABLE_CACHE_PARTITIONING;
 
 ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
 
-ENABLE_CONTENT_FILTERING[sdk=appletv*] = ;
-ENABLE_CONTENT_FILTERING[sdk=watch*] = ;
-ENABLE_CONTENT_FILTERING[sdk=iphone*] = ENABLE_CONTENT_FILTERING;
-ENABLE_CONTENT_FILTERING[sdk=macosx*] = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING = $(ENABLE_CONTENT_FILTERING_$(PLATFORM_NAME));
+ENABLE_CONTENT_FILTERING_iphoneos = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_iphonesimulator = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING_macosx = ENABLE_CONTENT_FILTERING;
 
 ENABLE_CSS3_TEXT = ;
 
@@ -92,78 +99,83 @@ ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 
-ENABLE_DASHBOARD_SUPPORT[sdk=macosx*] = ENABLE_DASHBOARD_SUPPORT;
+ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
 
 ENABLE_DATACUE_VALUE = ENABLE_DATACUE_VALUE;
 
 ENABLE_DATALIST_ELEMENT = ;
 
-ENABLE_DATA_INTERACTION[sdk=iphone*] = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
+ENABLE_DATA_INTERACTION = $(ENABLE_DATA_INTERACTION_$(PLATFORM_NAME));
 ENABLE_DATA_INTERACTION_iphoneos = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION_iphonesimulator = ENABLE_DATA_INTERACTION;
-ENABLE_DATA_INTERACTION[sdk=iphoneos10*] = ;
-ENABLE_DATA_INTERACTION[sdk=iphonesimulator10*] = ;
 
-ENABLE_DEVICE_ORIENTATION[sdk=iphone*] = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION = $(ENABLE_DEVICE_ORIENTATION_$(PLATFORM_NAME));
+ENABLE_DEVICE_ORIENTATION_iphoneos = ENABLE_DEVICE_ORIENTATION;
+ENABLE_DEVICE_ORIENTATION_iphonesimulator = ENABLE_DEVICE_ORIENTATION;
 
-ENABLE_DRAG_SUPPORT[sdk=iphone*] = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
+ENABLE_DRAG_SUPPORT = $(ENABLE_DRAG_SUPPORT_$(PLATFORM_NAME));
 ENABLE_DRAG_SUPPORT_iphoneos = ENABLE_DRAG_SUPPORT;
 ENABLE_DRAG_SUPPORT_iphonesimulator = ENABLE_DRAG_SUPPORT;
-ENABLE_DRAG_SUPPORT[sdk=iphoneos10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=iphonesimulator10*] = ;
-ENABLE_DRAG_SUPPORT[sdk=watch*] = ;
-ENABLE_DRAG_SUPPORT[sdk=appletv*] = ;
 
 ENABLE_ENCRYPTED_MEDIA = ENABLE_ENCRYPTED_MEDIA;
 
 ENABLE_EXTRA_ZOOM_MODE = ;
 
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphone*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios);
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphoneos10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS[sdk=iphonesimulator10*] = ;
-ENABLE_FAST_JIT_PERMISSIONS_ios[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_ios_$(USE_INTERNAL_SDK))
-ENABLE_FAST_JIT_PERMISSIONS_ios_YES = ENABLE_FAST_JIT_PERMISSIONS;
+ENABLE_FAST_JIT_PERMISSIONS = $(ENABLE_FAST_JIT_PERMISSIONS_$(PLATFORM_NAME));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos[arch=arm64*] = $(ENABLE_FAST_JIT_PERMISSIONS_iphoneos_$(USE_INTERNAL_SDK));
+ENABLE_FAST_JIT_PERMISSIONS_iphoneos_YES = ENABLE_FAST_JIT_PERMISSIONS;
 
 ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
 
-ENABLE_FTL_JIT[sdk=macosx*] = ENABLE_FTL_JIT;
-ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT = $(ENABLE_FTL_JIT_$(PLATFORM_NAME))
+ENABLE_FTL_JIT_macosx = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT_iphoneos = ENABLE_FTL_JIT;
 
-ENABLE_FULLSCREEN_API[sdk=iphone*] = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
-ENABLE_FULLSCREEN_API_iphoneos = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API_iphonesimulator = ENABLE_FULLSCREEN_API;
-ENABLE_FULLSCREEN_API[sdk=iphoneos10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator10*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphoneos11*] = ;
-ENABLE_FULLSCREEN_API[sdk=iphonesimulator11*] = ;
-ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
+ENABLE_FULLSCREEN_API_iphoneos = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_iphonesimulator = $(ENABLE_FULLSCREEN_API$(WK_IOS_12));
+ENABLE_FULLSCREEN_API_IOS_SINCE_12 = ENABLE_FULLSCREEN_API;
+ENABLE_FULLSCREEN_API_macosx = ENABLE_FULLSCREEN_API;
 
-ENABLE_GAMEPAD = ENABLE_GAMEPAD;
-ENABLE_GAMEPAD[sdk=watch*] = ;
+ENABLE_GAMEPAD = $(ENABLE_GAMEPAD_$(PLATFORM_NAME));
+ENABLE_GAMEPAD_iphoneos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_iphonesimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvos = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_appletvsimulator = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD_macosx = ENABLE_GAMEPAD;
 
 ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
 
-ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;
+ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(PLATFORM_NAME));
+ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
 
 ENABLE_INDEXED_DATABASE = ENABLE_INDEXED_DATABASE;
 
 ENABLE_INDEXED_DATABASE_IN_WORKERS = ENABLE_INDEXED_DATABASE_IN_WORKERS;
 
-ENABLE_INPUT_TYPE_COLOR[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR;
+ENABLE_INPUT_TYPE_COLOR = $(ENABLE_INPUT_TYPE_COLOR_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_macosx = ENABLE_INPUT_TYPE_COLOR;
 
-ENABLE_INPUT_TYPE_COLOR_POPOVER[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR_POPOVER;
+ENABLE_INPUT_TYPE_COLOR_POPOVER = $(ENABLE_INPUT_TYPE_COLOR_POPOVER_$(PLATFORM_NAME));
+ENABLE_INPUT_TYPE_COLOR_POPOVER_macosx = ENABLE_INPUT_TYPE_COLOR_POPOVER;
 
-ENABLE_INPUT_TYPE_DATETIMELOCAL[sdk=iphone*] = ENABLE_INPUT_TYPE_DATETIMELOCAL;
+ENABLE_INPUT_TYPE_DATETIMELOCAL = $(ENABLE_INPUT_TYPE_DATETIMELOCAL_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATETIMELOCAL_cocoatouch = ENABLE_INPUT_TYPE_DATETIMELOCAL;
 
 ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE = ;
 
-ENABLE_INPUT_TYPE_DATE[sdk=iphone*] = ENABLE_INPUT_TYPE_DATE;
+ENABLE_INPUT_TYPE_DATE = $(ENABLE_INPUT_TYPE_DATE_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_DATE_cocoatouch = ENABLE_INPUT_TYPE_DATE;
 
-ENABLE_INPUT_TYPE_MONTH[sdk=iphone*] = ENABLE_INPUT_TYPE_MONTH;
+ENABLE_INPUT_TYPE_MONTH = $(ENABLE_INPUT_TYPE_MONTH_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_MONTH_cocoatouch = ENABLE_INPUT_TYPE_MONTH;
 
-ENABLE_INPUT_TYPE_TIME[sdk=iphone*] = ENABLE_INPUT_TYPE_TIME;
+ENABLE_INPUT_TYPE_TIME = $(ENABLE_INPUT_TYPE_TIME_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_TIME_cocoatouch = ENABLE_INPUT_TYPE_TIME;
 
-ENABLE_INPUT_TYPE_WEEK[sdk=iphone*] = ENABLE_INPUT_TYPE_WEEK;
+ENABLE_INPUT_TYPE_WEEK = $(ENABLE_INPUT_TYPE_WEEK_$(WK_COCOA_TOUCH));
+ENABLE_INPUT_TYPE_WEEK_cocoatouch = ENABLE_INPUT_TYPE_WEEK;
 
 ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS = ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS;
 
@@ -171,12 +183,11 @@ ENABLE_INTERSECTION_OBSERVER = ENABLE_INTERSECTION_OBSERVER;
 
 ENABLE_INTL = ENABLE_INTL;
 
-ENABLE_IOS_GESTURE_EVENTS = ;
-ENABLE_IOS_GESTURE_EVENTS[sdk=iphone*] = $(ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
+ENABLE_IOS_GESTURE_EVENTS = $(ENABLE_IOS_GESTURE_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_GESTURE_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
 
-ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
+ENABLE_IOS_TOUCH_EVENTS = $(ENABLE_IOS_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
 
 ENABLE_JS_ASYNC_ITERATION = ENABLE_JS_ASYNC_ITERATION;
 
@@ -190,25 +201,27 @@ ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER = ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER;
 
 ENABLE_LEGACY_ENCRYPTED_MEDIA = ENABLE_LEGACY_ENCRYPTED_MEDIA;
 
-ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
+ENABLE_LETTERPRESS = $(ENABLE_LETTERPRESS_$(WK_COCOA_TOUCH));
+ENABLE_LETTERPRESS_cocoatouch = ENABLE_LETTERPRESS;
 
-ENABLE_MAC_GESTURE_EVENTS = ;
-ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_GESTURE_EVENTS = $(ENABLE_MAC_GESTURE_EVENTS_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
 
-ENABLE_MAC_VIDEO_TOOLBOX = ;
-ENABLE_MAC_VIDEO_TOOLBOX[sdk=macosx*] = $(ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_VIDEO_TOOLBOX = $(ENABLE_MAC_VIDEO_TOOLBOX_$(PLATFORM_NAME)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_VIDEO_TOOLBOX_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_VIDEO_TOOLBOX;
 
 ENABLE_MATHML = ENABLE_MATHML;
 
-ENABLE_MEDIA_CAPTURE[sdk=iphone*] = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE = $(ENABLE_MEDIA_CAPTURE_$(PLATFORM_NAME));
+ENABLE_MEDIA_CAPTURE_iphoneos = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CAPTURE_iphonesimulator = ENABLE_MEDIA_CAPTURE;
 
 ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 
 ENABLE_MEDIA_SESSION = ;
 
-ENABLE_MEDIA_SOURCE[sdk=macosx*] = ENABLE_MEDIA_SOURCE;
+ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;
 
@@ -218,19 +231,24 @@ ENABLE_METER_ELEMENT = ENABLE_METER_ELEMENT;
 
 ENABLE_MHTML = ;
 
-ENABLE_MOUSE_CURSOR_SCALE[sdk=macosx*] = ENABLE_MOUSE_CURSOR_SCALE;
+ENABLE_MOUSE_CURSOR_SCALE = $(ENABLE_MOUSE_CURSOR_SCALE_$(PLATFORM_NAME));
+ENABLE_MOUSE_CURSOR_SCALE_macosx = ENABLE_MOUSE_CURSOR_SCALE;
 
 ENABLE_NAVIGATOR_CONTENT_UTILS = ;
 
-ENABLE_NAVIGATOR_STANDALONE[sdk=iphone*] = ENABLE_NAVIGATOR_STANDALONE;
+ENABLE_NAVIGATOR_STANDALONE = $(ENABLE_NAVIGATOR_STANDALONE_$(WK_COCOA_TOUCH));
+ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE;
 
-ENABLE_NOTIFICATIONS[sdk=macosx*] = ENABLE_NOTIFICATIONS;
+ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(PLATFORM_NAME));
+ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS;
 
 ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST;
 
-ENABLE_PDFKIT_PLUGIN[sdk=macosx*] = ENABLE_PDFKIT_PLUGIN;
+ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(PLATFORM_NAME));
+ENABLE_PDFKIT_PLUGIN_macosx = ENABLE_PDFKIT_PLUGIN;
 
-ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
+ENABLE_POINTER_LOCK = $(ENABLE_POINTER_LOCK_$(PLATFORM_NAME));
+ENABLE_POINTER_LOCK_macosx = ENABLE_POINTER_LOCK;
 
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 
@@ -242,9 +260,11 @@ ENABLE_RESOLUTION_MEDIA_QUERY = ;
 
 ENABLE_RESOURCE_USAGE = ENABLE_RESOURCE_USAGE;
 
-ENABLE_RUBBER_BANDING[sdk=macosx*] = ENABLE_RUBBER_BANDING;
+ENABLE_RUBBER_BANDING = $(ENABLE_RUBBER_BANDING_$(PLATFORM_NAME));
+ENABLE_RUBBER_BANDING_macosx = ENABLE_RUBBER_BANDING;
 
-ENABLE_SERVICE_CONTROLS[sdk=macosx*] = ENABLE_SERVICE_CONTROLS;
+ENABLE_SERVICE_CONTROLS = $(ENABLE_SERVICE_CONTROLS_$(PLATFORM_NAME));
+ENABLE_SERVICE_CONTROLS_macosx = ENABLE_SERVICE_CONTROLS;
 
 ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 
@@ -262,30 +282,35 @@ ENABLE_TEXT_AUTOSIZING = ENABLE_TEXT_AUTOSIZING;
 
 // FIXME: Remove the USE_INTERNAL_SDK condition once we support touch events when building for iOS with
 // the public SDK. See <https://webkit.org/b/179167>.
-ENABLE_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
-ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
+ENABLE_TOUCH_EVENTS = $(ENABLE_TOUCH_EVENTS_$(WK_COCOA_TOUCH)_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_TOUCH_EVENTS_cocoatouch_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
 
 ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL;
 
 ENABLE_USER_MESSAGE_HANDLERS = ENABLE_USER_MESSAGE_HANDLERS;
 
-ENABLE_VARIATION_FONTS[sdk=iphone*] = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
+ENABLE_VARIATION_FONTS = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
 ENABLE_VARIATION_FONTS_iphoneos = ENABLE_VARIATION_FONTS;
 ENABLE_VARIATION_FONTS_iphonesimulator = ENABLE_VARIATION_FONTS;
-ENABLE_VARIATION_FONTS[sdk=iphoneos10*] = ;
-ENABLE_VARIATION_FONTS[sdk=iphonesimulator10*] = ;
-ENABLE_VARIATION_FONTS[sdk=macosx*] = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
+ENABLE_VARIATION_FONTS_macosx = $(ENABLE_VARIATION_FONTS$(WK_MACOS_1013));
 ENABLE_VARIATION_FONTS_MACOS_SINCE_1013 = ENABLE_VARIATION_FONTS;
 
 ENABLE_VIDEO = ENABLE_VIDEO;
 
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=iphone*] = ENABLE_VIDEO_PRESENTATION_MODE;
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
+ENABLE_VIDEO_PRESENTATION_MODE = $(ENABLE_VIDEO_PRESENTATION_MODE_$(PLATFORM_NAME));
+ENABLE_VIDEO_PRESENTATION_MODE_iphoneos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_iphonesimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_watchsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvos = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_appletvsimulator = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx = $(ENABLE_VIDEO_PRESENTATION_MODE$(WK_MACOS_1012));
 ENABLE_VIDEO_PRESENTATION_MODE_MACOS_SINCE_1012 = ENABLE_VIDEO_PRESENTATION_MODE;
 
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 
-ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN[sdk=macosx*] = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN = $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_$(PLATFORM_NAME));
+ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
 
 ENABLE_WEBASSEMBLY = ;
 
@@ -293,25 +318,19 @@ ENABLE_WEBGL = ENABLE_WEBGL;
 
 ENABLE_WEBGL2 = ENABLE_WEBGL2;
 
-ENABLE_WEBGPU = ENABLE_WEBGPU;
-ENABLE_WEBGPU[sdk=iphonesimulator*] = ;
+ENABLE_WEBGPU = $(ENABLE_WEBGPU_$(PLATFORM_NAME));
+ENABLE_WEBGPU_iphoneos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_watchos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_appletvos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_macosx = ENABLE_WEBGPU;
 
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 
 ENABLE_WEB_AUTHN = ENABLE_WEB_AUTHN;
 
-ENABLE_WEB_RTC[sdk=watch*] = ;
-ENABLE_WEB_RTC[sdk=appletv*] = ;
-ENABLE_WEB_RTC[sdk=iphone*] = $(ENABLE_WEB_RTC_ios);
-ENABLE_WEB_RTC_ios[arch=arm64*] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios[arch=x86_64] = $(ENABLE_WEB_RTC_ios_$(IPHONEOS_DEPLOYMENT_TARGET:base)_$(CONFIGURATION))
-ENABLE_WEB_RTC_ios_10_Production = ;
-ENABLE_WEB_RTC_ios_10_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_10_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Production = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Debug = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC_ios_11_Release = ENABLE_WEB_RTC;
-ENABLE_WEB_RTC[sdk=macosx*] = $(ENABLE_WEB_RTC_macosx);
+ENABLE_WEB_RTC = $(ENABLE_WEB_RTC_$(PLATFORM_NAME));
+ENABLE_WEB_RTC_iphoneos = ENABLE_WEB_RTC;
+ENABLE_WEB_RTC_iphonesimulator = ENABLE_WEB_RTC;
 ENABLE_WEB_RTC_macosx[arch=x86_64] = ENABLE_WEB_RTC;
 
 ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
diff --git a/Tools/TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig b/Tools/TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig
new file mode 100644 (file)
index 0000000..6111fed
--- /dev/null
@@ -0,0 +1,145 @@
+// Copyright (C) 2018 Apple Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+//    notice, this list of conditions and the following disclaimer in the
+//    documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Use the following helpers to define build settings whose value depends on the target
+// macOS version in a succinct and future-proof way.
+//
+// Example 1: To give the SMOOTHNESS build setting the value 3 in macOS 10.12 and later and the
+// value 2 in earlier versions, write:
+//
+//     SMOOTHNESS = $(SMOOTHNESS$(WK_MACOS_1012));
+//     SMOOTHNESS_MACOS_BEFORE_1012 = 2;
+//     SMOOTHNESS_MACOS_SINCE_1012 = 3;
+//
+// Example 2: To define ENABLE_COLOR to ENABLE_COLOR in all platforms except macOS 10.12 and
+// earlier write:
+//
+//     ENABLE_COLOR = ENABLE_COLOR;
+//     ENABLE_COLOR[sdk=macosx*] = $(ENABLE_COLOR$(WK_MACOS_1013));
+//     ENABLE_COLOR_MACOS_SINCE_1013 = $(ENABLE_COLOR);
+//
+// Example 3: To give EXTRA_PATH one value before macOS 10.12, another value in macOS 10.12 and
+// macOS 10.13, and a third value in macOS 10.14 and later, write:
+//
+//     EXTRA_PATH = $(EXTRA_PATH$(WK_MACOS_1012_1014));
+//     EXTRA_PATH_MACOS_BEFORE_1012 = "/Library/Application Support/WebKit";
+//     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
+//     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
+
+// macOS
+
+WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1012_101100 = YES;
+
+WK_MACOS_BEFORE_1013 = $(WK_MACOS_BEFORE_1013_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1013_101100 = YES;
+WK_MACOS_BEFORE_1013_101200 = YES;
+
+WK_MACOS_BEFORE_1014 = $(WK_MACOS_BEFORE_1014_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1014_101100 = YES;
+WK_MACOS_BEFORE_1014_101200 = YES;
+WK_MACOS_BEFORE_1014_101300 = YES;
+
+WK_MACOS_BEFORE_1015 = $(WK_MACOS_BEFORE_1015_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WK_MACOS_BEFORE_1015_101100 = YES;
+WK_MACOS_BEFORE_1015_101200 = YES;
+WK_MACOS_BEFORE_1015_101300 = YES;
+WK_MACOS_BEFORE_1015_101400 = YES;
+
+WK_MACOS_1012 = $(WK_MACOS_1012_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_ = _MACOS_SINCE_1012;
+WK_MACOS_1012_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1012_1013 = $(WK_MACOS_1012_1013_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_1013_ = $(WK_MACOS_1013);
+WK_MACOS_1012_1013_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1012_1014 = $(WK_MACOS_1012_1014_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_1014_ = $(WK_MACOS_1014);
+WK_MACOS_1012_1014_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1012_1015 = $(WK_MACOS_1012_1015_$(WK_MACOS_BEFORE_1012));
+WK_MACOS_1012_1015_ = $(WK_MACOS_1015);
+WK_MACOS_1012_1015_YES = _MACOS_BEFORE_1012;
+
+WK_MACOS_1013 = $(WK_MACOS_1013_$(WK_MACOS_BEFORE_1013));
+WK_MACOS_1013_ = _MACOS_SINCE_1013;
+WK_MACOS_1013_YES = _MACOS_BEFORE_1013;
+
+WK_MACOS_1013_1014 = $(WK_MACOS_1013_1014_$(WK_MACOS_BEFORE_1013));
+WK_MACOS_1013_1014_ = $(WK_MACOS_1014);
+WK_MACOS_1013_1014_YES = _MACOS_BEFORE_1013;
+
+WK_MACOS_1013_1015 = $(WK_MACOS_1013_1015_$(WK_MACOS_BEFORE_1013));
+WK_MACOS_1013_1015_ = $(WK_MACOS_1015);
+WK_MACOS_1013_1015_YES = _MACOS_BEFORE_1013;
+
+WK_MACOS_1014 = $(WK_MACOS_1014_$(WK_MACOS_BEFORE_1014));
+WK_MACOS_1014_ = _MACOS_SINCE_1014;
+WK_MACOS_1014_YES = _MACOS_BEFORE_1014;
+
+WK_MACOS_1014_1015 = $(WK_MACOS_1014_1015_$(WK_MACOS_BEFORE_1014));
+WK_MACOS_1014_1015_ = $(WK_MACOS_1015);
+WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
+
+WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
+WK_MACOS_1015_ = _MACOS_SINCE_1015;
+WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
+
+// iOS
+
+WK_IOS_BEFORE_12 = $(WK_IOS_BEFORE_12_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_12_11 = YES;
+
+WK_IOS_BEFORE_13 = $(WK_IOS_BEFORE_13_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_13_11 = YES;
+WK_IOS_BEFORE_13_12 = YES;
+
+WK_IOS_BEFORE_14 = $(WK_IOS_BEFORE_14_$(IPHONEOS_DEPLOYMENT_TARGET:base));
+WK_IOS_BEFORE_14_11 = YES;
+WK_IOS_BEFORE_14_12 = YES;
+WK_IOS_BEFORE_14_13 = YES;
+
+WK_IOS_12 = $(WK_IOS_12_$(WK_IOS_BEFORE_12));
+WK_IOS_12_ = _IOS_SINCE_12;
+WK_IOS_12_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_13 = $(WK_IOS_12_13_$(WK_IOS_BEFORE_12));
+WK_IOS_12_13_ = $(WK_IOS_13);
+WK_IOS_12_13_YES = _IOS_BEFORE_12;
+
+WK_IOS_12_14 = $(WK_IOS_12_14_$(WK_IOS_BEFORE_12));
+WK_IOS_12_14_ = $(WK_IOS_14);
+WK_IOS_12_14_YES = _IOS_BEFORE_12;
+
+WK_IOS_13 = $(WK_IOS_13_$(WK_IOS_BEFORE_13));
+WK_IOS_13_ = _IOS_SINCE_13;
+WK_IOS_13_YES = _IOS_BEFORE_13;
+
+WK_IOS_13_14 = $(WK_IOS_13_14_$(WK_IOS_BEFORE_13));
+WK_IOS_13_14_ = $(WK_IOS_14);
+WK_IOS_13_14_YES = _IOS_BEFORE_13;
+
+WK_IOS_14 = $(WK_IOS_14_$(WK_IOS_BEFORE_14));
+WK_IOS_14_ = _IOS_SINCE_14;
+WK_IOS_14_YES = _IOS_BEFORE_14;
diff --git a/Tools/TestWebKitAPI/Configurations/macOSTargetConditionals.xcconfig b/Tools/TestWebKitAPI/Configurations/macOSTargetConditionals.xcconfig
deleted file mode 100644 (file)
index d1c77ed..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (C) 2018 Apple Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-//    notice, this list of conditions and the following disclaimer in the
-//    documentation and/or other materials provided with the distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
-// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
-// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Use the following helpers to define build settings whose value depends on the target
-// macOS version in a succinct and future-proof way.
-//
-// Example 1: To give the SMOOTHNESS build setting the value 3 in macOS 10.12 and later and the
-// value 2 in earlier versions, write:
-//
-//     SMOOTHNESS = $(SMOOTHNESS$(WK_MACOS_1012));
-//     SMOOTHNESS_MACOS_BEFORE_1012 = 2;
-//     SMOOTHNESS_MACOS_SINCE_1012 = 3;
-//
-// Example 2: To define ENABLE_COLOR to ENABLE_COLOR in all platforms except macOS 10.12 and
-// earlier write:
-//
-//     ENABLE_COLOR = ENABLE_COLOR;
-//     ENABLE_COLOR[sdk=macosx*] = $(ENABLE_COLOR$(WK_MACOS_1013));
-//     ENABLE_COLOR_MACOS_SINCE_1013 = $(ENABLE_COLOR);
-//
-// Example 3: To give EXTRA_PATH one value before macOS 10.12, another value in macOS 10.12 and
-// macOS 10.13, and a third value in macOS 10.14 and later, write:
-//
-//     EXTRA_PATH = $(EXTRA_PATH$(WK_MACOS_1012_1014));
-//     EXTRA_PATH_MACOS_BEFORE_1012 = "/Library/Application Support/WebKit";
-//     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
-//     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
-
-WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1012_101100 = YES;
-
-WK_MACOS_BEFORE_1013 = $(WK_MACOS_BEFORE_1013_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1013_101100 = YES;
-WK_MACOS_BEFORE_1013_101200 = YES;
-
-WK_MACOS_BEFORE_1014 = $(WK_MACOS_BEFORE_1014_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1014_101100 = YES;
-WK_MACOS_BEFORE_1014_101200 = YES;
-WK_MACOS_BEFORE_1014_101300 = YES;
-
-WK_MACOS_BEFORE_1015 = $(WK_MACOS_BEFORE_1015_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-WK_MACOS_BEFORE_1015_101100 = YES;
-WK_MACOS_BEFORE_1015_101200 = YES;
-WK_MACOS_BEFORE_1015_101300 = YES;
-WK_MACOS_BEFORE_1015_101400 = YES;
-
-WK_MACOS_1012 = $(WK_MACOS_1012_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_ = _MACOS_SINCE_1012;
-WK_MACOS_1012_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1012_1013 = $(WK_MACOS_1012_1013_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_1013_ = $(WK_MACOS_1013);
-WK_MACOS_1012_1013_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1012_1014 = $(WK_MACOS_1012_1014_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_1014_ = $(WK_MACOS_1014);
-WK_MACOS_1012_1014_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1012_1015 = $(WK_MACOS_1012_1015_$(WK_MACOS_BEFORE_1012));
-WK_MACOS_1012_1015_ = $(WK_MACOS_1015);
-WK_MACOS_1012_1015_YES = _MACOS_BEFORE_1012;
-
-WK_MACOS_1013 = $(WK_MACOS_1013_$(WK_MACOS_BEFORE_1013));
-WK_MACOS_1013_ = _MACOS_SINCE_1013;
-WK_MACOS_1013_YES = _MACOS_BEFORE_1013;
-
-WK_MACOS_1013_1014 = $(WK_MACOS_1013_1014_$(WK_MACOS_BEFORE_1013));
-WK_MACOS_1013_1014_ = $(WK_MACOS_1014);
-WK_MACOS_1013_1014_YES = _MACOS_BEFORE_1013;
-
-WK_MACOS_1013_1015 = $(WK_MACOS_1013_1015_$(WK_MACOS_BEFORE_1013));
-WK_MACOS_1013_1015_ = $(WK_MACOS_1015);
-WK_MACOS_1013_1015_YES = _MACOS_BEFORE_1013;
-
-WK_MACOS_1014 = $(WK_MACOS_1014_$(WK_MACOS_BEFORE_1014));
-WK_MACOS_1014_ = _MACOS_SINCE_1014;
-WK_MACOS_1014_YES = _MACOS_BEFORE_1014;
-
-WK_MACOS_1014_1015 = $(WK_MACOS_1014_1015_$(WK_MACOS_BEFORE_1014));
-WK_MACOS_1014_1015_ = $(WK_MACOS_1015);
-WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
-
-WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
-WK_MACOS_1015_ = _MACOS_SINCE_1015;
-WK_MACOS_1015_YES = _MACOS_BEFORE_1015;