Title: [195971] trunk/Source
- Revision
- 195971
- Author
- [email protected]
- Date
- 2016-02-01 12:23:41 -0800 (Mon, 01 Feb 2016)
Log Message
<rdar://problem/20150072> [iOS] Remove some file upload code only needed before iOS 9
https://bugs.webkit.org/show_bug.cgi?id=153754
Reviewed by Darin Adler.
Source/WebCore:
* English.lproj/Localizable.strings: Updated for removal of WebKit2 string.
Source/WebKit2:
* Platform/spi/ios/UIKitSPI.h: Removed conditional forward declaration of SPI.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(photoLibraryIcon): Removed check for HAVE_WEBKIT_DOC_PICKER_ICONS, which is always true in
iOS 9 and later.
(cameraIcon): Ditto.
(-[WKFileUploadPanel presentWithParameters:resultListener:]): Removed branch for when
UIDocumentMenuViewController doesn’t respond to
-_initIgnoringApplicationEntitlementForImportOfTypes:.
(-[WKFileUploadPanel _showMediaSourceSelectionSheet]): Deleted now-unused method.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (195970 => 195971)
--- trunk/Source/WebCore/ChangeLog 2016-02-01 19:45:18 UTC (rev 195970)
+++ trunk/Source/WebCore/ChangeLog 2016-02-01 20:23:41 UTC (rev 195971)
@@ -1,3 +1,12 @@
+2016-02-01 Dan Bernstein <[email protected]>
+
+ <rdar://problem/20150072> [iOS] Remove some file upload code only needed before iOS 9
+ https://bugs.webkit.org/show_bug.cgi?id=153754
+
+ Reviewed by Darin Adler.
+
+ * English.lproj/Localizable.strings: Updated for removal of WebKit2 string.
+
2016-02-01 Said Abou-Hallawa <[email protected]>
Cache the Path instead of creating it every time it is required
Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (195970 => 195971)
--- trunk/Source/WebCore/English.lproj/Localizable.strings 2016-02-01 19:45:18 UTC (rev 195970)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings 2016-02-01 20:23:41 UTC (rev 195971)
@@ -124,9 +124,6 @@
/* menu item title for phone number */
"Call Using iPhone:" = "Call Using iPhone:";
-/* File Upload alert sheet button string to cancel */
-"Cancel (file upload action sheet)" = "Cancel";
-
/* Title for Cancel button label in button bar */
"Cancel button label in button bar" = "Cancel";
Modified: trunk/Source/WebKit2/ChangeLog (195970 => 195971)
--- trunk/Source/WebKit2/ChangeLog 2016-02-01 19:45:18 UTC (rev 195970)
+++ trunk/Source/WebKit2/ChangeLog 2016-02-01 20:23:41 UTC (rev 195971)
@@ -1,3 +1,21 @@
+2016-02-01 Dan Bernstein <[email protected]>
+
+ <rdar://problem/20150072> [iOS] Remove some file upload code only needed before iOS 9
+ https://bugs.webkit.org/show_bug.cgi?id=153754
+
+ Reviewed by Darin Adler.
+
+ * Platform/spi/ios/UIKitSPI.h: Removed conditional forward declaration of SPI.
+
+ * UIProcess/ios/forms/WKFileUploadPanel.mm:
+ (photoLibraryIcon): Removed check for HAVE_WEBKIT_DOC_PICKER_ICONS, which is always true in
+ iOS 9 and later.
+ (cameraIcon): Ditto.
+ (-[WKFileUploadPanel presentWithParameters:resultListener:]): Removed branch for when
+ UIDocumentMenuViewController doesn’t respond to
+ -_initIgnoringApplicationEntitlementForImportOfTypes:.
+ (-[WKFileUploadPanel _showMediaSourceSelectionSheet]): Deleted now-unused method.
+
2016-02-01 Anders Carlsson <[email protected]>
Stop linking to PassKit
Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (195970 => 195971)
--- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-02-01 19:45:18 UTC (rev 195970)
+++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-02-01 20:23:41 UTC (rev 195971)
@@ -79,17 +79,8 @@
#import <UIKit/UIPreviewItemController.h>
#endif
-// FIXME: Unconditionally include this file when a new SDK is available. <rdar://problem/20150072>
-#if defined(__has_include) && __has_include(<UIKit/UIDocumentMenuViewController_Private.h>)
-#import <UIKit/UIDocumentMenuViewController_Private.h>
#else
-@interface UIDocumentMenuViewController ()
-- (instancetype)_initIgnoringApplicationEntitlementForImportOfTypes:(NSArray *)types;
-@end
-#endif
-#else
-
#if HAVE(LINK_PREVIEW)
typedef NS_ENUM(NSInteger, UIPreviewItemType) {
UIPreviewItemTypeNone,
Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm (195970 => 195971)
--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm 2016-02-01 19:45:18 UTC (rev 195970)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm 2016-02-01 20:23:41 UTC (rev 195971)
@@ -73,22 +73,12 @@
static inline UIImage *photoLibraryIcon()
{
- // FIXME: Remove when a new SDK is available. <rdar://problem/20150072>
-#if defined(HAVE_WEBKIT_DOC_PICKER_ICONS)
return _UIImageGetWebKitPhotoLibraryIcon();
-#else
- return nil;
-#endif
}
static inline UIImage *cameraIcon()
{
- // FIXME: Remove when a new SDK is available. <rdar://problem/20150072>
-#if defined(HAVE_WEBKIT_DOC_PICKER_ICONS)
return _UIImageGetWebKitTakePhotoOrVideoIcon();
-#else
- return nil;
-#endif
}
#pragma mark - Icon generation
@@ -374,19 +364,7 @@
[mimeTypes addObject:mimeType->string()];
_mimeTypes = adoptNS([mimeTypes copy]);
- // FIXME: Remove this check and the fallback code when a new SDK is available. <rdar://problem/20150072>
- if ([UIDocumentMenuViewController instancesRespondToSelector:@selector(_initIgnoringApplicationEntitlementForImportOfTypes:)]) {
- [self _showDocumentPickerMenu];
- return;
- }
-
- // Fall back to showing the old-style source selection sheet.
- // If there is no camera or this is type=multiple, just show the image picker for the photo library.
- // Otherwise, show an action sheet for the user to choose between camera or library.
- if (_allowMultipleFiles || ![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
- [self _showPhotoPickerWithSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
- else
- [self _showMediaSourceSelectionSheet];
+ [self _showDocumentPickerMenu];
}
- (void)dismiss
@@ -482,36 +460,6 @@
return WEB_UI_STRING_KEY("Take Photo", "Take Photo (file upload action sheet)", "File Upload alert sheet camera button string for taking only photos");
}
-- (void)_showMediaSourceSelectionSheet
-{
- NSString *existingString = [self _photoLibraryButtonLabel];
- NSString *cameraString = [self _cameraButtonLabel];
- NSString *cancelString = WEB_UI_STRING_KEY("Cancel", "Cancel (file upload action sheet)", "File Upload alert sheet button string to cancel");
-
- _actionSheetController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
-
- UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelString style:UIAlertActionStyleCancel handler:^(UIAlertAction *){
- [self _cancel];
- // We handled cancel ourselves. Prevent the popover controller delegate from cancelling when the popover dismissed.
- [_presentationPopover setDelegate:nil];
- }];
-
- UIAlertAction *cameraAction = [UIAlertAction actionWithTitle:cameraString style:UIAlertActionStyleDefault handler:^(UIAlertAction *){
- _usingCamera = YES;
- [self _showPhotoPickerWithSourceType:UIImagePickerControllerSourceTypeCamera];
- }];
-
- UIAlertAction *photoLibraryAction = [UIAlertAction actionWithTitle:existingString style:UIAlertActionStyleDefault handler:^(UIAlertAction *){
- [self _showPhotoPickerWithSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
- }];
-
- [_actionSheetController addAction:cancelAction];
- [_actionSheetController addAction:cameraAction];
- [_actionSheetController addAction:photoLibraryAction];
-
- [self _presentForCurrentInterfaceIdiom:_actionSheetController.get()];
-}
-
- (void)_showDocumentPickerMenu
{
// FIXME: Support multiple file selection when implemented. <rdar://17177981>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes