Upstream a variety of Cocoa-platform HAVE and ENABLE macros
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Mar 2020 01:59:05 +0000 (01:59 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Mar 2020 01:59:05 +0000 (01:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=209307

Reviewed by Andy Estes.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:
* pal/spi/cocoa/AVFoundationSPI.h:
* pal/spi/cocoa/RevealSPI.h:
* pal/spi/ios/UIKitSPI.h:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:
* Platform/spi/ios/PDFKitSPI.h:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::createRemoteView):
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:mimeType:]):

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/PlatformEnableCocoa.h:
* wtf/PlatformHave.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

23 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WTF/ChangeLog
Source/WTF/wtf/PlatformEnableCocoa.h
Source/WTF/wtf/PlatformHave.h
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h
Source/WebCore/PAL/pal/spi/cocoa/RevealSPI.h
Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h
Source/WebCore/page/cocoa/SettingsBaseCocoa.mm
Source/WebKit/ChangeLog
Source/WebKit/Configurations/FeatureDefines.xcconfig
Source/WebKit/Platform/spi/ios/PDFKitSPI.h
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm
Source/WebKit/UIProcess/ios/WKPDFView.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig
Tools/ChangeLog
Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig

index 141e6da..748e8c6 100644 (file)
@@ -1,3 +1,12 @@
+2020-03-19  Tim Horton  <timothy_horton@apple.com>
+
+        Upstream a variety of Cocoa-platform HAVE and ENABLE macros
+        https://bugs.webkit.org/show_bug.cgi?id=209307
+
+        Reviewed by Andy Estes.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2020-03-19  Yusuke Suzuki  <ysuzuki@apple.com>
 
         [JSC] StructureStubInfo::bufferedStructures should not ref/deref UniquedStringImpl
