<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:ap&#64;webkit.org" title="Alexey Proskuryakov &lt;ap&#64;webkit.org&gt;"> <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&#64;webkit.org" title="Alexey Proskuryakov &lt;ap&#64;webkit.org&gt;"> <span class="fn">Alexey Proskuryakov</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=267951&amp;action=diff" name="attach_267951" title="Patch">attachment 267951</a> <a href="attachment.cgi?id=267951&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=267951&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=267951&amp;action=review</a>

Added a few comments. I only did a very shallow review pass though.

<span class="quote">&gt; Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h:40
&gt; +/*! A class conforming to WKOpenPanelResultListener provides methods methods</span >

&quot;methods methods&quot;

<span class="quote">&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:253
&gt; +    if (!m_uiDelegate.m_webView) {
&gt; +        listener-&gt;invalidate();
&gt; +        return false;
&gt; +    }
&gt; +
&gt; +    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">&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:262
&gt; +    // 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">&gt; Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:268
&gt; +    [((id &lt;WKUIDelegate&gt;) delegate) webView:m_uiDelegate.m_webView runOpenPanelWithResultListener:(id &lt;WKOpenPanelResultListener&gt;)adoptNS([[WKConcreteOpenPanelResultListener alloc] initWithListenerProxy:listener]) allowsMultipleFiles:parameters-&gt;allowMultipleFiles()];</span >

It shouldn't be necessary to typecast delegate here, m_delegate is &quot;id &lt;WKUIDelegate&gt;&quot; already.

<span class="quote">&gt; Tools/MiniBrowser/mac/WK2BrowserWindowController.m:452
&gt; +#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 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>