Bug 197858

Summary: Remove ENABLE definitions from WebKit config files
Product: WebKit Reporter: Don Olmstead <don.olmstead>
Component: Tools / TestsAssignee: Don Olmstead <don.olmstead>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, ap, bugs-noreply, commit-queue, dino, ews-watchlist, krollin, mcatanzaro, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP Patch (XCode only)
none
WIP Patch (XCode only)
none
WIP Patch (XCode only)
none
WIP Patch (XCode only)
ews-watchlist: commit-queue-
Archive of layout-test-results from ews122 for ios-simulator-wk2
none
Patch
none
Patch
none
Patch
none
Patch none

Description Don Olmstead 2019-05-13 16:07:53 PDT
These should be in CMake options and FeatureDefines.xcconfig.
Comment 1 Don Olmstead 2019-05-28 14:58:53 PDT
Created attachment 370787 [details]
WIP Patch (XCode only)

Just including XCode changes to test the bots and see if I'm on the right track.
Comment 2 Don Olmstead 2019-05-28 15:09:59 PDT
Comment on attachment 370787 [details]
WIP Patch (XCode only)

View in context: https://bugs.webkit.org/attachment.cgi?id=370787&action=review

Sorted the defines in xcconfig to make it easier to figure out where things go.

Can someone on the Apple side see if this is correct? Will work on the CMake side now.

> Source/WebKit/Configurations/FeatureDefines.xcconfig:296
> +ENABLE_MEMORY_SAMPLER = ENABLE_MEMORY_SAMPLER;

#if PLATFORM(COCOA)
#define ENABLE_MEMORY_SAMPLER 1
#endif

> Source/WebKit/Configurations/FeatureDefines.xcconfig:308
> +ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION = ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION;

#if (PLATFORM(COCOA) || PLATFORM(GTK))
#define ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION 1
#else

> Source/WebKit/Configurations/FeatureDefines.xcconfig:349
> +ENABLE_SANDBOX_EXTENSIONS = ENABLE_SANDBOX_EXTENSIONS;

#if PLATFORM(COCOA)
#define ENABLE_SANDBOX_EXTENSIONS 1
#endif

> Source/WebKit/Configurations/FeatureDefines.xcconfig:355
> +ENABLE_SERVER_PRECONNECT = ENABLE_SERVER_PRECONNECT;
> +ENABLE_SERVER_PRECONNECT_iphoneos = $(ENABLE_SERVER_PRECONNECT$(WK_IOS_11));
> +ENABLE_SERVER_PRECONNECT_IOS_SINCE_11 = ENABLE_SERVER_PRECONNECT;
> +ENABLE_SERVER_PRECONNECT_macosx = $(ENABLE_SERVER_PRECONNECT$(WK_MACOS_1013));
> +ENABLE_SERVER_PRECONNECT_MACOS_SINCE_1013 = ENABLE_SERVER_PRECONNECT;

#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
#define ENABLE_SERVER_PRECONNECT 1
#endif

> Source/WebKit/Configurations/FeatureDefines.xcconfig:362
> +ENABLE_SHAREABLE_RESOURCE = ENABLE_SHAREABLE_RESOURCE;

#if PLATFORM(COCOA)
#define ENABLE_SHAREABLE_RESOURCE 1
#endif

> Source/WebKit/Configurations/FeatureDefines.xcconfig:412
> +ENABLE_WEBDRIVER_MOUSE_INTERACTIONS = $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_$(WK_PLATFORM_NAME));
> +ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_macosx = ENABLE_WEBDRIVER_MOUSE_INTERACTIONS;
> +ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_iphoneos = ;

#define ENABLE_WEBDRIVER_MOUSE_INTERACTIONS PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WPE)

> Source/WebKit/Configurations/FeatureDefines.xcconfig:414
> +ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS = ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS;

#define ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)

> Source/WebKit/Configurations/FeatureDefines.xcconfig:418
> +ENABLE_WEBDRIVER_TOUCH_INTERACTIONS = $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS_$(WK_PLATFORM_NAME));
> +ENABLE_WEBDRIVER_TOUCH_INTERACTIONS_macosx = ;
> +ENABLE_WEBDRIVER_TOUCH_INTERACTIONS_iphoneos = ENABLE_WEBDRIVER_TOUCH_INTERACTIONS;

#define ENABLE_WEBDRIVER_TOUCH_INTERACTIONS PLATFORM(IOS_FAMILY)

> Source/WebKit/Configurations/FeatureDefines.xcconfig:443
> +ENABLE_WEB_PROCESS_SANDBOX = ENABLE_WEB_PROCESS_SANDBOX;

#if PLATFORM(COCOA)
#define ENABLE_WEB_PROCESS_SANDBOX 1
#endif

