Changeset 238674 in webkit
- Timestamp:
- Nov 29, 2018, 10:26:46 AM (8 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/ios/forms/WKFileUploadPanel.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r238663 r238674 1 2018-11-29 Conrad Shultz <conrad_shultz@apple.com> 2 3 Factor out configuration of the file upload image picker 4 https://bugs.webkit.org/show_bug.cgi?id=192138 5 <rdar://problem/46334871> 6 7 Reviewed by Tim Horton. 8 9 By factoring configuration of the picker into its own method, it makes it easier 10 to apply custom configuration in subclasses in the future. 11 12 * UIProcess/ios/forms/WKFileUploadPanel.mm: 13 (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]): 14 (-[WKFileUploadPanel _configureImagePicker:]): 15 1 16 2018-11-29 Tomas Popela <tpopela@redhat.com> 2 17 -
trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm
r237266 r238674 414 414 { 415 415 ASSERT([UIImagePickerController isSourceTypeAvailable:sourceType]); 416 416 417 417 _imagePicker = adoptNS([[UIImagePickerController alloc] init]); 418 [ _imagePicker setDelegate:self];418 [self _configureImagePicker:_imagePicker.get()]; 419 419 [_imagePicker setSourceType:sourceType]; 420 [_imagePicker setAllowsEditing:NO];421 [_imagePicker setModalPresentationStyle:UIModalPresentationFullScreen];422 [_imagePicker _setAllowsMultipleSelection:_allowMultipleFiles];423 420 [_imagePicker setMediaTypes:[self _mediaTypesForPickerSourceType:sourceType]]; 424 425 if (_mediaCaptureType != WebCore::MediaCaptureTypeNone)426 [_imagePicker setCameraDevice:cameraDeviceForMediaCaptureType(_mediaCaptureType)];427 421 428 422 // Use a popover on the iPad if the source type is not the camera. … … 433 427 else 434 428 [self _presentFullscreenViewController:_imagePicker.get() animated:YES]; 429 } 430 431 - (void)_configureImagePicker:(UIImagePickerController *)imagePicker 432 { 433 [imagePicker setDelegate:self]; 434 [imagePicker setAllowsEditing:NO]; 435 [imagePicker setModalPresentationStyle:UIModalPresentationFullScreen]; 436 [imagePicker _setAllowsMultipleSelection:_allowMultipleFiles]; 437 438 if (_mediaCaptureType != WebCore::MediaCaptureTypeNone) 439 [imagePicker setCameraDevice:cameraDeviceForMediaCaptureType(_mediaCaptureType)]; 435 440 } 436 441
Note:
See TracChangeset
for help on using the changeset viewer.