macCatalyst: Get TestWebKitAPI building
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Nov 2019 21:29:25 +0000 (21:29 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Nov 2019 21:29:25 +0000 (21:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=203728

Reviewed by Alexey Proskuryakov.

.:

* Makefile:
Descend into Tools/.

Source/ThirdParty:

* gtest/xcode/Config/General.xcconfig:
* gtest/xcode/Config/SDKVariant.xcconfig: Added.
Add SDKVariant.xcconfig to gtest so that it builds into the correct directory.

Tools:

* Makefile:
Only build gtest and TestWebKitAPI for macCatalyst.

* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
Make use of WK_COCOA_TOUCH instead of SDK conditionals.

* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
Fix some #ifdefs for macCatalyst.

* TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollToRevealSelection.mm:
(-[LegacyLoadingDelegate webViewDidFinishLoad:]):
* TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
(-[AsyncPolicyDelegateForInsetTest webView:didFinishNavigation:]):
(TestWebKitAPI::TEST):
Util::runUntil wants a bool, not a BOOL.

* TestWebKitAPI/config.h:
Import WebKitLegacy.h after WebKit.h. Traditionally WebKit.h includes
WebKitLegacy.h, except in macCatalyst. Many tests depend on being able
to get WebKitLegacy.h this way.

* Scripts/webkitpy/style/checkers/sdkvariant.py:

* Scripts/webkitpy/port/factory.py:
* Scripts/webkitpy/port/mac.py:
Add a MacCatalyst port behind --maccatalyst, and do the bare minimum
required to get it working and finding the right binaries.
It inherits from Mac instead of iOS because for the purposes of
finding and running binaries, dealing with I/O, etc., these are
100% bona fide macOS products.

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

19 files changed:
ChangeLog
Makefile
Source/ThirdParty/ChangeLog
Source/ThirdParty/gtest/xcode/Config/General.xcconfig
Source/ThirdParty/gtest/xcode/Config/SDKVariant.xcconfig [new file with mode: 0644]
Tools/ChangeLog
Tools/Makefile
Tools/Scripts/webkitpy/port/factory.py
Tools/Scripts/webkitpy/port/mac.py
Tools/Scripts/webkitpy/style/checkers/sdkvariant.py
Tools/TestWebKitAPI/Configurations/Base.xcconfig
Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
Tools/TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm
Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollToRevealSelection.mm
Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm
Tools/TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm
Tools/TestWebKitAPI/config.h
Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm

index e49b83e..bc8f9d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2019-11-01  Tim Horton  <timothy_horton@apple.com>
+
+        macCatalyst: Get TestWebKitAPI building
+        https://bugs.webkit.org/show_bug.cgi?id=203728
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Makefile:
+        Descend into Tools/.
+
 2019-10-31  Alex Christensen  <achristensen@apple.com>
 
         Enable more features in Mac CMake build
index 43b2d7f..1c57470 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,4 @@
-TOOLS_MODULE = Tools
-
-ifeq (iosmac,$(SDK_VARIANT))
-       DISABLE_WEBKIT_TOOLS = 1
-endif
-
-ifneq (,$(DISABLE_WEBKIT_TOOLS))
-       TOOLS_MODULE =
-endif
-
-MODULES = WebKitLibraries Source $(TOOLS_MODULE)
+MODULES = WebKitLibraries Source Tools
 
 all:
        @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
index 30f2446..0562d55 100644 (file)
@@ -1,3 +1,14 @@
+2019-11-01  Tim Horton  <timothy_horton@apple.com>
+
+        macCatalyst: Get TestWebKitAPI building
+        https://bugs.webkit.org/show_bug.cgi?id=203728
+
+        Reviewed by Alexey Proskuryakov.
+
+        * gtest/xcode/Config/General.xcconfig:
+        * gtest/xcode/Config/SDKVariant.xcconfig: Added.
+        Add SDKVariant.xcconfig to gtest so that it builds into the correct directory.
+
 2019-08-29  Keith Rollin  <krollin@apple.com>
 
         Update .xcconfig symbols to reflect the current set of past and future product versions.
index 51b1eb5..4dff087 100644 (file)
@@ -8,6 +8,7 @@
 //
 
 #include? "../../../../../../Internal/Configurations/HaveInternalSDK.xcconfig"
+#include "SDKVariant.xcconfig"
 
 USE_INTERNAL_SDK = $(USE_INTERNAL_SDK_$(CONFIGURATION));
 USE_INTERNAL_SDK_Production = YES;
diff --git a/Source/ThirdParty/gtest/xcode/Config/SDKVariant.xcconfig b/Source/ThirdParty/gtest/xcode/Config/SDKVariant.xcconfig
new file mode 100644 (file)
index 0000000..fcdf7e6
--- /dev/null
@@ -0,0 +1,45 @@
+// Copyright (C) 2019 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.
+
+WK_EMPTY_ = YES;
+WK_NOT_ = YES;
+WK_NOT_YES = NO;
+
+WK_ALTERNATE_FRAMEWORKS_DIR = $(WK_ALTERNATE_FRAMEWORKS_DIR_$(SDK_VARIANT));
+WK_ALTERNATE_FRAMEWORKS_DIR_iosmac = /System/iOSSupport;
+WK_USE_ALTERNATE_FRAMEWORKS_DIR = $(WK_NOT_$(WK_EMPTY_$(WK_ALTERNATE_FRAMEWORKS_DIR)));
+
+WK_ALTERNATE_PLATFORM_NAME = $(WK_ALTERNATE_PLATFORM_NAME_$(SDK_VARIANT));
+WK_ALTERNATE_PLATFORM_NAME_iosmac = maccatalyst;
+WK_USE_ALTERNATE_PLATFORM_NAME = $(WK_NOT_$(WK_EMPTY_$(WK_ALTERNATE_PLATFORM_NAME)));
+
+WK_ALTERNATE_WEBKIT_SDK_PATH = $(WK_ALTERNATE_WEBKIT_SDK_PATH_$(WK_USE_ALTERNATE_FRAMEWORKS_DIR));
+WK_ALTERNATE_WEBKIT_SDK_PATH_YES = $(WK_ALTERNATE_FRAMEWORKS_DIR)/;
+
+WK_PLATFORM_NAME = $(WK_PLATFORM_NAME_ALTERNATE_$(WK_USE_ALTERNATE_PLATFORM_NAME));
+WK_PLATFORM_NAME_ALTERNATE_YES = $(WK_ALTERNATE_PLATFORM_NAME);
+WK_PLATFORM_NAME_ALTERNATE_NO = $(PLATFORM_NAME);
+
+EFFECTIVE_PLATFORM_NAME = $(EFFECTIVE_PLATFORM_NAME_ALTERNATE_$(WK_USE_ALTERNATE_PLATFORM_NAME));
+EFFECTIVE_PLATFORM_NAME_ALTERNATE_YES = -$(WK_ALTERNATE_PLATFORM_NAME);
+EFFECTIVE_PLATFORM_NAME_ALTERNATE_NO = $(EFFECTIVE_PLATFORM_NAME);
index 643c48a..9f1be0a 100644 (file)
@@ -1,3 +1,45 @@
+2019-11-01  Tim Horton  <timothy_horton@apple.com>
+
+        macCatalyst: Get TestWebKitAPI building
+        https://bugs.webkit.org/show_bug.cgi?id=203728
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Makefile:
+        Only build gtest and TestWebKitAPI for macCatalyst.
+
+        * TestWebKitAPI/Configurations/Base.xcconfig:
+        * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
+        Make use of WK_COCOA_TOUCH instead of SDK conditionals.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
+        * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
+        * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
+        * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
+        Fix some #ifdefs for macCatalyst.
+
+        * TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollToRevealSelection.mm:
+        (-[LegacyLoadingDelegate webViewDidFinishLoad:]):
+        * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
+        (-[AsyncPolicyDelegateForInsetTest webView:didFinishNavigation:]):
+        (TestWebKitAPI::TEST):
+        Util::runUntil wants a bool, not a BOOL.
+
+        * TestWebKitAPI/config.h:
+        Import WebKitLegacy.h after WebKit.h. Traditionally WebKit.h includes
+        WebKitLegacy.h, except in macCatalyst. Many tests depend on being able
+        to get WebKitLegacy.h this way.
+
+        * Scripts/webkitpy/style/checkers/sdkvariant.py:
+
+        * Scripts/webkitpy/port/factory.py:
+        * Scripts/webkitpy/port/mac.py:
+        Add a MacCatalyst port behind --maccatalyst, and do the bare minimum
+        required to get it working and finding the right binaries.
+        It inherits from Mac instead of iOS because for the purposes of
+        finding and running binaries, dealing with I/O, etc., these are
+        100% bona fide macOS products.
+
 2019-11-01  Aakash Jain  <aakash_jain@apple.com>
 
         [ews] Improve summary string when there are flaky failures in API tests
index 5d48e77..22b2bfe 100644 (file)
@@ -16,6 +16,10 @@ ifeq (,$(DO_NOT_BUILD_IMAGE_DIFF))
        MODULES += ImageDiff
 endif
 
+ifeq (iosmac,$(SDK_VARIANT))
+       MODULES = ../Source/ThirdParty/gtest/xcode TestWebKitAPI
+endif
+
 all:
        @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
        if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
index d063a72..684cd0b 100644 (file)
@@ -68,6 +68,9 @@ def platform_options(use_globs=False):
         optparse.make_option('--ftw', action='store_const', dest='platform',
             const=('ftw'),
             help=('Alias for --platform=ftw')),
+        optparse.make_option('--maccatalyst', action='store_const', dest='platform',
+            const=('maccatalyst'),
+            help=('Alias for --platform=maccatalyst')),
         ] + (config.apple_additions().platform_options() if config.apple_additions() else [])
 
 
@@ -105,6 +108,7 @@ class PortFactory(object):
         'watch_simulator.WatchSimulatorPort',
         'watch_device.WatchDevicePort',
         'jsc_only.JscOnlyPort',
+        'mac.MacCatalystPort',
         'mac.MacPort',
         'mock_drt.MockDRTPort',
         'test.TestPort',
index b7f6ea6..6a5a00d 100644 (file)
@@ -36,7 +36,7 @@ from webkitpy.common.system.executive import ScriptError
 from webkitpy.common.version import Version
 from webkitpy.common.version_name_map import PUBLIC_TABLE, INTERNAL_TABLE
 from webkitpy.common.version_name_map import VersionNameMap
-from webkitpy.port.config import apple_additions
+from webkitpy.port.config import apple_additions, Config
 from webkitpy.port.darwin import DarwinPort
 
 _log = logging.getLogger(__name__)
@@ -284,3 +284,11 @@ class MacPort(DarwinPort):
             configuration['model'] = match.group('model')
 
         return configuration
+
+
+class MacCatalystPort(MacPort):
+    port_name = "maccatalyst"
+
+    def __init__(self, *args, **kwargs):
+        super(MacCatalystPort, self).__init__(*args, **kwargs)
+        self._config = Config(self._executive, self._filesystem, MacCatalystPort.port_name)
index 8bc62bf..968a0a3 100644 (file)
@@ -49,6 +49,7 @@ SDK_VARIANT_FILES = [
     "Source/WebCore/Configurations/SDKVariant.xcconfig",
     "Source/WebCore/PAL/Configurations/SDKVariant.xcconfig",
     "Source/ThirdParty/ANGLE/Configurations/SDKVariant.xcconfig",
+    "Source/ThirdParty/gtest/xcode/Config/SDKVariant.xcconfig",
     "Source/ThirdParty/libwebrtc/Configurations/SDKVariant.xcconfig",
 ]
 
index 3fa3bab..eec13f6 100644 (file)
@@ -97,8 +97,9 @@ AD_HOC_CODE_SIGNING_ALLOWED[sdk=iphonesimulator*] = YES;
 WEBKIT_UMBRELLA_FRAMEWORKS_DIR = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
 WEBCORE_PRIVATE_HEADERS_DIR = $(WEBKIT_UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders;
 
-EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = *IOS.h *IOS.cpp *IOS.mm;
-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *Mac.h *Mac.cpp *Mac.mm */mac/*;
+EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(WK_COCOA_TOUCH));
+EXCLUDED_SOURCE_FILE_NAMES_ = *IOS.h *IOS.cpp *IOS.mm;
+EXCLUDED_SOURCE_FILE_NAMES_cocoatouch = *Mac.h *Mac.cpp *Mac.mm */mac/*;
 
 OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS) --system-header-prefix=WebKit/;
 OTHER_CFLAGS[sdk=macosx*] = $(inherited) -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
index 6a6c56f..1dd0987 100644 (file)
@@ -33,8 +33,9 @@ WK_TARGET_IOS_VERSION_MAJOR = $(IPHONEOS_DEPLOYMENT_TARGET:base); // e.g. iOS 9.
 WK_PRIVATE_FRAMEWORKS_DIR_[sdk=iphone*] = $(WK_PRIVATE_FRAMEWORKS_DIR_iphone_$(USE_INTERNAL_SDK));
 WK_PRIVATE_FRAMEWORKS_DIR_iphone_ = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/$(WK_TARGET_IOS_VERSION_MAJOR);
 
-FRAMEWORK_SEARCH_PATHS[sdk=mac*] = $(inherited) $(WK_PRIVATE_FRAMEWORKS_DIR) $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
-FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(inherited) $(WK_PRIVATE_FRAMEWORKS_DIR);
+FRAMEWORK_SEARCH_PATHS = $(FRAMEWORK_SEARCH_PATHS_$(WK_COCOA_TOUCH));
+FRAMEWORK_SEARCH_PATHS_ = $(inherited) $(WK_PRIVATE_FRAMEWORKS_DIR) $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
+FRAMEWORK_SEARCH_PATHS_cocoatouch = $(inherited) $(WK_PRIVATE_FRAMEWORKS_DIR);
 
 UNEXPORTED_SYMBOL_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZN7testing4Test16TearDownTestCaseEv -Wl,-unexported_symbol -Wl,__ZN7testing4Test13SetUpTestCaseEv
 
@@ -47,15 +48,14 @@ WK_AUTHKIT_LDFLAGS_MACOS_SINCE_1015 = -framework AuthKit;
 
 WK_PDFKIT_LDFLAGS = $(WK_PDFKIT_LDFLAGS_$(WK_PLATFORM_NAME));
 WK_PDFKIT_LDFLAGS_macosx = -framework PDFKit;
-WK_PDFKIT_LDFLAGS_maccatalyst = -framework PDFKit;
 WK_PDFKIT_LDFLAGS_iphoneos = -framework PDFKit;
 WK_PDFKIT_LDFLAGS_iphonesimulator = -framework PDFKit;
 
-OTHER_LDFLAGS = $(inherited) $(UNEXPORTED_SYMBOL_LDFLAGS) -lgtest -force_load $(BUILT_PRODUCTS_DIR)/libTestWebKitAPI.a -framework JavaScriptCore -framework WebKit -lWebCoreTestSupport $(WK_AUTHKIT_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(OTHER_LDFLAGS_PLATFORM);
-OTHER_LDFLAGS_PLATFORM[sdk=macosx*] = -framework Cocoa -framework Carbon;
+OTHER_LDFLAGS = $(inherited) $(UNEXPORTED_SYMBOL_LDFLAGS) -lgtest -force_load $(BUILT_PRODUCTS_DIR)/libTestWebKitAPI.a -framework JavaScriptCore -framework WebKit -lWebCoreTestSupport $(WK_AUTHKIT_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(OTHER_LDFLAGS_PLATFORM_$(WK_COCOA_TOUCH));
+OTHER_LDFLAGS_PLATFORM_ = -framework Cocoa -framework Carbon;
 
 // FIXME: This should not be built on iOS. Instead we should create and use a TestWebKitAPI application.
-OTHER_LDFLAGS_PLATFORM[sdk=iphone*] = -framework WebCore -framework CoreGraphics -framework UIKit -framework MobileCoreServices;
+OTHER_LDFLAGS_PLATFORM_cocoatouch = -framework WebCore -framework CoreGraphics -framework UIKit -framework MobileCoreServices;
 
 LD_RUNPATH_SEARCH_PATHS = "@loader_path";
 
index 785576f..e637bb4 100644 (file)
@@ -145,7 +145,7 @@ TEST(Challenge, SecIdentity)
 
 @end
 
-#if HAVE(SEC_KEY_PROXY)
+#if HAVE(SEC_KEY_PROXY) && HAVE(SSL)
 TEST(Challenge, ClientCertificate)
 {
     using namespace TestWebKitAPI;
index d25e005..658ec21 100644 (file)
@@ -25,7 +25,7 @@
 
 #import "config.h"
 
-#if ENABLE(DRAG_SUPPORT)
+#if ENABLE(DRAG_SUPPORT) && !PLATFORM(MACCATALYST)
 
 #import "DragAndDropSimulator.h"
 #import "PlatformUtilities.h"
@@ -209,4 +209,4 @@ TEST(DragAndDropTests, ColorInputEvents)
 
 #endif // ENABLE(INPUT_TYPE_COLOR)
 
-#endif // ENABLE(DRAG_SUPPORT)
+#endif // ENABLE(DRAG_SUPPORT) && !PLATFORM(MACCATALYST)
index 1afdc7b..0b5e3d2 100644 (file)
@@ -38,12 +38,12 @@ IGNORE_WARNINGS_BEGIN("deprecated-implementations")
 @end
 
 @implementation LegacyLoadingDelegate {
-    BOOL _loadComplete;
+    bool _loadComplete;
 }
 
 - (void)webViewDidFinishLoad:(UIWebView *)webView
 {
-    _loadComplete = YES;
+    _loadComplete = true;
 }
 
 - (void)waitForDidFinishLoad
index f5e56e6..7dd9b96 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 
-#if ENABLE(DRAG_SUPPORT) && PLATFORM(IOS_FAMILY)
+#if ENABLE(DRAG_SUPPORT) && PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
 
 #import "ClassMethodSwizzler.h"
 #import "DragAndDropSimulator.h"
@@ -2138,4 +2138,4 @@ TEST(DragAndDropTests, DropPreviewForImageInEditableArea)
 
 } // namespace TestWebKitAPI
 
-#endif // ENABLE(DRAG_SUPPORT) && PLATFORM(IOS_FAMILY)
+#endif // ENABLE(DRAG_SUPPORT) && PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
index 8e9f41b..ea41be7 100644 (file)
@@ -34,7 +34,7 @@
 #import <WebKit/WKWebViewPrivate.h>
 
 @interface AsyncPolicyDelegateForInsetTest : NSObject<WKNavigationDelegate> {
-    @public BOOL _navigationComplete;
+    @public bool _navigationComplete;
 }
 @property (nonatomic, copy) void (^webContentProcessDidTerminate)(WKWebView *);
 @end
@@ -43,7 +43,7 @@
 
 - (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation
 {
-    _navigationComplete = YES;
+    _navigationComplete = true;
 }
 
 - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
@@ -178,7 +178,7 @@ TEST(ScrollViewInsetTests, RestoreInitialContentOffsetAfterCrashWithAsyncPolicyD
     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, viewHeight)]);
     [webView scrollView].contentInset = UIEdgeInsetsMake(400, 0, 0, 0);
     [webView setNavigationDelegate:delegate.get()];
-    delegate->_navigationComplete = NO;
+    delegate->_navigationComplete = false;
     NSURL *testResourceURL = [[[NSBundle mainBundle] bundleURL] URLByAppendingPathComponent:@"TestWebKitAPI.resources"];
     [webView loadHTMLString:veryTallDocumentMarkup baseURL:testResourceURL];
     Util::run(&delegate->_navigationComplete);
index 5aef73d..1607cd4 100644 (file)
 #endif
 #if PLATFORM(COCOA) && defined(__OBJC__)
 #import <WebKit/WebKit.h>
+#if PLATFORM(MACCATALYST)
+// Many tests depend on WebKitLegacy.h being implicitly included; however,
+// on macCatalyst, WebKit.h does not include WebKitLegacy.h, so we need
+// to do it explicitly here.
+#import <WebKit/WebKitLegacy.h>
+#endif
 #endif
 
 #endif
 #define WK_HAVE_C_SPI 1
 #endif
 
-#if !PLATFORM(APPLETV)
+#if !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST)
 #define HAVE_SSL 1
 #endif
 
index 8eb5b06..0a17ae8 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "DragAndDropSimulator.h"
 
-#if ENABLE(DRAG_SUPPORT) && PLATFORM(IOS_FAMILY)
+#if ENABLE(DRAG_SUPPORT) && PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
 
 #import "InstanceMethodSwizzler.h"
 #import "PlatformUtilities.h"
@@ -924,4 +924,4 @@ IGNORE_WARNINGS_END
 
 @end
 
-#endif // ENABLE(DRAG_SUPPORT) && PLATFORM(IOS_FAMILY)
+#endif // ENABLE(DRAG_SUPPORT) && PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)