> Source/WebKit/Configurations/FeatureDefines.xcconfig:454
> -FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
> +FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NOTIFICATIONS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_PROCESS_SANDBOX) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);

Two potential issues found here

ENABLE_JIT is there but not actually an option. Should this be removed? Guessing yes.

ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS was not actually there in the list.
Comment 3 EWS Watchlist 2019-05-28 15:12:45 PDT Comment hidden (obsolete)
Comment 4 Don Olmstead 2019-05-28 15:36:09 PDT Comment hidden (obsolete)
Comment 5 Don Olmstead 2019-05-28 15:37:56 PDT Comment hidden (obsolete)
Comment 6 EWS Watchlist 2019-05-28 15:38:16 PDT Comment hidden (obsolete)
Comment 7 Simon Fraser (smfr) 2019-05-28 15:40:29 PDT
This is a bad time to do this kind of cleanup. Can this wait a few months?
Comment 8 Don Olmstead 2019-05-28 16:06:51 PDT Comment hidden (obsolete)
Comment 9 EWS Watchlist 2019-05-28 16:09:17 PDT Comment hidden (obsolete)
Comment 10 Don Olmstead 2019-05-28 16:49:30 PDT Comment hidden (obsolete)
Comment 11 Alexey Proskuryakov 2019-05-28 16:51:01 PDT
> +ENABLE_SERVER_PRECONNECT_MACOS_SINCE_1013 = ENABLE_SERVER_PRECONNECT;

10.13 is the oldest OS version supported on trunk, so you can simplify this.

> +ENABLE_SERVER_PRECONNECT_IOS_SINCE_11 = ENABLE_SERVER_PRECONNECT;

Same.

I didn't look at the patch in detail, this is just one thing that jumped out.
Comment 12 EWS Watchlist 2019-05-28 16:52:28 PDT Comment hidden (obsolete)
Comment 13 EWS Watchlist 2019-05-28 21:52:36 PDT Comment hidden (obsolete)
Comment 14 EWS Watchlist 2019-05-28 21:52:38 PDT Comment hidden (obsolete)
Comment 15 Don Olmstead 2019-05-29 10:04:40 PDT Comment hidden (obsolete)
Comment 16 Don Olmstead 2019-05-29 10:25:29 PDT Comment hidden (obsolete)
Comment 17 EWS Watchlist 2019-05-29 10:27:40 PDT Comment hidden (obsolete)
Comment 18 Don Olmstead 2019-05-29 10:34:19 PDT Comment hidden (obsolete)
Comment 19 EWS Watchlist 2019-05-29 10:37:46 PDT Comment hidden (obsolete)
Comment 20 Don Olmstead 2019-05-29 10:40:15 PDT
Created attachment 370864 [details]
Patch
Comment 21 Don Olmstead 2019-05-29 10:53:07 PDT
(In reply to Simon Fraser (smfr) from comment #7)
> This is a bad time to do this kind of cleanup. Can this wait a few months?

I think this patch is about ready to go assuming all the bots are green. I wanted to give some context on why I'm working through this. We want to enable WEBDRIVER support for WinCairo and PlayStation.

While looking at what needed to be filled in I saw ENABLE_WEBDRIVER_*_INTERACTIONS and ENABLE_WEBDRIVER_ACTIONS_API. They weren't defined in CMake or xcconfig but instead were defined in config.h. I poked around some more and saw that there were cases of things being defined in WebKit2Prefix.h as well.

For CMake ports its ideal if all the config lives in the cmakeconfig.h which is generated to give the port control of what is enabled. So I wanted to remove any places where an ENABLE is being set outside of CMake. For XCode builds the ENABLE flags should be set in the xcconfig so I went ahead and moved things into xcconfig as well to be a good neighbor.

Waiting a few months is a non-starter for us. We want to start working on WebDriver and things like ENABLE_SHAREABLE_RESOURCE and ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION are also of interest.

I can remove the xcconfig file changes from the patch if necessary and just base setting things on whether CMake is being used. Then someone else would have to clean that up later. I did also find that ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS was not set in FEATURE_DEFINES despite being enabled so that's likely another problem.

Let me know what you all want to do.
Comment 22 WebKit Commit Bot 2019-05-29 16:06:02 PDT
Comment on attachment 370864 [details]
Patch

Clearing flags on attachment: 370864

Committed r245875: <https://trac.webkit.org/changeset/245875>
Comment 23 WebKit Commit Bot 2019-05-29 16:06:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 24 Radar WebKit Bug Importer 2019-05-29 16:07:23 PDT
<rdar://problem/51241688>
Comment 25 Michael Catanzaro 2019-09-18 09:09:07 PDT
Comment on attachment 370864 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=370864&action=review

> Source/cmake/OptionsGTK.cmake:166
> +WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHAREABLE_RESOURCE PUBLIC ON)

Oops, this should be PRIVATE.