Title: [284928] branches/safari-612-branch/Source
Revision
284928
Author
[email protected]
Date
2021-10-27 11:08:08 -0700 (Wed, 27 Oct 2021)

Log Message

Cherry-pick r283662. rdar://problem/84717723

    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:

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

Modified Paths

Diff

Modified: branches/safari-612-branch/Source/WTF/ChangeLog (284927 => 284928)


--- branches/safari-612-branch/Source/WTF/ChangeLog	2021-10-27 17:43:38 UTC (rev 284927)
+++ branches/safari-612-branch/Source/WTF/ChangeLog	2021-10-27 18:08:08 UTC (rev 284928)
@@ -1,3 +1,38 @@
+2021-10-27  Alan Coon  <[email protected]>
+
+        Cherry-pick r283662. rdar://problem/84717723
+
+    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:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-10-06  Aditya Keerthi  <[email protected]>
+
+            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-18  Russell Epstein  <[email protected]>
 
         Cherry-pick r284230. rdar://problem/84351866

Modified: branches/safari-612-branch/Source/WTF/wtf/PlatformEnableCocoa.h (284927 => 284928)


--- branches/safari-612-branch/Source/WTF/wtf/PlatformEnableCocoa.h	2021-10-27 17:43:38 UTC (rev 284927)
+++ branches/safari-612-branch/Source/WTF/wtf/PlatformEnableCocoa.h	2021-10-27 18:08:08 UTC (rev 284928)
@@ -571,6 +571,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: branches/safari-612-branch/Source/WTF/wtf/PlatformHave.h (284927 => 284928)


--- branches/safari-612-branch/Source/WTF/wtf/PlatformHave.h	2021-10-27 17:43:38 UTC (rev 284927)
+++ branches/safari-612-branch/Source/WTF/wtf/PlatformHave.h	2021-10-27 18:08:08 UTC (rev 284928)
@@ -1135,3 +1135,7 @@
     || (PLATFORM(APPLETV) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __TV_OS_VERSION_MIN_REQUIRED >= 150000)
 #define HAVE_CORE_ANIMATION_FIX_FOR_RADAR_78402035 1
 #endif
+
+#if PLATFORM(IOS)
+#define HAVE_PUACTIVITYPROGRESSCONTROLLER 1
+#endif

Modified: branches/safari-612-branch/Source/WebKit/ChangeLog (284927 => 284928)


--- branches/safari-612-branch/Source/WebKit/ChangeLog	2021-10-27 17:43:38 UTC (rev 284927)
+++ branches/safari-612-branch/Source/WebKit/ChangeLog	2021-10-27 18:08:08 UTC (rev 284928)
@@ -1,3 +1,39 @@
+2021-10-27  Alan Coon  <[email protected]>
+
+        Cherry-pick r283662. rdar://problem/84717723
+
+    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:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-10-06  Aditya Keerthi  <[email protected]>
+
+            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-25  Null  <[email protected]>
 
         Cherry-pick r284532. rdar://problem/84625267

Modified: branches/safari-612-branch/Source/WebKit/Platform/spi/ios/PhotosUISPI.h (284927 => 284928)


--- branches/safari-612-branch/Source/WebKit/Platform/spi/ios/PhotosUISPI.h	2021-10-27 17:43:38 UTC (rev 284927)
+++ branches/safari-612-branch/Source/WebKit/Platform/spi/ios/PhotosUISPI.h	2021-10-27 18:08:08 UTC (rev 284928)
@@ -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: branches/safari-612-branch/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm (284927 => 284928)


--- branches/safari-612-branch/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm	2021-10-27 17:43:38 UTC (rev 284927)
+++ branches/safari-612-branch/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm	2021-10-27 18:08:08 UTC (rev 284928)
@@ -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
@@ -938,7 +946,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)] {
@@ -1084,6 +1098,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*) {
@@ -1108,6 +1124,8 @@
     });
 }
 
+#endif
+
 - (BOOL)platformSupportsPickerViewController
 {
 #if PLATFORM(WATCHOS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to