Title: [283662] trunk/Source
Revision
283662
Author
akeer...@apple.com
Date
2021-10-06 14:20:35 -0700 (Wed, 06 Oct 2021)

Log Message

Fix watchOS, tvOS, and macCatalyst builds after r283592
https://bugs.webkit.org/show_bug.cgi?id=231300
rdar://83936867

Reviewed by Wenson Hsieh.

Source/WebKit:

* Platform/spi/ios/PhotosUISPI.h:
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel imagePickerController:didFinishPickingMultipleMediaWithInfo:]):

Source/WTF:

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

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (283661 => 283662)


--- trunk/Source/WTF/ChangeLog	2021-10-06 21:08:12 UTC (rev 283661)
+++ trunk/Source/WTF/ChangeLog	2021-10-06 21:20:35 UTC (rev 283662)
@@ -1,3 +1,14 @@
+2021-10-06  Aditya Keerthi  <akeer...@apple.com>
+
+        Fix watchOS, tvOS, and macCatalyst builds after r283592
+        https://bugs.webkit.org/show_bug.cgi?id=231300
+        rdar://83936867
+
+        Reviewed by Wenson Hsieh.
+
+        * wtf/PlatformEnableCocoa.h:
+        * wtf/PlatformHave.h:
+
 2021-10-06  Megan Gardner  <megan_gard...@apple.com>
 
         Allow text selection to flip.

Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (283661 => 283662)


--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2021-10-06 21:08:12 UTC (rev 283661)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2021-10-06 21:20:35 UTC (rev 283662)
@@ -567,6 +567,11 @@
 #define ENABLE_TOUCH_ACTION_REGIONS 1
 #endif
 
+// FIXME (rdar://49961589): Enable on macCatalyst.
+#if !defined(ENABLE_TRANSCODE_UIIMAGEPICKERCONTROLLER_VIDEO) && PLATFORM(IOS)
+#define ENABLE_TRANSCODE_UIIMAGEPICKERCONTROLLER_VIDEO 1
+#endif
+
 #if !defined(ENABLE_WHEEL_EVENT_REGIONS) && (PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST))
 #define ENABLE_WHEEL_EVENT_REGIONS 1
 #endif

Modified: trunk/Source/WTF/wtf/PlatformHave.h (283661 => 283662)


--- trunk/Source/WTF/wtf/PlatformHave.h	2021-10-06 21:08:12 UTC (rev 283661)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2021-10-06 21:20:35 UTC (rev 283662)
@@ -1061,3 +1061,7 @@
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101600) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
 #define HAVE_AVSAMPLEBUFFERVIDEOOUTPUT 1
 #endif
+
+#if PLATFORM(IOS)
+#define HAVE_PUACTIVITYPROGRESSCONTROLLER 1
+#endif

Modified: trunk/Source/WebKit/ChangeLog (283661 => 283662)


--- trunk/Source/WebKit/ChangeLog	2021-10-06 21:08:12 UTC (rev 283661)
+++ trunk/Source/WebKit/ChangeLog	2021-10-06 21:20:35 UTC (rev 283662)
@@ -1,3 +1,15 @@
+2021-10-06  Aditya Keerthi  <akeer...@apple.com>
+
+        Fix watchOS, tvOS, and macCatalyst builds after r283592
+        https://bugs.webkit.org/show_bug.cgi?id=231300
+        rdar://83936867
+
+        Reviewed by Wenson Hsieh.
+
+        * Platform/spi/ios/PhotosUISPI.h:
+        * UIProcess/ios/forms/WKFileUploadPanel.mm:
+        (-[WKFileUploadPanel imagePickerController:didFinishPickingMultipleMediaWithInfo:]):
+
 2021-10-06  Megan Gardner  <megan_gard...@apple.com>
 
         Allow text selection to flip.

Modified: trunk/Source/WebKit/Platform/spi/ios/PhotosUISPI.h (283661 => 283662)


--- trunk/Source/WebKit/Platform/spi/ios/PhotosUISPI.h	2021-10-06 21:08:12 UTC (rev 283661)
+++ trunk/Source/WebKit/Platform/spi/ios/PhotosUISPI.h	2021-10-06 21:20:35 UTC (rev 283662)
@@ -25,12 +25,16 @@
 
 #if USE(APPLE_INTERNAL_SDK)
 
