[Webkit-unassigned] [Bug 165225] UIViewController with WKWebView presented modally causes the presented UIViewController to be dismissed.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 1 15:10:33 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=165225
--- Comment #25 from Darin Adler <darin at apple.com> ---
Comment on attachment 303130
--> https://bugs.webkit.org/attachment.cgi?id=303130
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=303130&action=review
> Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:391
> + // dismiss any viewController that is being presented. This is works all VC, popovers, etc.
Normally we would want to use a capital D in this kind of sentence-style comment.
VC is not normally an abbreviation we use for view controller in WebKit code.
"This is works all", is not grammatically correct.
> Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:394
> + UIViewController *presentedViewController = [UIViewController _viewControllerForFullScreenPresentationFromView:_view];
> + if (presentedViewController)
> + [presentedViewController dismissViewControllerAnimated:NO completion:nil];
Would be nice to define the variable inside the "if" since this is C++ code. In fact, I personally would use auto instead of writing out UIViewController * for the type of the variable.
> Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:508
> + // Clear out any previous view controller reference, to prevent calling dismiss on a view controller that
> + // was no longer being presented. Don't save a reference to the UIDocumentMenuViewController as it is self dismissing.
> + _presentationViewController = nil;
I donât understand this comment and therefore donât understand the code.
On iPhone, the method called just before this will call _presentFullscreenViewController. Then this line of code will clear out the reference to that just-presented view controller. Given that, why does this comment talk about clearing out a "previous view controller reference"?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170301/f8c5549e/attachment-0001.html>
More information about the webkit-unassigned
mailing list