index cfbb729..effc72b 100644 (file)
@@ -263,6 +263,7 @@ ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 ENABLE_MEDIA_SESSION = ;
 
 ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(WK_PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_iphoneos = ENABLE_MEDIA_SOURCE;
 ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;
index ca14982..e4350b4 100644 (file)
@@ -1,5 +1,15 @@
 2020-03-19  Tim Horton  <timothy_horton@apple.com>
 
+        Upstream a variety of Cocoa-platform HAVE and ENABLE macros
+        https://bugs.webkit.org/show_bug.cgi?id=209307
+
+        Reviewed by Andy Estes.
+
+        * wtf/PlatformEnableCocoa.h:
+        * wtf/PlatformHave.h:
+
+2020-03-19  Tim Horton  <timothy_horton@apple.com>
+
         Upstream the definition of HAVE_READ_ONLY_SYSTEM_VOLUME
         https://bugs.webkit.org/show_bug.cgi?id=209305
 
index f657412..c84ead3 100644 (file)
 #define ENABLE_WKPDFVIEW 1
 #endif
 
-#if !defined(ENABLE_MEDIA_SOURCE) && PLATFORM(MAC)
+#if !defined(ENABLE_MEDIA_SOURCE) && PLATFORM(MAC) || (PLATFORM(IOS) && !PLATFORM(IOS_FAMILY_SIMULATOR))
 #define ENABLE_MEDIA_SOURCE 1
 #endif
 
 #if !defined(ENABLE_FTL_JIT) && !USE(JSVALUE32_64) && !PLATFORM(IOS_FAMILY_SIMULATOR)
 #define ENABLE_FTL_JIT 1
 #endif
+
+#if !defined(ENABLE_REVEAL) && ((PLATFORM(MACCATALYST) || PLATFORM(IOS)) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500))
+#define ENABLE_REVEAL 1
+#endif
+
+#if !defined (ENABLE_ANIMATED_KEYBOARD_SCROLLING) && PLATFORM(IOS_FAMILY)
+#define ENABLE_ANIMATED_KEYBOARD_SCROLLING 1
+#endif
+
+#if !defined(ENABLE_FULL_KEYBOARD_ACCESS) && PLATFORM(IOS)
+#define ENABLE_FULL_KEYBOARD_ACCESS 1
+#endif
+
+// FIXME: Should this be enabled for other iOS-family platforms?
+#if !defined(ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION) && (PLATFORM(IOS) || PLATFORM(MACCATALYST))
+#define ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION 1
+#endif
index 447b53b..b17539b 100644 (file)
 #define HAVE_FJCVTZS_INSTRUCTION 1
 #endif
 
-#if PLATFORM(IOS)
+#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
 #define HAVE_APP_LINKS 1
 #endif
 
 #define HAVE_SYSTEM_FEATURE_FLAGS 1
 #endif
 
-#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
+#if PLATFORM(IOS)
 #define HAVE_AVOBSERVATIONCONTROLLER 1
 #endif
+
+#if PLATFORM(IOS_FAMILY)
+#define HAVE_MENU_CONTROLLER_SHOW_HIDE_API 1
+#endif
+
+// FIXME: Should this be enabled on other iOS-family platforms?
+#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
+#define HAVE_CANCEL_WEB_TOUCH_EVENTS_GESTURE 1
+#endif
+
+#if PLATFORM(IOS_FAMILY)
+#define HAVE_UI_REMOTE_VIEW 1
+#endif
+
+#if PLATFORM(IOS_FAMILY)
+#define HAVE_PDF_HOST_VIEW_CONTROLLER_WITH_BACKGROUND_COLOR 1
+#endif
+
+#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130400
+#define HAVE_UISCENE_BASED_VIEW_SERVICE_STATE_NOTIFICATIONS 1
+#endif
index f626a7d..4bb6e74 100644 (file)
@@ -1,3 +1,12 @@
+2020-03-19  Tim Horton  <timothy_horton@apple.com>
+
+        Upstream a variety of Cocoa-platform HAVE and ENABLE macros
+        https://bugs.webkit.org/show_bug.cgi?id=209307
+
+        Reviewed by Andy Estes.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2020-03-19  Sunny He  <sunny_he@apple.com>
 
         ScriptDisallowedScope should disable isEventAllowedInMainThread and isEventDispatchAllowedInSubtree asserts in WebKit1
index cfbb729..effc72b 100644 (file)
@@ -263,6 +263,7 @@ ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 ENABLE_MEDIA_SESSION = ;
 
 ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(WK_PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_iphoneos = ENABLE_MEDIA_SOURCE;
 ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;
index 4e8327f..ba5dc3f 100644 (file)
@@ -1,3 +1,15 @@
+2020-03-19  Tim Horton  <timothy_horton@apple.com>
+
+        Upstream a variety of Cocoa-platform HAVE and ENABLE macros
+        https://bugs.webkit.org/show_bug.cgi?id=209307
+
+        Reviewed by Andy Estes.
+
+        * Configurations/FeatureDefines.xcconfig:
+        * pal/spi/cocoa/AVFoundationSPI.h:
+        * pal/spi/cocoa/RevealSPI.h:
+        * pal/spi/ios/UIKitSPI.h:
+
 2020-03-19  Megan Gardner  <megan_gardner@apple.com>
 
         Correctly set up context for Data Detectors
index cfbb729..effc72b 100644 (file)
@@ -263,6 +263,7 @@ ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 ENABLE_MEDIA_SESSION = ;
 
 ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(WK_PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_iphoneos = ENABLE_MEDIA_SOURCE;
 ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;
index 9b95017..5f15f05 100644 (file)
@@ -124,7 +124,7 @@ NS_ASSUME_NONNULL_END
 
 #endif // PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR)
 
-#if !PLATFORM(IOS_FAMILY)
+#if ENABLE(MEDIA_SOURCE)
 
 #pragma mark -
 #pragma mark AVStreamDataParser
@@ -163,7 +163,7 @@ NS_ASSUME_NONNULL_END
 @end
 #endif
 
-#endif // !PLATFORM(IOS_FAMILY)
+#endif // ENABLE(MEDIA_SOURCE)
 
 #endif // USE(APPLE_INTERNAL_SDK)
 
@@ -182,7 +182,7 @@ NS_ASSUME_NONNULL_END
 @end
 #endif // HAVE(AVCONTENTKEYSESSION)
 
-#if PLATFORM(MAC) && !USE(APPLE_INTERNAL_SDK)
+#if ENABLE(MEDIA_SOURCE) && !USE(APPLE_INTERNAL_SDK)
 NS_ASSUME_NONNULL_BEGIN
 @interface AVStreamDataParser (AVStreamDataParserPrivate)
 + (NSString *)outputMIMECodecParameterForInputMIMECodecParameter:(NSString *)inputMIMECodecParameter;
index 50c0790..052b102 100644 (file)
@@ -47,6 +47,7 @@
 
 @interface RVItem : NSObject <NSSecureCoding>
 - (instancetype)initWithText:(NSString *)text selectedRange:(NSRange)selectedRange NS_DESIGNATED_INITIALIZER;
+@property (readonly, nonatomic) NSRange highlightRange;
 @end
 
 @interface RVSelection : NSObject
@@ -57,7 +58,6 @@
 @interface RVPresentingContext : NSObject
 - (instancetype)initWithPointerLocationInView:(NSPoint)pointerLocationInView inView:(NSView *)view highlightDelegate:(id<RVPresenterHighlightDelegate>)highlightDelegate;
 @end
-#endif
 
 @protocol RVPresenterHighlightDelegate <NSObject>
 @required
@@ -66,6 +66,7 @@
 - (void)revealContext:(RVPresentingContext *)context stopHighlightingItem:(RVItem *)item;
 - (void)revealContext:(RVPresentingContext *)context drawRectsForItem:(RVItem *)item;
 @end
+#endif
 
 @interface RVDocumentContext : NSObject < NSSecureCoding >
 @end
@@ -73,8 +74,8 @@
 @interface RVPresenter : NSObject
 #if PLATFORM(MAC)
 - (id<NSImmediateActionAnimationController>)animationControllerForItem:(RVItem *)item documentContext:(RVDocumentContext *)documentContext presentingContext:(RVPresentingContext *)presentingContext options:(NSDictionary *)options;
-#endif // PLATFORM(MAC)
 - (BOOL)revealItem:(RVItem *)item documentContext:(RVDocumentContext *)documentContext presentingContext:(RVPresentingContext *)presentingContext options:(NSDictionary *)options;
+#endif // PLATFORM(MAC)
 @end
 
 #endif // !USE(APPLE_INTERNAL_SDK)
index c82ad98..d247f9b 100644 (file)
@@ -38,6 +38,7 @@ WTF_EXTERN_C_END
 #import <UIKit/UIApplicationSceneConstants.h>
 #import <UIKit/UIApplication_Private.h>
 #import <UIKit/UIColor_Private.h>
+#import <UIKit/UIFocusRingStyle.h>
 #import <UIKit/UIFont_Private.h>
 #import <UIKit/UIInterface_Private.h>
 #import <UIKit/UIScreen_Private.h>
@@ -55,9 +56,6 @@ WTF_EXTERN_C_END
 - (CGFloat)_iOSMacScale;
 @end
 
-#if __has_include(<UIKit/UIFocusRingStyle.h>)
-#import <UIKit/UIFocusRingStyle.h>
-#endif
 
 #else // USE(APPLE_INTERNAL_SDK)
 
@@ -148,18 +146,20 @@ typedef enum {
 @property (nonatomic, copy, setter=_setTitle:) NSString *_title;
 @end
 
+#if ENABLE(FULL_KEYBOARD_ACCESS)
+@interface UIFocusRingStyle : NSObject
++ (CGFloat)cornerRadius;
++ (CGFloat)maxAlpha;
++ (CGFloat)alphaThreshold;
+@end
+#endif
+
 #endif // USE(APPLE_INTERNAL_SDK)
 
 #if ENABLE(FULL_KEYBOARD_ACCESS)
 @interface UIColor (IPI)
 + (UIColor *)keyboardFocusIndicatorColor;
 @end
-
-@interface UIFocusRingStyle (Staging_47831886)
-+ (CGFloat)cornerRadius;
-+ (CGFloat)maxAlpha;
-+ (CGFloat)alphaThreshold;
-@end
 #endif
 
 #if HAVE(OS_DARK_MODE_SUPPORT)
index 4961615..4e12594 100644 (file)
@@ -86,6 +86,13 @@ bool SettingsBase::defaultTextAutosizingEnabled()
     return true;
 }
 
+#if ENABLE(MEDIA_SOURCE)
+bool SettingsBase::platformDefaultMediaSourceEnabled()
+{
+    return false;
+}
+#endif
+
 #endif
 
 const String& SettingsBase::defaultMediaContentTypesRequiringHardwareSupport()
index db408c7..c8d70c5 100644 (file)
@@ -1,3 +1,18 @@
+2020-03-19  Tim Horton  <timothy_horton@apple.com>
+
+        Upstream a variety of Cocoa-platform HAVE and ENABLE macros
+        https://bugs.webkit.org/show_bug.cgi?id=209307
+
+        Reviewed by Andy Estes.
+
+        * Configurations/FeatureDefines.xcconfig:
+        * Platform/spi/ios/PDFKitSPI.h:
+        * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
+        (WebKit::createRemoteView):
+        * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
+        * UIProcess/ios/WKPDFView.mm:
+        (-[WKPDFView web_initWithFrame:webView:mimeType:]):
+
 2020-03-19  Alex Christensen  <achristensen@webkit.org>
 
         Sanitize suggested download filename received from web process
index cfbb729..effc72b 100644 (file)
@@ -263,6 +263,7 @@ ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 ENABLE_MEDIA_SESSION = ;
 
 ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(WK_PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_iphoneos = ENABLE_MEDIA_SOURCE;
 ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;
index fac6378..67adbde 100644 (file)
@@ -54,6 +54,8 @@
 - (void) goToPageIndex:(NSInteger) pageIndex;
 - (void) updatePDFViewLayout;
 
++ (UIColor *)backgroundColor;
+
 - (void) beginPDFViewRotation;
 - (void) endPDFViewRotation;
 
index 0c126ae..dfe2f02 100644 (file)
@@ -43,7 +43,7 @@ using namespace WebCore;
 
 static RetainPtr<UIView> createRemoteView(pid_t pid, uint32_t contextID)
 {
-#if USE(UIREMOTEVIEW_CONTEXT_HOSTING)
+#if HAVE(UI_REMOTE_VIEW)
     // FIXME: Remove this respondsToSelector check when possible.
     static BOOL canUseUIRemoteView;
     static std::once_flag initializeCanUseUIRemoteView;
index 9237610..449ec20 100644 (file)
@@ -271,7 +271,7 @@ static Class scrollViewScrollIndicatorClass()
 
 @end
 
-#if USE(UIREMOTEVIEW_CONTEXT_HOSTING)
+#if HAVE(UI_REMOTE_VIEW)
 @implementation WKUIRemoteView
 
 - (instancetype)initWithFrame:(CGRect)frame pid:(pid_t)pid contextID:(uint32_t)contextID
index f769689..3c4ad5d 100644 (file)
     if (!(self = [super initWithFrame:frame webView:webView]))
         return nil;
 
-#if USE(PDFKIT_BACKGROUND_COLOR)
+#if HAVE(PDF_HOST_VIEW_CONTROLLER_WITH_BACKGROUND_COLOR)
     UIColor *backgroundColor = PDFHostViewController.backgroundColor;
 #else
     UIColor *backgroundColor = UIColor.grayColor;
index ef23aab..6560254 100644 (file)
@@ -1,3 +1,12 @@
+2020-03-19  Tim Horton  <timothy_horton@apple.com>
+
+        Upstream a variety of Cocoa-platform HAVE and ENABLE macros
+        https://bugs.webkit.org/show_bug.cgi?id=209307
+
+        Reviewed by Andy Estes.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2020-03-19  youenn fablet  <youenn@apple.com>
 
         Make URL::path() return a StringView
index cfbb729..effc72b 100644 (file)
@@ -263,6 +263,7 @@ ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 ENABLE_MEDIA_SESSION = ;
 
 ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(WK_PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_iphoneos = ENABLE_MEDIA_SOURCE;
 ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;
index 05da152..b248b17 100644 (file)
@@ -1,3 +1,12 @@
+2020-03-19  Tim Horton  <timothy_horton@apple.com>
+
+        Upstream a variety of Cocoa-platform HAVE and ENABLE macros
+        https://bugs.webkit.org/show_bug.cgi?id=209307
+
+        Reviewed by Andy Estes.
+
+        * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
+
 2020-03-19  Alex Christensen  <achristensen@webkit.org>
 
         Remove test failing after r258734
index cfbb729..effc72b 100644 (file)
@@ -263,6 +263,7 @@ ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
 ENABLE_MEDIA_SESSION = ;
 
 ENABLE_MEDIA_SOURCE = $(ENABLE_MEDIA_SOURCE_$(WK_PLATFORM_NAME));
+ENABLE_MEDIA_SOURCE_iphoneos = ENABLE_MEDIA_SOURCE;
 ENABLE_MEDIA_SOURCE_macosx = ENABLE_MEDIA_SOURCE;
 
 ENABLE_MEDIA_STATISTICS = ;