Changeset 195971 in webkit
- Timestamp:
- Feb 1, 2016, 12:23:41 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r195970 r195971 1 2016-02-01 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/20150072> [iOS] Remove some file upload code only needed before iOS 9 4 https://bugs.webkit.org/show_bug.cgi?id=153754 5 6 Reviewed by Darin Adler. 7 8 * English.lproj/Localizable.strings: Updated for removal of WebKit2 string. 9 1 10 2016-02-01 Said Abou-Hallawa <sabouhallawa@apple.com> 2 11 -
trunk/Source/WebCore/English.lproj/Localizable.strings
r192745 r195971 125 125 "Call Using iPhone:" = "Call Using iPhone:"; 126 126 127 /* File Upload alert sheet button string to cancel */128 "Cancel (file upload action sheet)" = "Cancel";129 130 127 /* Title for Cancel button label in button bar */ 131 128 "Cancel button label in button bar" = "Cancel"; -
trunk/Source/WebKit2/ChangeLog
r195964 r195971 1 2016-02-01 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/20150072> [iOS] Remove some file upload code only needed before iOS 9 4 https://bugs.webkit.org/show_bug.cgi?id=153754 5 6 Reviewed by Darin Adler. 7 8 * Platform/spi/ios/UIKitSPI.h: Removed conditional forward declaration of SPI. 9 10 * UIProcess/ios/forms/WKFileUploadPanel.mm: 11 (photoLibraryIcon): Removed check for HAVE_WEBKIT_DOC_PICKER_ICONS, which is always true in 12 iOS 9 and later. 13 (cameraIcon): Ditto. 14 (-[WKFileUploadPanel presentWithParameters:resultListener:]): Removed branch for when 15 UIDocumentMenuViewController doesn’t respond to 16 -_initIgnoringApplicationEntitlementForImportOfTypes:. 17 (-[WKFileUploadPanel _showMediaSourceSelectionSheet]): Deleted now-unused method. 18 1 19 2016-02-01 Anders Carlsson <andersca@apple.com> 2 20 -
trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h
r195840 r195971 80 80 #endif 81 81 82 // FIXME: Unconditionally include this file when a new SDK is available. <rdar://problem/20150072>83 #if defined(__has_include) && __has_include(<UIKit/UIDocumentMenuViewController_Private.h>)84 #import <UIKit/UIDocumentMenuViewController_Private.h>85 #else86 @interface UIDocumentMenuViewController ()87 - (instancetype)_initIgnoringApplicationEntitlementForImportOfTypes:(NSArray *)types;88 @end89 #endif90 91 82 #else 92 83 -
trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm
r195171 r195971 74 74 static inline UIImage *photoLibraryIcon() 75 75 { 76 // FIXME: Remove when a new SDK is available. <rdar://problem/20150072>77 #if defined(HAVE_WEBKIT_DOC_PICKER_ICONS)78 76 return _UIImageGetWebKitPhotoLibraryIcon(); 79 #else80 return nil;81 #endif82 77 } 83 78 84 79 static inline UIImage *cameraIcon() 85 80 { 86 // FIXME: Remove when a new SDK is available. <rdar://problem/20150072>87 #if defined(HAVE_WEBKIT_DOC_PICKER_ICONS)88 81 return _UIImageGetWebKitTakePhotoOrVideoIcon(); 89 #else90 return nil;91 #endif92 82 } 93 83 … … 375 365 _mimeTypes = adoptNS([mimeTypes copy]); 376 366 377 // FIXME: Remove this check and the fallback code when a new SDK is available. <rdar://problem/20150072> 378 if ([UIDocumentMenuViewController instancesRespondToSelector:@selector(_initIgnoringApplicationEntitlementForImportOfTypes:)]) { 379 [self _showDocumentPickerMenu]; 380 return; 381 } 382 383 // Fall back to showing the old-style source selection sheet. 384 // If there is no camera or this is type=multiple, just show the image picker for the photo library. 385 // Otherwise, show an action sheet for the user to choose between camera or library. 386 if (_allowMultipleFiles || ![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) 387 [self _showPhotoPickerWithSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; 388 else 389 [self _showMediaSourceSelectionSheet]; 367 [self _showDocumentPickerMenu]; 390 368 } 391 369 … … 481 459 482 460 return WEB_UI_STRING_KEY("Take Photo", "Take Photo (file upload action sheet)", "File Upload alert sheet camera button string for taking only photos"); 483 }484 485 - (void)_showMediaSourceSelectionSheet486 {487 NSString *existingString = [self _photoLibraryButtonLabel];488 NSString *cameraString = [self _cameraButtonLabel];489 NSString *cancelString = WEB_UI_STRING_KEY("Cancel", "Cancel (file upload action sheet)", "File Upload alert sheet button string to cancel");490 491 _actionSheetController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];492 493 UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelString style:UIAlertActionStyleCancel handler:^(UIAlertAction *){494 [self _cancel];495 // We handled cancel ourselves. Prevent the popover controller delegate from cancelling when the popover dismissed.496 [_presentationPopover setDelegate:nil];497 }];498 499 UIAlertAction *cameraAction = [UIAlertAction actionWithTitle:cameraString style:UIAlertActionStyleDefault handler:^(UIAlertAction *){500 _usingCamera = YES;501 [self _showPhotoPickerWithSourceType:UIImagePickerControllerSourceTypeCamera];502 }];503 504 UIAlertAction *photoLibraryAction = [UIAlertAction actionWithTitle:existingString style:UIAlertActionStyleDefault handler:^(UIAlertAction *){505 [self _showPhotoPickerWithSourceType:UIImagePickerControllerSourceTypePhotoLibrary];506 }];507 508 [_actionSheetController addAction:cancelAction];509 [_actionSheetController addAction:cameraAction];510 [_actionSheetController addAction:photoLibraryAction];511 512 [self _presentForCurrentInterfaceIdiom:_actionSheetController.get()];513 461 } 514 462
Note:
See TracChangeset
for help on using the changeset viewer.