<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:ap@webkit.org" title="Alexey Proskuryakov <ap@webkit.org>"> <span class="fn">Alexey Proskuryakov</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Handle Open Panel Functions Are Unimplemented"
href="https://bugs.webkit.org/show_bug.cgi?id=137759">bug 137759</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #267951 Flags</td>
<td>commit-queue?
</td>
<td>commit-queue-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Handle Open Panel Functions Are Unimplemented"
href="https://bugs.webkit.org/show_bug.cgi?id=137759#c28">Comment # 28</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Handle Open Panel Functions Are Unimplemented"
href="https://bugs.webkit.org/show_bug.cgi?id=137759">bug 137759</a>
from <span class="vcard"><a class="email" href="mailto:ap@webkit.org" title="Alexey Proskuryakov <ap@webkit.org>"> <span class="fn">Alexey Proskuryakov</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=267951&action=diff" name="attach_267951" title="Patch">attachment 267951</a> <a href="attachment.cgi?id=267951&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=267951&action=review">https://bugs.webkit.org/attachment.cgi?id=267951&action=review</a>
Added a few comments. I only did a very shallow review pass though.
<span class="quote">> Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h:40
> +/*! A class conforming to WKOpenPanelResultListener provides methods methods</span >
"methods methods"
<span class="quote">> Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:253
> + if (!m_uiDelegate.m_webView) {
> + listener->invalidate();
> + return false;
> + }
> +
> + NSWindow *window = [m_uiDelegate.m_webView window];</span >
An explicit null check for m_uiDelegate.m_webView is not needed, please remove it. In Objective-C, sending a message to a nil target is supported, and results in a nil pointer in this case.
<span class="quote">> Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:262
> + // If we have no delegate, invalide the listener and return false.</span >
How is this possible, given that m_uiDelegate.m_delegateMethods.webViewRunOpenPanelWithResultListenerAllowsMultipleFiles is true?
<span class="quote">> Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:268
> + [((id <WKUIDelegate>) delegate) webView:m_uiDelegate.m_webView runOpenPanelWithResultListener:(id <WKOpenPanelResultListener>)adoptNS([[WKConcreteOpenPanelResultListener alloc] initWithListenerProxy:listener]) allowsMultipleFiles:parameters->allowMultipleFiles()];</span >
It shouldn't be necessary to typecast delegate here, m_delegate is "id <WKUIDelegate>" already.
<span class="quote">> Tools/MiniBrowser/mac/WK2BrowserWindowController.m:452
> +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090</span >
Please remove this check, trunk WebKit doesn't support 10.9.</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>