Title: [233502] trunk/Source/WebKit
- Revision
- 233502
- Author
- [email protected]
- Date
- 2018-07-04 02:43:07 -0700 (Wed, 04 Jul 2018)
Log Message
A WKWebView in a UIViewController that is presented modally and uses a file picker will be incorrectly dismissed by the system
https://bugs.webkit.org/show_bug.cgi?id=185257
<rdar://problem/40819252>
Patch by Olivia Barnett <[email protected]> on 2018-07-04
Reviewed by Tim Horton.
Call to dismiss the presented modal was being called on the parent and not the child, which caused the file picker to be incorrectly dismissed along with the modal. A test for this bug-fix could not be completed without additional tools as TestWebKitAPI is not a UI application.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _dismissDisplayAnimated:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (233501 => 233502)
--- trunk/Source/WebKit/ChangeLog 2018-07-04 09:06:10 UTC (rev 233501)
+++ trunk/Source/WebKit/ChangeLog 2018-07-04 09:43:07 UTC (rev 233502)
@@ -1,3 +1,16 @@
+2018-07-04 Olivia Barnett <[email protected]>
+
+ A WKWebView in a UIViewController that is presented modally and uses a file picker will be incorrectly dismissed by the system
+ https://bugs.webkit.org/show_bug.cgi?id=185257
+ <rdar://problem/40819252>
+
+ Reviewed by Tim Horton.
+
+ Call to dismiss the presented modal was being called on the parent and not the child, which caused the file picker to be incorrectly dismissed along with the modal. A test for this bug-fix could not be completed without additional tools as TestWebKitAPI is not a UI application.
+
+ * UIProcess/ios/forms/WKFileUploadPanel.mm:
+ (-[WKFileUploadPanel _dismissDisplayAnimated:]):
+
2018-07-04 Tim Horton <[email protected]>
Introduce PLATFORM(IOSMAC)
Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm (233501 => 233502)
--- trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm 2018-07-04 09:06:10 UTC (rev 233501)
+++ trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm 2018-07-04 09:43:07 UTC (rev 233502)
@@ -283,9 +283,12 @@
}
if (_presentationViewController) {
- [_presentationViewController dismissViewControllerAnimated:animated completion:^{
- _presentationViewController = nil;
- }];
+ UIViewController *currentPresentedViewController = [_presentationViewController presentedViewController];
+ if (currentPresentedViewController == self) {
+ [currentPresentedViewController dismissViewControllerAnimated:YES completion:^{
+ _presentationViewController = nil;
+ }];
+ }
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes