RESOLVED FIXED 181884
Present WKFileUploadPanel on correct ViewController
https://bugs.webkit.org/show_bug.cgi?id=181884
Summary Present WKFileUploadPanel on correct ViewController
Megan Gardner
Reported 2018-01-19 14:51:36 PST
Present WKFileUploadPanel on correct ViewController
Attachments
Patch (4.32 KB, patch)
2018-01-19 14:54 PST, Megan Gardner
thorton: review+
Megan Gardner
Comment 1 2018-01-19 14:54:50 PST
Joseph Pecoraro
Comment 2 2018-01-19 15:03:39 PST
Comment on attachment 331793 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=331793&action=review Looks good to me. There are other places that use -[UIViewController _viewControllerForFullScreenPresentationFromView:]. For example: UIProcess/ios/forms/WKAirPlayRoutePicker.mm Should they change as well? > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:462 > + NSLog(@"Failed to find a view controller to show form validation popover"); Accidental log.
Tim Horton
Comment 3 2018-01-19 15:08:08 PST
(In reply to Joseph Pecoraro from comment #2) > Comment on attachment 331793 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=331793&action=review > > Looks good to me. > > There are other places that use -[UIViewController > _viewControllerForFullScreenPresentationFromView:]. For example: > UIProcess/ios/forms/WKAirPlayRoutePicker.mm > > Should they change as well? Seems likely. > > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:462 > > + NSLog(@"Failed to find a view controller to show form validation popover"); > > Accidental log. Humorously that’s in the other version of this function.
Tim Horton
Comment 4 2018-01-19 15:11:45 PST
Comment on attachment 331793 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=331793&action=review > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:456 > +static UIViewController *fallbackViewController(UIView *view) I wonder if we should put this in the UIDelegate implementation if the client returns null, so we don’t have to put it everywhere. > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:471 > + _presentationViewController = [self.delegate viewControllerForPresentingFileUploadPanel:self]; What if this returns nil? Can it?
Tim Horton
Comment 5 2018-01-19 15:27:15 PST
Comment on attachment 331793 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=331793&action=review >> Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:456 >> +static UIViewController *fallbackViewController(UIView *view) > > I wonder if we should put this in the UIDelegate implementation if the client returns null, so we don’t have to put it everywhere. In a followup! >>> Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:462 >>> + NSLog(@"Failed to find a view controller to show form validation popover"); >> >> Accidental log. > > Humorously that’s in the other version of this function. Maybe RELEASE_LOG instead >> Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:471 >> + _presentationViewController = [self.delegate viewControllerForPresentingFileUploadPanel:self]; > > What if this returns nil? Can it? (I think you want if !presentationViewController instead of an else)
Megan Gardner
Comment 6 2018-01-19 15:38:50 PST
Radar WebKit Bug Importer
Comment 7 2018-01-19 15:39:14 PST
Megan Gardner
Comment 8 2018-01-19 15:58:28 PST
Megan Gardner
Comment 9 2018-01-19 16:00:13 PST
Note You need to log in before you can comment on or make changes to this bug.