+#if HAVE(PUACTIVITYPROGRESSCONTROLLER)
 #import <PhotosUI/PUActivityProgressController.h>
+#endif
 
 #else
 
 #import "UIKitSPI.h"
 
+#if HAVE(PUACTIVITYPROGRESSCONTROLLER)
+
 @interface PUActivityProgressController : NSObject
 
 @property (nonatomic, copy) NSString *title;
@@ -46,4 +50,6 @@
 
 @end
 
+#endif // HAVE(PUACTIVITYPROGRESSCONTROLLER)
+
 #endif // USE(APPLE_INTERNAL_SDK)

Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm (283661 => 283662)


--- trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm	2021-10-06 21:08:12 UTC (rev 283661)
+++ trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm	2021-10-06 21:20:35 UTC (rev 283662)
@@ -54,8 +54,10 @@
 
 #import <pal/cocoa/AVFoundationSoftLink.h>
 
+#if HAVE(PUACTIVITYPROGRESSCONTROLLER)
 SOFT_LINK_FRAMEWORK(PhotosUI)
 SOFT_LINK_CLASS(PhotosUI, PUActivityProgressController)
+#endif
 
 using namespace WebKit;
 
@@ -166,6 +168,8 @@
 
 #pragma mark - WKFileUploadMediaTranscoder
 
+#if ENABLE(TRANSCODE_UIIMAGEPICKERCONTROLLER_VIDEO)
+
 @interface WKFileUploadMediaTranscoder : NSObject
 
 - (instancetype)initWithItems:(NSArray *)items videoCount:(NSUInteger)videoCount completionHandler:(WTF::Function<void(NSArray<_WKFileUploadItem *> *)>&&)completionHandler;
@@ -321,6 +325,8 @@
 
 @end
 
+#endif // ENABLE(TRANSCODE_UIIMAGEPICKERCONTROLLER_VIDEO)
+
 #pragma mark - WKFileUploadPanel
 
 @interface WKFileUploadPanel () <UIPopoverControllerDelegate, UINavigationControllerDelegate, UIImagePickerControllerDelegate, UIDocumentPickerDelegate, UIAdaptivePresentationControllerDelegate
@@ -338,7 +344,9 @@
     CGPoint _interactionPoint;
     BOOL _allowMultipleFiles;
     BOOL _usingCamera;
+#if ENABLE(TRANSCODE_UIIMAGEPICKERCONTROLLER_VIDEO)
     RetainPtr<WKFileUploadMediaTranscoder> _mediaTranscoder;
+#endif
     RetainPtr<UIImagePickerController> _imagePicker;
     RetainPtr<UIViewController> _presentationViewController; // iPhone always. iPad for Fullscreen Camera.
     ALLOW_DEPRECATED_DECLARATIONS_BEGIN
@@ -940,7 +948,13 @@
 {
     [self _processMediaInfoDictionaries:infos
         successBlock:^(NSArray<_WKFileUploadItem *> *items) {
+#if ENABLE(TRANSCODE_UIIMAGEPICKERCONTROLLER_VIDEO)
             [self _uploadMediaItemsTranscodingVideo:items];
+#else
+            ensureOnMainRunLoop([self, strongSelf = retainPtr(self), items = retainPtr(items)] {
+                [self _chooseMediaItems:items.get()];
+            });
+#endif
         }
         failureBlock:^{
             ensureOnMainRunLoop([self, strongSelf = retainPtr(self)] {
@@ -1086,6 +1100,8 @@
     [self _uploadItemForJPEGRepresentationOfImage:originalImage successBlock:successBlock failureBlock:failureBlock];
 }
 
+#if ENABLE(TRANSCODE_UIIMAGEPICKERCONTROLLER_VIDEO)
+
 - (void)_uploadMediaItemsTranscodingVideo:(NSArray<_WKFileUploadItem *> *)items
 {
     auto videoCount = [[items indexesOfObjectsPassingTest:^(_WKFileUploadItem *item, NSUInteger, BOOL*) {
@@ -1110,6 +1126,8 @@
     });
 }
 
+#endif
+
 - (BOOL)platformSupportsPickerViewController
 {
 #if PLATFORM(WATCHOS)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to