Diff
Modified: trunk/Source/WTF/ChangeLog (255576 => 255577)
--- trunk/Source/WTF/ChangeLog 2020-02-03 19:11:18 UTC (rev 255576)
+++ trunk/Source/WTF/ChangeLog 2020-02-03 19:29:22 UTC (rev 255577)
@@ -1,3 +1,27 @@
+2020-02-03 Sam Weinig <[email protected]>
+
+ Start splitting platform specific overrides of default enable behavior into their own files
+ https://bugs.webkit.org/show_bug.cgi?id=207105
+
+ Reviewed by Dean Jackson.
+
+ Splits out platform specific overrides of default enable behavior into separate files,
+ starting with one for all of the Cocoa related ports, one for Apple's Windows port, and
+ one for the WinCario port.
+
+ The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h,
+ but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually
+ ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h
+ also had defaults in PlatformEnable.h, but going forward this needs be validated either through
+ some sort of macro-based validation, through the style checker or something else.
+
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/CMakeLists.txt:
+ * wtf/PlatformEnable.h:
+ * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h.
+ * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h.
+ * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h.
+
2020-01-31 Don Olmstead <[email protected]>
[CMake] Add _PRIVATE_LIBRARIES to framework
Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (255576 => 255577)
--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2020-02-03 19:11:18 UTC (rev 255576)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2020-02-03 19:29:22 UTC (rev 255577)
@@ -450,6 +450,9 @@
7C42307323CE2D8B006E54D0 /* PlatformOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformOS.h; sourceTree = "<group>"; };
7C42307423CEB187006E54D0 /* PlatformLegacy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformLegacy.h; sourceTree = "<group>"; };
7C9692941F66306E00267A9E /* KeyValuePair.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyValuePair.h; sourceTree = "<group>"; };
+ 7C98CDC723E7A9B80012F232 /* PlatformEnableCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformEnableCocoa.h; sourceTree = "<group>"; };
+ 7C98CDC823E7AFC80012F232 /* PlatformEnableWinApple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformEnableWinApple.h; sourceTree = "<group>"; };
+ 7C98CDC923E7AFC80012F232 /* PlatformEnableWinCairo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformEnableWinCairo.h; sourceTree = "<group>"; };
7CBBA07319BB7FDC00BBF025 /* OSObjectPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSObjectPtr.h; sourceTree = "<group>"; };
7CD0D5A71D55322A000CC9E1 /* Variant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Variant.h; sourceTree = "<group>"; };
7CD4C26F1E2C82B900929470 /* StringConcatenateNumbers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringConcatenateNumbers.h; sourceTree = "<group>"; };
@@ -1130,6 +1133,9 @@
7CEF23EB23D1257900F8B904 /* PlatformCallingConventions.h */,
7C42307223CE2D8A006E54D0 /* PlatformCPU.h */,
7C42307123CE2D8A006E54D0 /* PlatformEnable.h */,
+ 7C98CDC723E7A9B80012F232 /* PlatformEnableCocoa.h */,
+ 7C98CDC823E7AFC80012F232 /* PlatformEnableWinApple.h */,
+ 7C98CDC923E7AFC80012F232 /* PlatformEnableWinCairo.h */,
7C3A45D023CFA883007DE3A6 /* PlatformHave.h */,
7C42307423CEB187006E54D0 /* PlatformLegacy.h */,
7C42307323CE2D8B006E54D0 /* PlatformOS.h */,
Modified: trunk/Source/WTF/wtf/CMakeLists.txt (255576 => 255577)
--- trunk/Source/WTF/wtf/CMakeLists.txt 2020-02-03 19:11:18 UTC (rev 255576)
+++ trunk/Source/WTF/wtf/CMakeLists.txt 2020-02-03 19:29:22 UTC (rev 255577)
@@ -173,6 +173,9 @@
PlatformCallingConventions.h
PlatformCPU.h
PlatformEnable.h
+ PlatformEnableCocoa.h
+ PlatformEnableWinApple.h
+ PlatformEnableWinCairo.h
PlatformHave.h
PlatformLegacy.h
PlatformOS.h
Modified: trunk/Source/WTF/wtf/PlatformEnable.h (255576 => 255577)
--- trunk/Source/WTF/wtf/PlatformEnable.h 2020-02-03 19:11:18 UTC (rev 255576)
+++ trunk/Source/WTF/wtf/PlatformEnable.h 2020-02-03 19:29:22 UTC (rev 255577)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
* Copyright (C) 2007-2009 Torch Mobile, Inc.
* Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
* Copyright (C) 2013 Samsung Electronics. All rights reserved.
@@ -69,6 +69,7 @@
#endif
#endif
+
/* ==== Platform additions: additions to PlatformEnable.h from outside the main repository ==== */
#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/AdditionalFeatureDefines.h>)
@@ -75,303 +76,100 @@
#include <WebKitAdditions/AdditionalFeatureDefines.h>
#endif
-/* FIXME: Move out the PLATFORM specific rules into platform specific files. */
-/* --------- Apple iOS (but not macOS) port --------- */
-#if PLATFORM(IOS_FAMILY)
-#if !defined(ENABLE_AIRPLAY_PICKER)
-#if !PLATFORM(MACCATALYST)
-#define ENABLE_AIRPLAY_PICKER 1
-#endif
-#endif
+/* ==== Platform specific defaults ==== */
-#if !defined(ENABLE_APPLE_PAY_REMOTE_UI)
-#if !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS)
-#define ENABLE_APPLE_PAY_REMOTE_UI 1
+/* --------- Apple Cocoa platforms --------- */
+#if PLATFORM(COCOA)
+#include <wtf/PlatformEnableCocoa.h>
#endif
-#endif
-#if !defined(ENABLE_CONTENT_EXTENSIONS)
-#define ENABLE_CONTENT_EXTENSIONS 1
+/* --------- Apple Windows port --------- */
+#if PLATFORM(WIN) && !PLATFORM(WIN_CAIRO)
+#include <wtf/PlatformEnableWinApple.h>
#endif
-#if !defined(ENABLE_CONTEXT_MENUS)
-#define ENABLE_CONTEXT_MENUS 0
+/* --------- Windows CAIRO port --------- */
+#if PLATFORM(WIN_CAIRO)
+#include <wtf/PlatformEnableWinCairo.h>
#endif
-#if !defined(ENABLE_CONTEXT_MENU_EVENT)
-#if !PLATFORM(MACCATALYST)
-#define ENABLE_CONTEXT_MENU_EVENT 0
-#endif
-#endif
-#if !defined(ENABLE_CUSTOM_CURSOR_SUPPORT)
-#define ENABLE_CUSTOM_CURSOR_SUPPORT 0
+
+/* --------- ENABLE macro defaults --------- */
+
+/* Do not use PLATFORM() tests in this section ! */
+
+#if !defined(ENABLE_WEBPROCESS_NSRUNLOOP)
+#define ENABLE_WEBPROCESS_NSRUNLOOP 0
#endif
-#if !defined(ENABLE_DRAG_SUPPORT)
-#define ENABLE_DRAG_SUPPORT 0
+#if !defined(ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING)
+#define ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING 0
#endif
-#if !defined(ENABLE_GEOLOCATION)
-#define ENABLE_GEOLOCATION 1
+#if !defined(ENABLE_MAC_GESTURE_EVENTS)
+#define ENABLE_MAC_GESTURE_EVENTS 0
#endif
-#if !defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS)
-#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 1
+#if !defined(ENABLE_CURSOR_VISIBILITY)
+#define ENABLE_CURSOR_VISIBILITY 0
#endif
-#if !defined(ENABLE_INSPECTOR_TELEMETRY)
-#define ENABLE_INSPECTOR_TELEMETRY 0
+#if !defined(ENABLE_AIRPLAY_PICKER)
+#define ENABLE_AIRPLAY_PICKER 0
#endif
-#if !defined(ENABLE_LETTERPRESS)
-#define ENABLE_LETTERPRESS 1
+#if !defined(ENABLE_APPLE_PAY_REMOTE_UI)
+#define ENABLE_APPLE_PAY_REMOTE_UI 0
#endif
#if !defined(ENABLE_AUTOCORRECT)
-#define ENABLE_AUTOCORRECT 1
+#define ENABLE_AUTOCORRECT 0
#endif
#if !defined(ENABLE_AUTOCAPITALIZE)
-#define ENABLE_AUTOCAPITALIZE 1
+#define ENABLE_AUTOCAPITALIZE 0
#endif
-#if !defined(ENABLE_IOS_GESTURE_EVENTS) && USE(APPLE_INTERNAL_SDK)
-#define ENABLE_IOS_GESTURE_EVENTS 1
-#endif
-
#if !defined(ENABLE_TEXT_AUTOSIZING)
-#define ENABLE_TEXT_AUTOSIZING 1
+#define ENABLE_TEXT_AUTOSIZING 0
#endif
-#if !defined(ENABLE_IOS_TOUCH_EVENTS) && USE(APPLE_INTERNAL_SDK)
-#define ENABLE_IOS_TOUCH_EVENTS 1
+#if !defined(ENABLE_IOS_GESTURE_EVENTS)
+#define ENABLE_IOS_GESTURE_EVENTS 0
#endif
-#if !defined(ENABLE_METER_ELEMENT)
-#define ENABLE_METER_ELEMENT 0
+#if !defined(ENABLE_IOS_TOUCH_EVENTS)
+#define ENABLE_IOS_TOUCH_EVENTS 0
#endif
-#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
-#define ENABLE_NETSCAPE_PLUGIN_API 0
-#endif
-
-#if !defined(ENABLE_ORIENTATION_EVENTS)
-#define ENABLE_ORIENTATION_EVENTS 1
-#endif
-
-#if !defined(ENABLE_POINTER_LOCK)
-#define ENABLE_POINTER_LOCK 0
-#endif
-
-#if !defined(ENABLE_REMOTE_INSPECTOR)
-#define ENABLE_REMOTE_INSPECTOR 1
-#endif
-
-#if !defined(ENABLE_TEXT_CARET)
-#define ENABLE_TEXT_CARET 0
-#endif
-
-#if !defined(ENABLE_TEXT_SELECTION)
-#define ENABLE_TEXT_SELECTION 0
-#endif
-
-/* FIXME: Remove the USE(APPLE_INTERNAL_SDK) conjunct once we support touch events when building against
-the public iOS SDK. See <https://webkit.org/b/179167>. */
-#if !defined(ENABLE_TOUCH_EVENTS) && USE(APPLE_INTERNAL_SDK)
-#define ENABLE_TOUCH_EVENTS 1
-#endif
-
-#if !defined(ENABLE_WEB_ARCHIVE)
-#define ENABLE_WEB_ARCHIVE 1
-#endif
-
-#if !defined(ENABLE_WEBGL)
-#define ENABLE_WEBGL 1
-#endif
-
#if !defined(ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
-#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
+#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 0
#endif
-#if !defined(ENABLE_DOWNLOAD_ATTRIBUTE)
-#define ENABLE_DOWNLOAD_ATTRIBUTE 1
+#if !defined(ENABLE_WKPDFVIEW)
+#define ENABLE_WKPDFVIEW 0
#endif
-#if !defined(ENABLE_WKPDFVIEW) && PLATFORM(IOS)
-#define ENABLE_WKPDFVIEW 1
+#if !defined(ENABLE_PREVIEW_CONVERTER)
+#define ENABLE_PREVIEW_CONVERTER 0
#endif
-#if !defined(ENABLE_MEDIA_SOURCE)
-#define ENABLE_MEDIA_SOURCE 0
-#endif
-
-#if !defined(ENABLE_PREVIEW_CONVERTER) && PLATFORM(IOS)
-#define ENABLE_PREVIEW_CONVERTER 1
-#endif
-
#if !defined(ENABLE_META_VIEWPORT)
-#define ENABLE_META_VIEWPORT 1
+#define ENABLE_META_VIEWPORT 0
#endif
-#endif /* PLATFORM(IOS_FAMILY) */
-/* --------- Apple watchOS port --------- */
-#if PLATFORM(WATCHOS)
-
-#endif /* PLATFORM(WATCHOS) */
-
-/* --------- Apple macOS port (not iOS) --------- */
-#if PLATFORM(MAC)
-
-#if !defined(ENABLE_CONTENT_EXTENSIONS)
-#define ENABLE_CONTENT_EXTENSIONS 1
-#endif
-
-#if !defined(ENABLE_FULLSCREEN_API)
-#define ENABLE_FULLSCREEN_API 1
-#endif
-
-#if !defined(ENABLE_REMOTE_INSPECTOR)
-#define ENABLE_REMOTE_INSPECTOR 1
-#endif
-
-#if !defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS)
-#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 1
-#endif
-
-#if !defined(ENABLE_INSPECTOR_TELEMETRY)
-#define ENABLE_INSPECTOR_TELEMETRY 1
-#endif
-
-#if !defined(ENABLE_SMOOTH_SCROLLING)
-#define ENABLE_SMOOTH_SCROLLING 1
-#endif
-
-#if ENABLE(VIDEO)
-#if !defined(ENABLE_VIDEO_TRACK)
-#define ENABLE_VIDEO_TRACK 1
-#endif
-#endif
-
-#if !defined(ENABLE_WEB_ARCHIVE)
-#define ENABLE_WEB_ARCHIVE 1
-#endif
-
-#if !defined(ENABLE_WEB_AUDIO)
-#define ENABLE_WEB_AUDIO 1
-#endif
-
-#if !defined(ENABLE_CURSOR_VISIBILITY)
-#define ENABLE_CURSOR_VISIBILITY 1
-#endif
-
-#if !defined(ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
-#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
-#endif
-
-#if !defined(ENABLE_MAC_GESTURE_EVENTS) && USE(APPLE_INTERNAL_SDK)
-#define ENABLE_MAC_GESTURE_EVENTS 1
-#endif
-
-#if !defined(ENABLE_WEBPROCESS_NSRUNLOOP)
-#define ENABLE_WEBPROCESS_NSRUNLOOP __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
-#endif
-
-#if !defined(ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING)
-#define ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING ENABLE_WEBPROCESS_NSRUNLOOP
-#endif
-
-#if !defined(ENABLE_MEDIA_SOURCE)
-#define ENABLE_MEDIA_SOURCE 1
-#endif
-
-#endif /* PLATFORM(MAC) */
-
-/* --------- Apple Cocoa platforms --------- */
-
-#if PLATFORM(COCOA)
-
-#if !defined(ENABLE_LEGACY_ENCRYPTED_MEDIA)
-#if PLATFORM(MACCATALYST)
-#define ENABLE_LEGACY_ENCRYPTED_MEDIA 0
-#else
-#define ENABLE_LEGACY_ENCRYPTED_MEDIA 1
-#endif
-#endif
-
#if !defined(ENABLE_FILE_REPLACEMENT)
-#define ENABLE_FILE_REPLACEMENT 1
+#define ENABLE_FILE_REPLACEMENT 0
#endif
-#if !defined(ENABLE_PAYMENT_REQUEST)
-#define ENABLE_PAYMENT_REQUEST 1
-#endif
-
-#if !defined(ENABLE_ASYNC_SCROLLING)
-#define ENABLE_ASYNC_SCROLLING 1
-#endif
-
#if !defined(ENABLE_UI_SIDE_COMPOSITING)
-#define ENABLE_UI_SIDE_COMPOSITING 1
+#define ENABLE_UI_SIDE_COMPOSITING 0
#endif
-#endif /* PLATFORM(COCOA) */
-
-#if !PLATFORM(COCOA)
-
-#if !defined(JSC_OBJC_API_ENABLED)
-#define JSC_OBJC_API_ENABLED 0
-#endif
-
-#endif /* !PLATFORM(COCOA) */
-
-
-/* --------- Apple Windows port --------- */
-#if PLATFORM(WIN) && !PLATFORM(WIN_CAIRO)
-
-#if !defined(ENABLE_FULLSCREEN_API)
-#define ENABLE_FULLSCREEN_API 1
-#endif
-
-#if !defined(ENABLE_WEB_ARCHIVE)
-#define ENABLE_WEB_ARCHIVE 1
-#endif
-
-#if !defined(ENABLE_WEBGL)
-#define ENABLE_WEBGL 0
-#endif
-
-#if !defined(ENABLE_GEOLOCATION)
-#define ENABLE_GEOLOCATION 1
-#endif
-
-#endif /* PLATFORM(WIN) && !PLATFORM(WIN_CAIRO) */
-
-/* --------- Windows CAIRO port --------- */
-/* PLATFORM(WIN_CAIRO) is a specialization of PLATFORM(WIN). */
-/* PLATFORM(WIN) is always enabled when PLATFORM(WIN_CAIRO) is enabled. */
-#if PLATFORM(WIN_CAIRO)
-
-#if !defined(ENABLE_WEB_ARCHIVE)
-#define ENABLE_WEB_ARCHIVE 1
-#endif
-
-#if !defined(ENABLE_WEBGL)
-#define ENABLE_WEBGL 1
-#endif
-
-#if !defined(ENABLE_GEOLOCATION)
-#define ENABLE_GEOLOCATION 1
-#endif
-
-#endif /* PLATFORM(WIN_CAIRO) */
-
-/* ENABLE macro defaults for WebCore */
-/* Do not use PLATFORM() tests in this section ! */
-
#if !defined(ENABLE_3D_TRANSFORMS)
#define ENABLE_3D_TRANSFORMS 0
#endif
@@ -719,9 +517,54 @@
#define ENABLE_SERVICE_WORKER 1
#endif
+#if !defined(ENABLE_MONOSPACE_FONT_EXCEPTION)
+#define ENABLE_MONOSPACE_FONT_EXCEPTION 0
+#endif
-/* JIT Features */
+#if !defined(ENABLE_FULL_KEYBOARD_ACCESS)
+#define ENABLE_FULL_KEYBOARD_ACCESS 0
+#endif
+#if !defined(ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING)
+#define ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING 0
+#endif
+
+#if !defined(ENABLE_WEB_PLAYBACK_CONTROLS_MANAGER)
+#define ENABLE_WEB_PLAYBACK_CONTROLS_MANAGER 0
+#endif
+
+#if !defined(ENABLE_RESOURCE_USAGE)
+#define ENABLE_RESOURCE_USAGE 0
+#endif
+
+#if !defined(ENABLE_SEC_ITEM_SHIM)
+#define ENABLE_SEC_ITEM_SHIM 0
+#endif
+
+#if !defined(ENABLE_DATA_DETECTION)
+#define ENABLE_DATA_DETECTION 0
+#endif
+
+/*
+ * Enable this to put each IsoHeap and other allocation categories into their own malloc heaps, so that tools like vmmap can show how big each heap is.
+ * Turn BENABLE_MALLOC_HEAP_BREAKDOWN on in bmalloc together when using this.
+ */
+#if !defined(ENABLE_MALLOC_HEAP_BREAKDOWN)
+#define ENABLE_MALLOC_HEAP_BREAKDOWN 0
+#endif
+
+
+
+
+/* FIXME: This section of the file has not been cleaned up yet and needs major work. */
+
+/* FIXME: JSC_OBJC_API_ENABLED does not match the normal ENABLE naming convention. */
+#if !PLATFORM(COCOA)
+#if !defined(JSC_OBJC_API_ENABLED)
+#define JSC_OBJC_API_ENABLED 0
+#endif
+#endif
+
/* The JIT is enabled by default on all x86-64 & ARM64 platforms. */
#if !defined(ENABLE_JIT) && (CPU(X86_64) || CPU(ARM64)) && !CPU(APPLE_ARMV7K)
#define ENABLE_JIT 1
@@ -942,10 +785,6 @@
#define ENABLE_CSS_SELECTOR_JIT 1
#endif
-#if PLATFORM(COCOA) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST)
-#define ENABLE_DATA_DETECTION 1
-#endif
-
#if CPU(ARM_THUMB2) || CPU(ARM64)
#define ENABLE_BRANCH_COMPACTION 1
#endif
@@ -970,10 +809,6 @@
#define ENABLE_TREE_DEBUGGING 1
#endif
-#if PLATFORM(COCOA)
-#define ENABLE_RESOURCE_USAGE 1
-#endif
-
#if !defined(ENABLE_OPENTYPE_VERTICAL) && PLATFORM(GTK) || PLATFORM(WPE)
#define ENABLE_OPENTYPE_VERTICAL 1
#endif
@@ -982,43 +817,15 @@
#define ENABLE_OPENTYPE_MATH 1
#endif
-/*
- * Enable this to put each IsoHeap and other allocation categories into their own malloc heaps, so that tools like vmmap can show how big each heap is.
- * Turn BENABLE_MALLOC_HEAP_BREAKDOWN on in bmalloc together when using this.
- */
-#if !defined(ENABLE_MALLOC_HEAP_BREAKDOWN)
-#define ENABLE_MALLOC_HEAP_BREAKDOWN 0
-#endif
/* Disable SharedArrayBuffers until Spectre security concerns are mitigated. */
#define ENABLE_SHARED_ARRAY_BUFFER 0
-#if PLATFORM(MAC)
-#define ENABLE_WEB_PLAYBACK_CONTROLS_MANAGER 1
-#endif
-#if PLATFORM(COCOA)
-/* FIXME: This is a USE style macro, as it triggers the use of CFURLConnection framework stubs. */
-/* FIXME: Is this still necessary? CFURLConnection isn't used on Cocoa platforms any more. */
-#define ENABLE_SEC_ITEM_SHIM 1
-#endif
-
-#if PLATFORM(MAC)
-#define ENABLE_FULL_KEYBOARD_ACCESS 1
-#endif
-
#if ((PLATFORM(COCOA) || PLATFORM(PLAYSTATION) || PLATFORM(WPE)) && ENABLE(ASYNC_SCROLLING)) || PLATFORM(GTK)
#define ENABLE_KINETIC_SCROLLING 1
#endif
-#if !defined(ENABLE_MONOSPACE_FONT_EXCEPTION) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) || PLATFORM(WATCHOS) || PLATFORM(APPLETV))
-#define ENABLE_MONOSPACE_FONT_EXCEPTION 1
-#endif
-
-#if !defined(ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING) && PLATFORM(MACCATALYST)
-#define ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING 1
-#endif
-
/* This feature works by embedding the OpcodeID in the 32 bit just before the generated LLint code
that executes each opcode. It cannot be supported by the CLoop since there's no way to embed the
OpcodeID word in the CLoop's switch statement cases. It is also currently not implemented for MSVC.
@@ -1028,6 +835,9 @@
#endif
+
+
+
/* Asserts, invariants for macro definitions */
#if ENABLE(VIDEO_TRACK) && !ENABLE(VIDEO)
Added: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (0 => 255577)
--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h (rev 0)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2020-02-03 19:29:22 UTC (rev 255577)
@@ -0,0 +1,244 @@
+/*
+ * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Torch Mobile, Inc.
+ * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. 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.
+ */
+
+#pragma once
+
+#ifndef WTF_PLATFORM_GUARD_AGAINST_INDIRECT_INCLUSION
+#error "Please #include <wtf/Platform.h> instead of this file directly."
+#endif
+
+#if !PLATFORM(COCOA)
+#error "This file should only be included when building for one of Apple's Cocoa platforms."
+#endif
+
+
+/* --------- Apple Cocoa platforms --------- */
+
+#if !defined(ENABLE_AIRPLAY_PICKER) && (PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST))
+#define ENABLE_AIRPLAY_PICKER 1
+#endif
+
+#if !defined(ENABLE_APPLE_PAY_REMOTE_UI) && (PLATFORM(IOS_FAMILY) && !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS))
+#define ENABLE_APPLE_PAY_REMOTE_UI 1
+#endif
+
+#if !defined(ENABLE_CONTENT_EXTENSIONS)
+#define ENABLE_CONTENT_EXTENSIONS 1
+#endif
+
+#if !defined(ENABLE_CONTEXT_MENUS) && PLATFORM(IOS_FAMILY)
+#define ENABLE_CONTEXT_MENUS 0
+#endif
+
+#if !defined(ENABLE_CONTEXT_MENU_EVENT) && (PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST))
+#define ENABLE_CONTEXT_MENU_EVENT 0
+#endif
+
+#if !defined(ENABLE_CUSTOM_CURSOR_SUPPORT) && PLATFORM(IOS_FAMILY)
+#define ENABLE_CUSTOM_CURSOR_SUPPORT 0
+#endif
+
+#if !defined(ENABLE_DRAG_SUPPORT) && PLATFORM(IOS_FAMILY)
+#define ENABLE_DRAG_SUPPORT 0
+#endif
+
+#if !defined(ENABLE_GEOLOCATION) && PLATFORM(IOS_FAMILY)
+#define ENABLE_GEOLOCATION 1
+#endif
+
+#if !defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS)
+#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 1
+#endif
+
+#if !defined(ENABLE_INSPECTOR_TELEMETRY) && PLATFORM(MAC)
+#define ENABLE_INSPECTOR_TELEMETRY 1
+#endif
+
+#if !defined(ENABLE_LETTERPRESS) && PLATFORM(IOS_FAMILY)
+#define ENABLE_LETTERPRESS 1
+#endif
+
+#if !defined(ENABLE_AUTOCORRECT) && PLATFORM(IOS_FAMILY)
+#define ENABLE_AUTOCORRECT 1
+#endif
+
+#if !defined(ENABLE_AUTOCAPITALIZE) && PLATFORM(IOS_FAMILY)
+#define ENABLE_AUTOCAPITALIZE 1
+#endif
+
+#if !defined(ENABLE_IOS_GESTURE_EVENTS) && (PLATFORM(IOS_FAMILY) && USE(APPLE_INTERNAL_SDK))
+#define ENABLE_IOS_GESTURE_EVENTS 1
+#endif
+
+#if !defined(ENABLE_IOS_TOUCH_EVENTS) && (PLATFORM(IOS_FAMILY) && USE(APPLE_INTERNAL_SDK))
+#define ENABLE_IOS_TOUCH_EVENTS 1
+#endif
+
+#if !defined(ENABLE_TEXT_AUTOSIZING) && PLATFORM(IOS_FAMILY)
+#define ENABLE_TEXT_AUTOSIZING 1
+#endif
+
+#if !defined(ENABLE_METER_ELEMENT) && PLATFORM(IOS_FAMILY)
+#define ENABLE_METER_ELEMENT 0
+#endif
+
+#if !defined(ENABLE_NETSCAPE_PLUGIN_API) && PLATFORM(IOS_FAMILY)
+#define ENABLE_NETSCAPE_PLUGIN_API 0
+#endif
+
+#if !defined(ENABLE_ORIENTATION_EVENTS) && PLATFORM(IOS_FAMILY)
+#define ENABLE_ORIENTATION_EVENTS 1
+#endif
+
+#if !defined(ENABLE_POINTER_LOCK) && PLATFORM(IOS_FAMILY)
+#define ENABLE_POINTER_LOCK 0
+#endif
+
+#if !defined(ENABLE_REMOTE_INSPECTOR)
+#define ENABLE_REMOTE_INSPECTOR 1
+#endif
+
+#if !defined(ENABLE_TEXT_CARET) && PLATFORM(IOS_FAMILY)
+#define ENABLE_TEXT_CARET 0
+#endif
+
+#if !defined(ENABLE_TEXT_SELECTION) && PLATFORM(IOS_FAMILY)
+#define ENABLE_TEXT_SELECTION 0
+#endif
+
+#if !defined(ENABLE_TOUCH_EVENTS) && (PLATFORM(IOS_FAMILY) && USE(APPLE_INTERNAL_SDK))
+#define ENABLE_TOUCH_EVENTS 1
+#endif
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+
+#if !defined(ENABLE_WEBGL) && PLATFORM(IOS_FAMILY)
+#define ENABLE_WEBGL 1
+#endif
+
+#if !defined(ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
+#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
+#endif
+
+#if !defined(ENABLE_WKPDFVIEW) && PLATFORM(IOS)
+#define ENABLE_WKPDFVIEW 1
+#endif
+
+#if !defined(ENABLE_MEDIA_SOURCE) && PLATFORM(MAC)
+#define ENABLE_MEDIA_SOURCE 1
+#endif
+
+#if !defined(ENABLE_PREVIEW_CONVERTER) && PLATFORM(IOS)
+#define ENABLE_PREVIEW_CONVERTER 1
+#endif
+
+#if !defined(ENABLE_META_VIEWPORT) && PLATFORM(IOS_FAMILY)
+#define ENABLE_META_VIEWPORT 1
+#endif
+
+#if !defined(ENABLE_FULLSCREEN_API) && PLATFORM(MAC)
+#define ENABLE_FULLSCREEN_API 1
+#endif
+
+#if !defined(ENABLE_SMOOTH_SCROLLING) && PLATFORM(MAC)
+#define ENABLE_SMOOTH_SCROLLING 1
+#endif
+
+#if !defined(ENABLE_VIDEO_TRACK) && PLATFORM(MAC) && ENABLE(VIDEO)
+#define ENABLE_VIDEO_TRACK 1
+#endif
+
+#if !defined(ENABLE_WEB_AUDIO) && PLATFORM(MAC)
+#define ENABLE_WEB_AUDIO 1
+#endif
+
+#if !defined(ENABLE_CURSOR_VISIBILITY) && PLATFORM(MAC)
+#define ENABLE_CURSOR_VISIBILITY 1
+#endif
+
+#if !defined(ENABLE_MAC_GESTURE_EVENTS) && (PLATFORM(MAC) && USE(APPLE_INTERNAL_SDK))
+#define ENABLE_MAC_GESTURE_EVENTS 1
+#endif
+
+#if !defined(ENABLE_WEBPROCESS_NSRUNLOOP) && (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400)
+#define ENABLE_WEBPROCESS_NSRUNLOOP 1
+#endif
+
+#if !defined(ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING) && (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400)
+#define ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING 1
+#endif
+
+#if !defined(ENABLE_LEGACY_ENCRYPTED_MEDIA) && !PLATFORM(MACCATALYST)
+#define ENABLE_LEGACY_ENCRYPTED_MEDIA 1
+#endif
+
+#if !defined(ENABLE_FILE_REPLACEMENT)
+#define ENABLE_FILE_REPLACEMENT 1
+#endif
+
+#if !defined(ENABLE_PAYMENT_REQUEST)
+#define ENABLE_PAYMENT_REQUEST 1
+#endif
+
+#if !defined(ENABLE_ASYNC_SCROLLING)
+#define ENABLE_ASYNC_SCROLLING 1
+#endif
+
+#if !defined(ENABLE_UI_SIDE_COMPOSITING)
+#define ENABLE_UI_SIDE_COMPOSITING 1
+#endif
+
+#if !defined(ENABLE_FULL_KEYBOARD_ACCESS) && PLATFORM(MAC)
+#define ENABLE_FULL_KEYBOARD_ACCESS 1
+#endif
+
+#if !defined(ENABLE_MONOSPACE_FONT_EXCEPTION) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) || PLATFORM(WATCHOS) || PLATFORM(APPLETV))
+#define ENABLE_MONOSPACE_FONT_EXCEPTION 1
+#endif
+
+#if !defined(ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING) && PLATFORM(MACCATALYST)
+#define ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING 1
+#endif
+
+#if !defined(ENABLE_WEB_PLAYBACK_CONTROLS_MANAGER) && PLATFORM(MAC)
+#define ENABLE_WEB_PLAYBACK_CONTROLS_MANAGER 1
+#endif
+
+#if !defined(ENABLE_RESOURCE_USAGE)
+#define ENABLE_RESOURCE_USAGE 1
+#endif
+
+#if !defined(ENABLE_SEC_ITEM_SHIM)
+#define ENABLE_SEC_ITEM_SHIM 1
+#endif
+
+#if !defined(ENABLE_DATA_DETECTION) && (!PLATFORM(WATCHOS) && !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST))
+#define ENABLE_DATA_DETECTION 1
+#endif
Added: trunk/Source/WTF/wtf/PlatformEnableWinApple.h (0 => 255577)
--- trunk/Source/WTF/wtf/PlatformEnableWinApple.h (rev 0)
+++ trunk/Source/WTF/wtf/PlatformEnableWinApple.h 2020-02-03 19:29:22 UTC (rev 255577)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Torch Mobile, Inc.
+ * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. 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.
+ */
+
+#pragma once
+
+#ifndef WTF_PLATFORM_GUARD_AGAINST_INDIRECT_INCLUSION
+#error "Please #include <wtf/Platform.h> instead of this file directly."
+#endif
+
+#if !(PLATFORM(WIN) && !PLATFORM(WIN_CAIRO))
+#error "This file should only be included when building Apple's Windows port."
+#endif
+
+
+/* --------- Apple Windows port --------- */
+
+#if !defined(ENABLE_FULLSCREEN_API)
+#define ENABLE_FULLSCREEN_API 1
+#endif
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+
+#if !defined(ENABLE_WEBGL)
+#define ENABLE_WEBGL 0
+#endif
+
+#if !defined(ENABLE_GEOLOCATION)
+#define ENABLE_GEOLOCATION 1
+#endif
Added: trunk/Source/WTF/wtf/PlatformEnableWinCairo.h (0 => 255577)
--- trunk/Source/WTF/wtf/PlatformEnableWinCairo.h (rev 0)
+++ trunk/Source/WTF/wtf/PlatformEnableWinCairo.h 2020-02-03 19:29:22 UTC (rev 255577)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Torch Mobile, Inc.
+ * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. 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.
+ */
+
+#pragma once
+
+#ifndef WTF_PLATFORM_GUARD_AGAINST_INDIRECT_INCLUSION
+#error "Please #include <wtf/Platform.h> instead of this file directly."
+#endif
+
+#if !PLATFORM(WIN_CAIRO)
+#error "This file should only be included when building the Windows CAIRO port."
+#endif
+
+
+/* --------- Windows CAIRO port --------- */
+
+/* PLATFORM(WIN_CAIRO) is a specialization of PLATFORM(WIN). */
+/* PLATFORM(WIN) is always enabled when PLATFORM(WIN_CAIRO) is enabled. */
+
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+
+#if !defined(ENABLE_WEBGL)
+#define ENABLE_WEBGL 1
+#endif
+
+#if !defined(ENABLE_GEOLOCATION)
+#define ENABLE_GEOLOCATION 1
+#endif
Modified: trunk/Source/WebKit/ChangeLog (255576 => 255577)
--- trunk/Source/WebKit/ChangeLog 2020-02-03 19:11:18 UTC (rev 255576)
+++ trunk/Source/WebKit/ChangeLog 2020-02-03 19:29:22 UTC (rev 255577)
@@ -1,3 +1,15 @@
+2020-02-03 Sam Weinig <[email protected]>
+
+ Start splitting platform specific overrides of default enable behavior into their own files
+ https://bugs.webkit.org/show_bug.cgi?id=207105
+
+ Reviewed by Dean Jackson.
+
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
+ Switch to using the ENABLE() helper macro to correctly guard against the case that
+ ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0.
+
2020-02-03 Keith Rollin <[email protected]>
Unreviewed watchOS build fix after r255559- add missing semi-colon.
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (255576 => 255577)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2020-02-03 19:11:18 UTC (rev 255576)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2020-02-03 19:29:22 UTC (rev 255577)
@@ -896,7 +896,7 @@
if (!pluginOrigin.isEmpty() && m_plugInAutoStartOrigins.contains(pluginOrigin))
return true;
-#ifdef ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC
+#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
// The plugin wasn't in the general whitelist, so check if it similar to the primary plugin for the page (if we've found one).
if (webPage.matchesPrimaryPlugIn(pageOrigin, pluginOrigin, mimeType))
return true;