<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - UIViewController with WKWebView presented modally causes the presented UIViewController to be dismissed."
href="https://bugs.webkit.org/show_bug.cgi?id=165225#c32">Comment # 32</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - UIViewController with WKWebView presented modally causes the presented UIViewController to be dismissed."
href="https://bugs.webkit.org/show_bug.cgi?id=165225">bug 165225</a>
from <span class="vcard"><a class="email" href="mailto:wenson_hsieh@apple.com" title="Wenson Hsieh <wenson_hsieh@apple.com>"> <span class="fn">Wenson Hsieh</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=303134&action=diff" name="attach_303134" title="Patch">attachment 303134</a> <a href="attachment.cgi?id=303134&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=303134&action=review">https://bugs.webkit.org/attachment.cgi?id=303134&action=review</a>
<span class="quote">> Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:391
> + // dismiss any viewController that is being presented. This is works for all types of viewcontrollers , popovers, etc.</span >
Please capitalize "dismiss"
<span class="quote">> Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:392
> + UIViewController *presentedViewController = [UIViewController _viewControllerForFullScreenPresentationFromView:_view];</span >
So if I understand correctly, [UIViewController _viewControllerForFullScreenPresentationFromView:_view] will fetch the _presentationPopover, if it exists, as well? If that is really the case, then this is OK, but we should at least tear down _presentationPopover properly (i.e. nil out _presentationPopover and set its delegate to nil).
<span class="quote">> Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:506
> + // Clear out any previous view controller reference, to prevent calling dismiss on a view controller that</span >
Per Darin's advice a few comments above, this should really say "Clear out the view controller we just presented" rather than refer to the view controller we're clearing out as the "previous" one.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>