<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[199558] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/199558">199558</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2016-04-14 15:07:00 -0700 (Thu, 14 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Mac] Add API for open panel handling to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=137759
rdar://problem/23278623

Reviewed by Tim Horton.

Source/WebKit2:

Based on a patch by Brian Michel.

* Shared/API/Cocoa/WebKit.h:
Import WKOpenPanelParameters.h.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Create a WKOpenPanelParameters for Type::OpenPanelParameters.

* UIProcess/API/APIOpenPanelParameters.cpp: Renamed from Source/WebKit2/Shared/WebOpenPanelParameters.cpp.
* UIProcess/API/APIOpenPanelParameters.h: Renamed from Source/WebKit2/Shared/WebOpenPanelParameters.h.
Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

* UIProcess/API/APIUIClient.h:
(API::UIClient::runOpenPanel):
Change this to take a SecurityOriginData.

* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKOpenPanelParametersRef.cpp:
(WKOpenPanelParametersGetTypeID):
Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

* UIProcess/API/C/WKOpenPanelResultListener.cpp:
(filePathsFromFileURLs):
(WKOpenPanelResultListenerChooseFiles):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
Change chooseFiles to take a Vector&lt;String&gt; instead of an API::Array of URLs.

* UIProcess/API/Cocoa/WKOpenPanelParameters.h: Added.
* UIProcess/API/Cocoa/WKOpenPanelParameters.mm: Added.
(-[WKOpenPanelParameters allowsMultipleSelection]):
(-[WKOpenPanelParameters _apiObject]):
* UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h:
Add a WKOpenPanelParameters class which contains information about a file upload control.

* UIProcess/API/Cocoa/WKUIDelegate.h:
Add new delegate method.

* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
Record whether the UI delegate implements the new delegate method.

(WebKit::UIDelegate::UIClient::runOpenPanel):
Invoke the new delegate method.

* UIProcess/PageClient.h:
(WebKit::PageClient::handleRunOpenPanel):
Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

* UIProcess/WebOpenPanelResultListenerProxy.cpp:
(WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
* UIProcess/WebOpenPanelResultListenerProxy.h:
Change chooseFiles to take a Vector&lt;String&gt; instead of an API::Array of URLs.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runOpenPanel):
* UIProcess/WebPageProxy.h:
Change this to take a SecurityOriginData.

* UIProcess/WebPageProxy.messages.in:
Change RunOpenPanel to take a SecurityOriginData.

* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::handleRunOpenPanel):
Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showRunOpenPanel:resultListener:]):
Change chooseFiles to take a Vector&lt;String&gt; instead of an API::Array of URLs.

* UIProcess/ios/forms/WKFileUploadPanel.h:
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
Change chooseFiles to take a Vector&lt;String&gt; instead of an API::Array of URLs.

(-[WKFileUploadPanel presentWithParameters:resultListener:]):
Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

* WebKit2.xcodeproj/project.pbxproj:
Add new file.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runOpenPanel):
Pass the security origin of the frame along.

Tools:

Have MiniBrowser implement the new delegate method.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedAPICocoaWebKith">trunk/Source/WebKit2/Shared/API/Cocoa/WebKit.h</a></li>
<li><a href="#trunkSourceWebKit2SharedCocoaAPIObjectmm">trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIUIClienth">trunk/Source/WebKit2/UIProcess/API/APIUIClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKAPICasth">trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKOpenPanelParametersRefcpp">trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParametersRef.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKOpenPanelResultListenercpp">trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelResultListener.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKUIDelegateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaUIDelegateh">trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaUIDelegatemm">trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebOpenPanelResultListenerProxycpp">trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebOpenPanelResultListenerProxyh">trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSh">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSmm">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionh">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosformsWKFileUploadPanelh">trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosformsWKFileUploadPanelmm">trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsMiniBrowsermacWK2BrowserWindowControllerm">trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIOpenPanelParameterscpp">trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIOpenPanelParametersh">trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKOpenPanelParametersh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKOpenPanelParametersmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKOpenPanelParametersInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2SharedWebOpenPanelParameterscpp">trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebOpenPanelParametersh">trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/ChangeLog        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -1,3 +1,100 @@
</span><ins>+2016-04-14  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        [Mac] Add API for open panel handling to WKWebView
+        https://bugs.webkit.org/show_bug.cgi?id=137759
+        rdar://problem/23278623
+
+        Reviewed by Tim Horton.
+
+        Based on a patch by Brian Michel.
+
+        * Shared/API/Cocoa/WebKit.h:
+        Import WKOpenPanelParameters.h.
+
+        * Shared/Cocoa/APIObject.mm:
+        (API::Object::newObject):
+        Create a WKOpenPanelParameters for Type::OpenPanelParameters.
+
+        * UIProcess/API/APIOpenPanelParameters.cpp: Renamed from Source/WebKit2/Shared/WebOpenPanelParameters.cpp.
+        * UIProcess/API/APIOpenPanelParameters.h: Renamed from Source/WebKit2/Shared/WebOpenPanelParameters.h.
+        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.
+
+        * UIProcess/API/APIUIClient.h:
+        (API::UIClient::runOpenPanel):
+        Change this to take a SecurityOriginData.
+
+        * UIProcess/API/C/WKAPICast.h:
+        * UIProcess/API/C/WKOpenPanelParametersRef.cpp:
+        (WKOpenPanelParametersGetTypeID):
+        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.
+
+        * UIProcess/API/C/WKOpenPanelResultListener.cpp:
+        (filePathsFromFileURLs):
+        (WKOpenPanelResultListenerChooseFiles):
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageUIClient):
+        Change chooseFiles to take a Vector&lt;String&gt; instead of an API::Array of URLs.
+
+        * UIProcess/API/Cocoa/WKOpenPanelParameters.h: Added.
+        * UIProcess/API/Cocoa/WKOpenPanelParameters.mm: Added.
+        (-[WKOpenPanelParameters allowsMultipleSelection]):
+        (-[WKOpenPanelParameters _apiObject]):
+        * UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h:
+        Add a WKOpenPanelParameters class which contains information about a file upload control.
+
+        * UIProcess/API/Cocoa/WKUIDelegate.h:
+        Add new delegate method.
+
+        * UIProcess/Cocoa/UIDelegate.h:
+        * UIProcess/Cocoa/UIDelegate.mm:
+        (WebKit::UIDelegate::setDelegate):
+        Record whether the UI delegate implements the new delegate method.
+
+        (WebKit::UIDelegate::UIClient::runOpenPanel):
+        Invoke the new delegate method.
+
+        * UIProcess/PageClient.h:
+        (WebKit::PageClient::handleRunOpenPanel):
+        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.
+
+        * UIProcess/WebOpenPanelResultListenerProxy.cpp:
+        (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
+        * UIProcess/WebOpenPanelResultListenerProxy.h:
+        Change chooseFiles to take a Vector&lt;String&gt; instead of an API::Array of URLs.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::runOpenPanel):
+        * UIProcess/WebPageProxy.h:
+        Change this to take a SecurityOriginData.
+
+        * UIProcess/WebPageProxy.messages.in:
+        Change RunOpenPanel to take a SecurityOriginData.
+
+        * UIProcess/ios/PageClientImplIOS.h:
+        * UIProcess/ios/PageClientImplIOS.mm:
+        (WebKit::PageClientImpl::handleRunOpenPanel):
+        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.
+
+        * UIProcess/ios/WKContentViewInteraction.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _showRunOpenPanel:resultListener:]):
+        Change chooseFiles to take a Vector&lt;String&gt; instead of an API::Array of URLs.
+
+        * UIProcess/ios/forms/WKFileUploadPanel.h:
+        * UIProcess/ios/forms/WKFileUploadPanel.mm:
+        (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
+        Change chooseFiles to take a Vector&lt;String&gt; instead of an API::Array of URLs.
+
+        (-[WKFileUploadPanel presentWithParameters:resultListener:]):
+        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add new file.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::runOpenPanel):
+        Pass the security origin of the frame along.
+
</ins><span class="cx"> 2016-04-14  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r199554.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPICocoaWebKith"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/Cocoa/WebKit.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/Cocoa/WebKit.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/WebKit.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #import &lt;WebKit/WKNavigationAction.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKNavigationDelegate.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKNavigationResponse.h&gt;
</span><ins>+#import &lt;WebKit/WKOpenPanelParameters.h&gt;
</ins><span class="cx"> #import &lt;WebKit/WKPreferences.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKPreviewActionItem.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKPreviewActionItemIdentifiers.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedCocoaAPIObjectmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> #import &quot;WKNavigationDataInternal.h&quot;
</span><span class="cx"> #import &quot;WKNavigationInternal.h&quot;
</span><span class="cx"> #import &quot;WKNavigationResponseInternal.h&quot;
</span><ins>+#import &quot;WKOpenPanelParametersInternal.h&quot;
</ins><span class="cx"> #import &quot;WKPreferencesInternal.h&quot;
</span><span class="cx"> #import &quot;WKProcessPoolInternal.h&quot;
</span><span class="cx"> #import &quot;WKSecurityOriginInternal.h&quot;
</span><span class="lines">@@ -181,6 +182,10 @@
</span><span class="cx">         wrapper = [WKNavigationResponse alloc];
</span><span class="cx">         break;
</span><span class="cx"> 
</span><ins>+    case Type::OpenPanelParameters:
+        wrapper = [WKOpenPanelParameters alloc];
+        break;
+
</ins><span class="cx">     case Type::PageGroup:
</span><span class="cx">         wrapper = [WKBrowsingContextGroup alloc];
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebOpenPanelParameterscpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -1,69 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2012 Samsung Electronics. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebOpenPanelParameters.h&quot;
-
-#include &quot;APIArray.h&quot;
-#include &quot;APIString.h&quot;
-#include &lt;wtf/Vector.h&gt;
-
-using namespace WebCore;
-
-namespace WebKit {
-
-PassRefPtr&lt;WebOpenPanelParameters&gt; WebOpenPanelParameters::create(const FileChooserSettings&amp; settings)
-{
-    return adoptRef(new WebOpenPanelParameters(settings));
-}
-
-WebOpenPanelParameters::WebOpenPanelParameters(const FileChooserSettings&amp; settings)
-    : m_settings(settings)
-{
-}
-
-WebOpenPanelParameters::~WebOpenPanelParameters()
-{
-}
-
-Ref&lt;API::Array&gt; WebOpenPanelParameters::acceptMIMETypes() const
-{
-    return API::Array::createStringArray(m_settings.acceptMIMETypes);
-}
-
-#if ENABLE(MEDIA_CAPTURE)
-bool WebOpenPanelParameters::capture() const
-{
-    return m_settings.capture;
-}
-#endif
-
-Ref&lt;API::Array&gt; WebOpenPanelParameters::selectedFileNames() const
-{
-    return API::Array::createStringArray(m_settings.selectedFiles);
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebKit2SharedWebOpenPanelParametersh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -1,61 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2012 Samsung Electronics. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebOpenPanelParameters_h
-#define WebOpenPanelParameters_h
-
-#include &quot;APIObject.h&quot;
-#include &lt;WebCore/FileChooser.h&gt;
-#include &lt;wtf/Vector.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace API {
-class Array;
-}
-
-namespace WebKit {
-
-class WebOpenPanelParameters : public API::ObjectImpl&lt;API::Object::Type::OpenPanelParameters&gt; {
-public:
-    static PassRefPtr&lt;WebOpenPanelParameters&gt; create(const WebCore::FileChooserSettings&amp;);
-    ~WebOpenPanelParameters();
-
-    bool allowMultipleFiles() const { return m_settings.allowsMultipleFiles; }
-    Ref&lt;API::Array&gt; acceptMIMETypes() const;
-    Ref&lt;API::Array&gt; selectedFileNames() const;
-#if ENABLE(MEDIA_CAPTURE)
-    bool capture() const;
-#endif
-
-private:
-    explicit WebOpenPanelParameters(const WebCore::FileChooserSettings&amp;);
-
-    WebCore::FileChooserSettings m_settings;
-};
-
-} // namespace WebKit
-
-#endif // WebOpenPanelParameters_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIOpenPanelParameterscppfromrev199557trunkSourceWebKit2SharedWebOpenPanelParameterscpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.cpp (from rev 199557, trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp) (0 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.cpp                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.cpp        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;APIOpenPanelParameters.h&quot;
+
+#include &quot;APIArray.h&quot;
+#include &quot;APIString.h&quot;
+#include &lt;wtf/Vector.h&gt;
+
+using namespace WebCore;
+
+namespace API {
+
+Ref&lt;OpenPanelParameters&gt; OpenPanelParameters::create(const FileChooserSettings&amp; settings)
+{
+    return adoptRef(*new OpenPanelParameters(settings));
+}
+
+OpenPanelParameters::OpenPanelParameters(const FileChooserSettings&amp; settings)
+    : m_settings(settings)
+{
+}
+
+OpenPanelParameters::~OpenPanelParameters()
+{
+}
+
+Ref&lt;API::Array&gt; OpenPanelParameters::acceptMIMETypes() const
+{
+    return API::Array::createStringArray(m_settings.acceptMIMETypes);
+}
+
+#if ENABLE(MEDIA_CAPTURE)
+bool OpenPanelParameters::capture() const
+{
+    return m_settings.capture;
+}
+#endif
+
+Ref&lt;API::Array&gt; OpenPanelParameters::selectedFileNames() const
+{
+    return API::Array::createStringArray(m_settings.selectedFiles);
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIOpenPanelParametershfromrev199557trunkSourceWebKit2SharedWebOpenPanelParametersh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.h (from rev 199557, trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h) (0 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;APIObject.h&quot;
+#include &lt;WebCore/FileChooser.h&gt;
+
+namespace API {
+
+class Array;
+
+class OpenPanelParameters : public API::ObjectImpl&lt;API::Object::Type::OpenPanelParameters&gt; {
+public:
+    static Ref&lt;OpenPanelParameters&gt; create(const WebCore::FileChooserSettings&amp;);
+    ~OpenPanelParameters();
+
+    bool allowMultipleFiles() const { return m_settings.allowsMultipleFiles; }
+    Ref&lt;API::Array&gt; acceptMIMETypes() const;
+    Ref&lt;API::Array&gt; selectedFileNames() const;
+#if ENABLE(MEDIA_CAPTURE)
+    bool capture() const;
+#endif
+
+private:
+    explicit OpenPanelParameters(const WebCore::FileChooserSettings&amp;);
+
+    WebCore::FileChooserSettings m_settings;
+};
+
+} // namespace API
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIUIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIUIClient.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIUIClient.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/API/APIUIClient.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -55,7 +55,6 @@
</span><span class="cx"> class UserMediaPermissionRequestProxy;
</span><span class="cx"> class WebColorPickerResultListenerProxy;
</span><span class="cx"> class WebFrameProxy;
</span><del>-class WebOpenPanelParameters;
</del><span class="cx"> class WebOpenPanelResultListenerProxy;
</span><span class="cx"> class WebPageProxy;
</span><span class="cx"> struct NavigationActionData;
</span><span class="lines">@@ -70,6 +69,7 @@
</span><span class="cx"> class Data;
</span><span class="cx"> class Dictionary;
</span><span class="cx"> class Object;
</span><ins>+class OpenPanelParameters;
</ins><span class="cx"> class SecurityOrigin;
</span><span class="cx"> 
</span><span class="cx"> class UIClient {
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">         completionHandler(currentQuota);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    virtual bool runOpenPanel(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::WebOpenPanelParameters*, WebKit::WebOpenPanelResultListenerProxy*) { return false; }
</del><ins>+    virtual bool runOpenPanel(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&amp;, OpenPanelParameters*, WebKit::WebOpenPanelResultListenerProxy*) { return false; }
</ins><span class="cx">     virtual bool decidePolicyForGeolocationPermissionRequest(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, SecurityOrigin*, WebKit::GeolocationPermissionRequestProxy*) { return false; }
</span><span class="cx">     virtual bool decidePolicyForUserMediaPermissionRequest(WebKit::WebPageProxy&amp;, WebKit::WebFrameProxy&amp;, SecurityOrigin&amp;, SecurityOrigin&amp;, WebKit::UserMediaPermissionRequestProxy&amp;) { return false; }
</span><span class="cx">     virtual bool checkUserMediaPermissionForOrigin(WebKit::WebPageProxy&amp;, WebKit::WebFrameProxy&amp;, SecurityOrigin&amp;, SecurityOrigin&amp;, WebKit::UserMediaPermissionCheckProxy&amp;) { return false; }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKAPICasth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx"> class NavigationAction;
</span><span class="cx"> class NavigationData;
</span><span class="cx"> class NavigationResponse;
</span><ins>+class OpenPanelParameters;
</ins><span class="cx"> class PageConfiguration;
</span><span class="cx"> class ProcessPoolConfiguration;
</span><span class="cx"> class SessionState;
</span><span class="lines">@@ -97,7 +98,6 @@
</span><span class="cx"> class WebNotification;
</span><span class="cx"> class WebNotificationManagerProxy;
</span><span class="cx"> class WebNotificationProvider;
</span><del>-class WebOpenPanelParameters;
</del><span class="cx"> class WebOpenPanelResultListenerProxy;
</span><span class="cx"> class WebPageGroup;
</span><span class="cx"> class WebPageProxy;
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx"> WK_ADD_API_MAPPING(WKNotificationPermissionRequestRef, NotificationPermissionRequest)
</span><span class="cx"> WK_ADD_API_MAPPING(WKNotificationProviderRef, WebNotificationProvider)
</span><span class="cx"> WK_ADD_API_MAPPING(WKNotificationRef, WebNotification)
</span><del>-WK_ADD_API_MAPPING(WKOpenPanelParametersRef, WebOpenPanelParameters)
</del><ins>+WK_ADD_API_MAPPING(WKOpenPanelParametersRef, API::OpenPanelParameters)
</ins><span class="cx"> WK_ADD_API_MAPPING(WKOpenPanelResultListenerRef, WebOpenPanelResultListenerProxy)
</span><span class="cx"> WK_ADD_API_MAPPING(WKPageGroupRef, WebPageGroup)
</span><span class="cx"> WK_ADD_API_MAPPING(WKPageConfigurationRef, API::PageConfiguration)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKOpenPanelParametersRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParametersRef.cpp (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParametersRef.cpp        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParametersRef.cpp        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -28,14 +28,14 @@
</span><span class="cx"> #include &quot;WKOpenPanelParametersRef.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIArray.h&quot;
</span><ins>+#include &quot;APIOpenPanelParameters.h&quot;
</ins><span class="cx"> #include &quot;WKAPICast.h&quot;
</span><del>-#include &quot;WebOpenPanelParameters.h&quot;
</del><span class="cx"> 
</span><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><span class="cx"> WKTypeID WKOpenPanelParametersGetTypeID()
</span><span class="cx"> {
</span><del>-    return toAPI(WebOpenPanelParameters::APIType);
</del><ins>+    return toAPI(API::OpenPanelParameters::APIType);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKOpenPanelParametersGetAllowsMultipleFiles(WKOpenPanelParametersRef parametersRef)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKOpenPanelResultListenercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelResultListener.cpp (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelResultListener.cpp        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelResultListener.cpp        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;WKAPICast.h&quot;
</span><span class="cx"> #include &quot;WebOpenPanelResultListenerProxy.h&quot;
</span><ins>+#include &lt;WebCore/URL.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><span class="lines">@@ -36,9 +37,25 @@
</span><span class="cx">     return toAPI(WebOpenPanelResultListenerProxy::APIType);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static Vector&lt;String&gt; filePathsFromFileURLs(const API::Array&amp; fileURLs)
+{
+    Vector&lt;String&gt; filePaths;
+
+    size_t size = fileURLs.size();
+    filePaths.reserveInitialCapacity(size);
+
+    for (size_t i = 0; i &lt; size; ++i) {
+        API::URL* apiURL = fileURLs.at&lt;API::URL&gt;(i);
+        if (apiURL)
+            filePaths.uncheckedAppend(WebCore::URL(WebCore::URL(), apiURL-&gt;string()).fileSystemPath());
+    }
+
+    return filePaths;
+}
+
</ins><span class="cx"> void WKOpenPanelResultListenerChooseFiles(WKOpenPanelResultListenerRef listenerRef, WKArrayRef fileURLsRef)
</span><span class="cx"> {
</span><del>-    toImpl(listenerRef)-&gt;chooseFiles(toImpl(fileURLsRef));
</del><ins>+    toImpl(listenerRef)-&gt;chooseFiles(filePathsFromFileURLs(*toImpl(fileURLsRef)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKOpenPanelResultListenerCancel(WKOpenPanelResultListenerRef listenerRef)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #include &quot;APINavigationAction.h&quot;
</span><span class="cx"> #include &quot;APINavigationClient.h&quot;
</span><span class="cx"> #include &quot;APINavigationResponse.h&quot;
</span><ins>+#include &quot;APIOpenPanelParameters.h&quot;
</ins><span class="cx"> #include &quot;APIPageConfiguration.h&quot;
</span><span class="cx"> #include &quot;APIPolicyClient.h&quot;
</span><span class="cx"> #include &quot;APISessionState.h&quot;
</span><span class="lines">@@ -61,7 +62,6 @@
</span><span class="cx"> #include &quot;WebFormClient.h&quot;
</span><span class="cx"> #include &quot;WebImage.h&quot;
</span><span class="cx"> #include &quot;WebInspectorProxy.h&quot;
</span><del>-#include &quot;WebOpenPanelParameters.h&quot;
</del><span class="cx"> #include &quot;WebOpenPanelResultListenerProxy.h&quot;
</span><span class="cx"> #include &quot;WebPageGroup.h&quot;
</span><span class="cx"> #include &quot;WebPageMessages.h&quot;
</span><span class="lines">@@ -2053,7 +2053,7 @@
</span><span class="cx">             completionHandler(m_client.exceededDatabaseQuota(toAPI(page), toAPI(frame), toAPI(origin), toAPI(databaseName.impl()), toAPI(databaseDisplayName.impl()), currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, m_client.base.clientInfo));
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        bool runOpenPanel(WebPageProxy* page, WebFrameProxy* frame, WebOpenPanelParameters* parameters, WebOpenPanelResultListenerProxy* listener) override
</del><ins>+        bool runOpenPanel(WebPageProxy* page, WebFrameProxy* frame, const WebCore::SecurityOriginData&amp;, API::OpenPanelParameters* parameters, WebOpenPanelResultListenerProxy* listener) override
</ins><span class="cx">         {
</span><span class="cx">             if (!m_client.runOpenPanel)
</span><span class="cx">                 return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKOpenPanelParametershfromrev199557trunkSourceWebKit2UIProcessAPICWKOpenPanelResultListenercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.h (from rev 199557, trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelResultListener.cpp) (0 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &lt;WebKit/WKFoundation.h&gt;
+
+#if WK_API_ENABLED
+
+#import &lt;Foundation/Foundation.h&gt;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*! WKOpenPanelParameters contains parameters that a file upload control has specified.
+ */
+WK_CLASS_AVAILABLE(WK_MAC_TBA, NA)
+@interface WKOpenPanelParameters : NSObject
+
+/*! @abstract Whether the file upload control supports multiple files.
+ */
+@property (nonatomic, readonly) BOOL allowsMultipleSelection;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKOpenPanelParametersmmfromrev199557trunkSourceWebKit2UIProcessAPICWKOpenPanelResultListenercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.mm (from rev 199557, trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelResultListener.cpp) (0 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.mm        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;WKOpenPanelParametersInternal.h&quot;
+
+#if WK_API_ENABLED
+
+@implementation WKOpenPanelParameters
+
+- (BOOL)allowsMultipleSelection
+{
+    return _openPanelParameters-&gt;allowMultipleFiles();
+}
+
+#pragma mark WKObject protocol implementation
+
+- (API::Object&amp;)_apiObject
+{
+    return *_openPanelParameters;
+}
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKOpenPanelParametersInternalhfromrev199557trunkSourceWebKit2UIProcessAPICWKOpenPanelResultListenercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h (from rev 199557, trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelResultListener.cpp) (0 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;WKOpenPanelParameters.h&quot;
+
+#if WK_API_ENABLED
+
+#import &quot;APIOpenPanelParameters.h&quot;
+#import &quot;WKObject.h&quot;
+
+namespace API {
+
+inline WKOpenPanelParameters *wrapper(OpenPanelParameters&amp; openPanelParameters)
+{
+    ASSERT([openPanelParameters.wrapper() isKindOfClass:[WKOpenPanelParameters class]]);
+
+    return (WKOpenPanelParameters *)openPanelParameters.wrapper();
+}
+
+}
+
+@interface WKOpenPanelParameters () &lt;WKObject&gt; {
+@package
+    API::ObjectStorage&lt;API::OpenPanelParameters&gt; _openPanelParameters;
+}
+@end
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKUIDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> @class WKFrameInfo;
</span><span class="cx"> @class WKNavigationAction;
</span><ins>+@class WKOpenPanelParameters;
</ins><span class="cx"> @class WKPreviewElementInfo;
</span><span class="cx"> @class WKWebViewConfiguration;
</span><span class="cx"> @class WKWindowFeatures;
</span><span class="lines">@@ -143,7 +144,7 @@
</span><span class="cx">  Returning nil will result in WebKit's default preview behavior. webView:commitPreviewingViewController: will only be invoked
</span><span class="cx">  if a non-nil view controller was returned.
</span><span class="cx">  */
</span><del>-- (nullable UIViewController *)webView:(WKWebView *)webView previewingViewControllerForElement:(WKPreviewElementInfo *)elementInfo defaultActions:(NSArray &lt;id &lt;WKPreviewActionItem&gt;&gt; *)previewActions WK_AVAILABLE(NA, WK_IOS_TBA);
</del><ins>+- (nullable UIViewController *)webView:(WKWebView *)webView previewingViewControllerForElement:(WKPreviewElementInfo *)elementInfo defaultActions:(NSArray&lt;id &lt;WKPreviewActionItem&gt;&gt; *)previewActions WK_AVAILABLE(NA, WK_IOS_TBA);
</ins><span class="cx"> 
</span><span class="cx"> /*! @abstract Allows your app to pop to the view controller it created.
</span><span class="cx">  @param webView The web view invoking the delegate method.
</span><span class="lines">@@ -153,6 +154,20 @@
</span><span class="cx"> 
</span><span class="cx"> #endif // TARGET_OS_IPHONE
</span><span class="cx"> 
</span><ins>+#if !TARGET_OS_IPHONE
+
+/*! @abstract Displays a file upload panel.
+ @param webView The web view invoking the delegate method.
+ @param parameters Parameters describing the file upload control.
+ @param frame Information about the frame whose file upload control initiated this call.
+ @param completionHandler The completion handler to call after open panel has been dismissed. Pass the selected URLs if the user chose OK, otherwise nil.
+
+ If you do not implement this method, the web view will behave as if the user selected the Cancel button.
+ */
+- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(WK_ARRAY(NSURL *) * WK_NULLABLE_SPECIFIER URLs))completionHandler WK_AVAILABLE(WK_MAC_TBA, NA);
+
+#endif
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> NS_ASSUME_NONNULL_END
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaUIDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -86,6 +86,9 @@
</span><span class="cx">         void runJavaScriptPrompt(WebKit::WebPageProxy*, const WTF::String&amp;, const WTF::String&amp;, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&amp;, std::function&lt;void (const WTF::String&amp;)&gt; completionHandler) override;
</span><span class="cx">         void exceededDatabaseQuota(WebPageProxy*, WebFrameProxy*, API::SecurityOrigin*, const WTF::String&amp; databaseName, const WTF::String&amp; displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentUsage, unsigned long long expectedUsage, std::function&lt;void (unsigned long long)&gt;) override;
</span><span class="cx">         void reachedApplicationCacheOriginQuota(WebPageProxy*, const WebCore::SecurityOrigin&amp;, uint64_t currentQuota, uint64_t totalBytesNeeded, std::function&lt;void (unsigned long long)&gt; completionHandler) override;
</span><ins>+#if PLATFORM(MAC)
+        bool runOpenPanel(WebPageProxy*, WebFrameProxy*, const WebCore::SecurityOriginData&amp;, API::OpenPanelParameters*, WebOpenPanelResultListenerProxy*) override;
+#endif
</ins><span class="cx">         void printFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*) override;
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> #if HAVE(APP_LINKS)
</span><span class="lines">@@ -108,6 +111,9 @@
</span><span class="cx">         bool webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler : 1;
</span><span class="cx">         bool webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;
</span><span class="cx">         bool webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler : 1;
</span><ins>+#if PLATFORM(MAC)
+        bool webViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler : 1;
+#endif
</ins><span class="cx">         bool webViewDecideDatabaseQuotaForSecurityOriginCurrentQuotaCurrentOriginUsageCurrentDatabaseUsageExpectedUsageDecisionHandler : 1;
</span><span class="cx">         bool webViewDecideWebApplicationCacheQuotaForSecurityOriginCurrentQuotaTotalBytesNeeded : 1;
</span><span class="cx">         bool webViewPrintFrame : 1;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaUIDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -32,11 +32,13 @@
</span><span class="cx"> #import &quot;NavigationActionData.h&quot;
</span><span class="cx"> #import &quot;WKFrameInfoInternal.h&quot;
</span><span class="cx"> #import &quot;WKNavigationActionInternal.h&quot;
</span><ins>+#import &quot;WKOpenPanelParametersInternal.h&quot;
</ins><span class="cx"> #import &quot;WKSecurityOriginInternal.h&quot;
</span><span class="cx"> #import &quot;WKWebViewConfigurationInternal.h&quot;
</span><span class="cx"> #import &quot;WKWebViewInternal.h&quot;
</span><span class="cx"> #import &quot;WKWindowFeaturesInternal.h&quot;
</span><span class="cx"> #import &quot;WKUIDelegatePrivate.h&quot;
</span><ins>+#import &quot;WebOpenPanelResultListenerProxy.h&quot;
</ins><span class="cx"> #import &quot;_WKContextMenuElementInfo.h&quot;
</span><span class="cx"> #import &quot;_WKFrameHandleInternal.h&quot;
</span><span class="cx"> #import &lt;WebCore/SecurityOriginData.h&gt;
</span><span class="lines">@@ -78,6 +80,11 @@
</span><span class="cx">     m_delegateMethods.webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)];
</span><span class="cx">     m_delegateMethods.webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:)];
</span><span class="cx">     m_delegateMethods.webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:)];
</span><ins>+
+#if PLATFORM(MAC)
+    m_delegateMethods.webViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:)];
+#endif
+
</ins><span class="cx">     m_delegateMethods.webViewDecideDatabaseQuotaForSecurityOriginCurrentQuotaCurrentOriginUsageCurrentDatabaseUsageExpectedUsageDecisionHandler = [delegate respondsToSelector:@selector(_webView:decideDatabaseQuotaForSecurityOrigin:currentQuota:currentOriginUsage:currentDatabaseUsage:expectedUsage:decisionHandler:)];
</span><span class="cx">     m_delegateMethods.webViewDecideWebApplicationCacheQuotaForSecurityOriginCurrentQuotaTotalBytesNeeded = [delegate respondsToSelector:@selector(_webView:decideWebApplicationCacheQuotaForSecurityOrigin:currentQuota:totalBytesNeeded:decisionHandler:)];
</span><span class="cx">     m_delegateMethods.webViewPrintFrame = [delegate respondsToSelector:@selector(_webView:printFrame:)];
</span><span class="lines">@@ -250,6 +257,40 @@
</span><span class="cx">     }];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+bool UIDelegate::UIClient::runOpenPanel(WebPageProxy*, WebFrameProxy* webFrameProxy, const WebCore::SecurityOriginData&amp; securityOriginData, API::OpenPanelParameters* openPanelParameters, WebOpenPanelResultListenerProxy* listener)
+{
+    if (!m_uiDelegate.m_delegateMethods.webViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler)
+        return false;
+
+    auto delegate = m_uiDelegate.m_delegate.get();
+    if (!delegate)
+        return false;
+
+    auto frame = API::FrameInfo::create(*webFrameProxy, securityOriginData.securityOrigin());
+    RefPtr&lt;WebOpenPanelResultListenerProxy&gt; resultListener = listener;
+
+    RefPtr&lt;CompletionHandlerCallChecker&gt; checker = CompletionHandlerCallChecker::create(delegate.get(), @selector(webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:));
+
+    [delegate webView:m_uiDelegate.m_webView runOpenPanelWithParameters:wrapper(*openPanelParameters) initiatedByFrame:wrapper(frame) completionHandler:[checker, resultListener](NSArray&lt;NSURL *&gt; *URLs) {
+        checker-&gt;didCallCompletionHandler();
+
+        if (!URLs) {
+            resultListener-&gt;cancel();
+            return;
+        }
+
+        Vector&lt;String&gt; filenames;
+        for (NSURL *url in URLs)
+            filenames.append(url.fileSystemRepresentation);
+
+        resultListener-&gt;chooseFiles(filenames);
+    }];
+
+    return true;
+}
+#endif
+
</ins><span class="cx"> void UIDelegate::UIClient::reachedApplicationCacheOriginQuota(WebPageProxy*, const WebCore::SecurityOrigin&amp; securityOrigin, uint64_t currentQuota, uint64_t totalBytesNeeded, std::function&lt;void (unsigned long long)&gt; completionHandler)
</span><span class="cx"> {
</span><span class="cx">     if (!m_uiDelegate.m_delegateMethods.webViewDecideWebApplicationCacheQuotaForSecurityOriginCurrentQuotaTotalBytesNeeded) {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void handleDownloadRequest(DownloadProxy*) = 0;
</span><span class="cx"> 
</span><del>-    virtual bool handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, WebOpenPanelParameters*, WebOpenPanelResultListenerProxy*) { return false; }
</del><ins>+    virtual bool handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, API::OpenPanelParameters*, WebOpenPanelResultListenerProxy*) { return false; }
</ins><span class="cx"> 
</span><span class="cx">     virtual void didChangeContentSize(const WebCore::IntSize&amp;) = 0;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebOpenPanelResultListenerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -45,38 +45,22 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Vector&lt;String&gt; filePathsFromFileURLs(const API::Array&amp; fileURLs)
-{
-    Vector&lt;String&gt; filePaths;
-
-    size_t size = fileURLs.size();
-    filePaths.reserveInitialCapacity(size);
-
-    for (size_t i = 0; i &lt; size; ++i) {
-        API::URL* apiURL = fileURLs.at&lt;API::URL&gt;(i);
-        if (apiURL)
-            filePaths.uncheckedAppend(URL(URL(), apiURL-&gt;string()).fileSystemPath());
-    }
-
-    return filePaths;
-}
-
</del><span class="cx"> #if PLATFORM(IOS)
</span><del>-void WebOpenPanelResultListenerProxy::chooseFiles(API::Array* fileURLsArray, API::String* displayString, const API::Data* iconImageData)
</del><ins>+void WebOpenPanelResultListenerProxy::chooseFiles(const Vector&lt;WTF::String&gt;&amp; filenames, const String&amp; displayString, const API::Data* iconImageData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_page-&gt;didChooseFilesForOpenPanelWithDisplayStringAndIcon(filePathsFromFileURLs(*fileURLsArray), displayString ? displayString-&gt;string() : String(), iconImageData);
</del><ins>+    m_page-&gt;didChooseFilesForOpenPanelWithDisplayStringAndIcon(filenames, displayString, iconImageData);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WebOpenPanelResultListenerProxy::chooseFiles(API::Array* fileURLsArray)
</del><ins>+void WebOpenPanelResultListenerProxy::chooseFiles(const Vector&lt;String&gt;&amp; filenames)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_page-&gt;didChooseFilesForOpenPanel(filePathsFromFileURLs(*fileURLsArray));
</del><ins>+    m_page-&gt;didChooseFilesForOpenPanel(filenames);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebOpenPanelResultListenerProxy::cancel()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebOpenPanelResultListenerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -27,8 +27,10 @@
</span><span class="cx"> #define WebOpenPanelResultListenerProxy_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIObject.h&quot;
</span><ins>+#include &lt;wtf/Forward.h&gt;
</ins><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><ins>+#include &lt;wtf/Vector.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace API {
</span><span class="cx"> class Array;
</span><span class="lines">@@ -50,9 +52,9 @@
</span><span class="cx">     virtual ~WebOpenPanelResultListenerProxy();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    void chooseFiles(API::Array*, API::String* displayString, const API::Data* iconImageData);
</del><ins>+    void chooseFiles(const Vector&lt;String&gt;&amp; filenames, const String&amp; displayString, const API::Data* iconImageData);
</ins><span class="cx"> #endif
</span><del>-    void chooseFiles(API::Array*);
</del><ins>+    void chooseFiles(const Vector&lt;String&gt;&amp; filenames);
</ins><span class="cx">     void cancel();
</span><span class="cx"> 
</span><span class="cx">     void invalidate();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #include &quot;APINavigationAction.h&quot;
</span><span class="cx"> #include &quot;APINavigationClient.h&quot;
</span><span class="cx"> #include &quot;APINavigationResponse.h&quot;
</span><ins>+#include &quot;APIOpenPanelParameters.h&quot;
</ins><span class="cx"> #include &quot;APIPageConfiguration.h&quot;
</span><span class="cx"> #include &quot;APIPolicyClient.h&quot;
</span><span class="cx"> #include &quot;APISecurityOrigin.h&quot;
</span><span class="lines">@@ -90,7 +91,6 @@
</span><span class="cx"> #include &quot;WebInspectorProxyMessages.h&quot;
</span><span class="cx"> #include &quot;WebNavigationState.h&quot;
</span><span class="cx"> #include &quot;WebNotificationManagerProxy.h&quot;
</span><del>-#include &quot;WebOpenPanelParameters.h&quot;
</del><span class="cx"> #include &quot;WebOpenPanelResultListenerProxy.h&quot;
</span><span class="cx"> #include &quot;WebPageCreationParameters.h&quot;
</span><span class="cx"> #include &quot;WebPageGroup.h&quot;
</span><span class="lines">@@ -3853,7 +3853,7 @@
</span><span class="cx">     m_uiClient-&gt;pageDidScroll(this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::runOpenPanel(uint64_t frameID, const FileChooserSettings&amp; settings)
</del><ins>+void WebPageProxy::runOpenPanel(uint64_t frameID, const SecurityOriginData&amp; frameSecurityOrigin, const FileChooserSettings&amp; settings)
</ins><span class="cx"> {
</span><span class="cx">     if (m_openPanelResultListener) {
</span><span class="cx">         m_openPanelResultListener-&gt;invalidate();
</span><span class="lines">@@ -3863,14 +3863,15 @@
</span><span class="cx">     WebFrameProxy* frame = m_process-&gt;webFrame(frameID);
</span><span class="cx">     MESSAGE_CHECK(frame);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;WebOpenPanelParameters&gt; parameters = WebOpenPanelParameters::create(settings);
</del><ins>+    Ref&lt;API::OpenPanelParameters&gt; parameters = API::OpenPanelParameters::create(settings);
</ins><span class="cx">     m_openPanelResultListener = WebOpenPanelResultListenerProxy::create(this);
</span><span class="cx"> 
</span><span class="cx">     // Since runOpenPanel() can spin a nested run loop we need to turn off the responsiveness timer.
</span><span class="cx">     m_process-&gt;responsivenessTimer().stop();
</span><span class="cx"> 
</span><del>-    if (!m_uiClient-&gt;runOpenPanel(this, frame, parameters.get(), m_openPanelResultListener.get())) {
-        if (!m_pageClient.handleRunOpenPanel(this, frame, parameters.get(), m_openPanelResultListener.get()))
</del><ins>+
+    if (!m_uiClient-&gt;runOpenPanel(this, frame, frameSecurityOrigin, parameters.ptr(), m_openPanelResultListener.get())) {
+        if (!m_pageClient.handleRunOpenPanel(this, frame, parameters.ptr(), m_openPanelResultListener.get()))
</ins><span class="cx">             didCancelForOpenPanel();
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -1210,7 +1210,7 @@
</span><span class="cx">     void runBeforeUnloadConfirmPanel(const String&amp; message, uint64_t frameID, RefPtr&lt;Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply&gt;);
</span><span class="cx">     void didChangeViewportProperties(const WebCore::ViewportAttributes&amp;);
</span><span class="cx">     void pageDidScroll();
</span><del>-    void runOpenPanel(uint64_t frameID, const WebCore::FileChooserSettings&amp;);
</del><ins>+    void runOpenPanel(uint64_t frameID, const WebCore::SecurityOriginData&amp;, const WebCore::FileChooserSettings&amp;);
</ins><span class="cx">     void printFrame(uint64_t frameID);
</span><span class="cx">     void exceededDatabaseQuota(uint64_t frameID, const String&amp; originIdentifier, const String&amp; databaseName, const String&amp; displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr&lt;Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply&gt;);
</span><span class="cx">     void reachedApplicationCacheOriginQuota(const String&amp; originIdentifier, uint64_t currentQuota, uint64_t totalBytesNeeded, PassRefPtr&lt;Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::DelayedReply&gt;);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> 
</span><span class="cx">     RunBeforeUnloadConfirmPanel(String message, uint64_t frameID) -&gt; (bool shouldClose) Delayed
</span><span class="cx">     PageDidScroll()
</span><del>-    RunOpenPanel(uint64_t frameID, struct WebCore::FileChooserSettings parameters)
</del><ins>+    RunOpenPanel(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, struct WebCore::FileChooserSettings parameters)
</ins><span class="cx">     PrintFrame(uint64_t frameID) -&gt; ()
</span><span class="cx">     RunModal()
</span><span class="cx">     NotifyScrollerThumbIsVisibleInRect(WebCore::IntRect scrollerThumb)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">     void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold) override;
</span><span class="cx">     void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect&amp; elementRect) override;
</span><span class="cx"> 
</span><del>-    bool handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, WebOpenPanelParameters*, WebOpenPanelResultListenerProxy*) override;
</del><ins>+    bool handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, API::OpenPanelParameters*, WebOpenPanelResultListenerProxy*) override;
</ins><span class="cx">     void disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID) override;
</span><span class="cx">     double minimumZoomScale() const override;
</span><span class="cx">     WebCore::FloatRect documentRect() const override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -560,7 +560,7 @@
</span><span class="cx">     [m_contentView _showPlaybackTargetPicker:hasVideo fromRect:elementRect];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool PageClientImpl::handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, WebOpenPanelParameters* parameters, WebOpenPanelResultListenerProxy* listener)
</del><ins>+bool PageClientImpl::handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, API::OpenPanelParameters* parameters, WebOpenPanelResultListenerProxy* listener)
</ins><span class="cx"> {
</span><span class="cx">     [m_contentView _showRunOpenPanel:parameters resultListener:listener];
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -44,6 +44,10 @@
</span><span class="cx"> #import &lt;wtf/Vector.h&gt;
</span><span class="cx"> #import &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><ins>+namespace API {
+class OpenPanelParameters;
+}
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> class Color;
</span><span class="cx"> class FloatQuad;
</span><span class="lines">@@ -53,7 +57,6 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> class NativeWebTouchEvent;
</span><span class="cx"> class SmartMagnificationController;
</span><del>-class WebOpenPanelParameters;
</del><span class="cx"> class WebOpenPanelResultListenerProxy;
</span><span class="cx"> class WebPageProxy;
</span><span class="cx"> }
</span><span class="lines">@@ -209,7 +212,7 @@
</span><span class="cx"> - (void)_overflowScrollingDidEnd;
</span><span class="cx"> - (void)_didUpdateBlockSelectionWithTouch:(WebKit::SelectionTouch)touch withFlags:(WebKit::SelectionFlags)flags growThreshold:(CGFloat)growThreshold shrinkThreshold:(CGFloat)shrinkThreshold;
</span><span class="cx"> - (void)_showPlaybackTargetPicker:(BOOL)hasVideo fromRect:(const WebCore::IntRect&amp;)elementRect;
</span><del>-- (void)_showRunOpenPanel:(WebKit::WebOpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;
</del><ins>+- (void)_showRunOpenPanel:(API::OpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;
</ins><span class="cx"> - (void)accessoryDone;
</span><span class="cx"> - (void)_didHandleKeyEvent:(WebIOSEvent *)event eventWasHandled:(BOOL)eventWasHandled;
</span><span class="cx"> - (Vector&lt;WebKit::OptionItem&gt;&amp;) assistedNodeSelectOptions;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -3661,7 +3661,7 @@
</span><span class="cx">     [_airPlayRoutePicker show:hasVideo fromRect:elementRect];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_showRunOpenPanel:(WebOpenPanelParameters*)parameters resultListener:(WebOpenPanelResultListenerProxy*)listener
</del><ins>+- (void)_showRunOpenPanel:(API::OpenPanelParameters*)parameters resultListener:(WebOpenPanelResultListenerProxy*)listener
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!_fileUploadPanel);
</span><span class="cx">     if (_fileUploadPanel)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosformsWKFileUploadPanelh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.h (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.h        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.h        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -30,15 +30,18 @@
</span><span class="cx"> @class WKContentView;
</span><span class="cx"> @protocol WKFileUploadPanelDelegate;
</span><span class="cx"> 
</span><ins>+namespace API {
+class OpenPanelParameters;
+}
+
</ins><span class="cx"> namespace WebKit {
</span><del>-class WebOpenPanelParameters;
</del><span class="cx"> class WebOpenPanelResultListenerProxy;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @interface WKFileUploadPanel : UIViewController
</span><span class="cx"> @property (nonatomic, assign) id &lt;WKFileUploadPanelDelegate&gt; delegate;
</span><span class="cx"> - (instancetype)initWithView:(WKContentView *)view;
</span><del>-- (void)presentWithParameters:(WebKit::WebOpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;
</del><ins>+- (void)presentWithParameters:(API::OpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;
</ins><span class="cx"> - (void)dismiss;
</span><span class="cx"> @end
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosformsWKFileUploadPanelmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -30,13 +30,13 @@
</span><span class="cx"> 
</span><span class="cx"> #import &quot;APIArray.h&quot;
</span><span class="cx"> #import &quot;APIData.h&quot;
</span><ins>+#import &quot;APIOpenPanelParameters.h&quot;
</ins><span class="cx"> #import &quot;APIString.h&quot;
</span><span class="cx"> #import &quot;UIKitSPI.h&quot;
</span><span class="cx"> #import &quot;WKContentViewInteraction.h&quot;
</span><span class="cx"> #import &quot;WKData.h&quot;
</span><span class="cx"> #import &quot;WKStringCF.h&quot;
</span><span class="cx"> #import &quot;WKURLCF.h&quot;
</span><del>-#import &quot;WebOpenPanelParameters.h&quot;
</del><span class="cx"> #import &quot;WebOpenPanelResultListenerProxy.h&quot;
</span><span class="cx"> #import &quot;WebPageProxy.h&quot;
</span><span class="cx"> #import &lt;AVFoundation/AVFoundation.h&gt;
</span><span class="lines">@@ -333,24 +333,21 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Vector&lt;RefPtr&lt;API::Object&gt;&gt; urls;
-    urls.reserveInitialCapacity(count);
</del><ins>+    Vector&lt;String&gt; filenames;
+    filenames.reserveInitialCapacity(count);
</ins><span class="cx">     for (NSURL *fileURL in fileURLs)
</span><del>-        urls.uncheckedAppend(adoptRef(toImpl(WKURLCreateWithCFURL((CFURLRef)fileURL))));
-    Ref&lt;API::Array&gt; fileURLsRef = API::Array::create(WTFMove(urls));
</del><ins>+        filenames.uncheckedAppend(fileURL.fileSystemRepresentation);
</ins><span class="cx"> 
</span><span class="cx">     NSData *jpeg = UIImageJPEGRepresentation(iconImage, 1.0);
</span><span class="cx">     RefPtr&lt;API::Data&gt; iconImageDataRef = adoptRef(toImpl(WKDataCreate(reinterpret_cast&lt;const unsigned char*&gt;([jpeg bytes]), [jpeg length])));
</span><span class="cx"> 
</span><del>-    RefPtr&lt;API::String&gt; displayStringRef = adoptRef(toImpl(WKStringCreateWithCFString((CFStringRef)displayString)));
-
-    _listener-&gt;chooseFiles(fileURLsRef.ptr(), displayStringRef.get(), iconImageDataRef.get());
</del><ins>+    _listener-&gt;chooseFiles(filenames, displayString, iconImageDataRef.get());
</ins><span class="cx">     [self _dispatchDidDismiss];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #pragma mark - Present / Dismiss API
</span><span class="cx"> 
</span><del>-- (void)presentWithParameters:(WebKit::WebOpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener
</del><ins>+- (void)presentWithParameters:(API::OpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!_listener);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -285,6 +285,7 @@
</span><span class="cx">                 1A6563E41B7A8C50009CF787 /* APIWindowFeatures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6563E21B7A8C50009CF787 /* APIWindowFeatures.cpp */; };
</span><span class="cx">                 1A6563E51B7A8C50009CF787 /* APIWindowFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6563E31B7A8C50009CF787 /* APIWindowFeatures.h */; };
</span><span class="cx">                 1A66BF8F18A052ED002071B4 /* WKWebViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */; };
</span><ins>+                1A67CD2E1CBC513F00BFE3EA /* WKOpenPanelParametersInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A67CD2D1CBC513F00BFE3EA /* WKOpenPanelParametersInternal.h */; };
</ins><span class="cx">                 1A6F9F9011E13EFC00DB1371 /* CommandLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */; };
</span><span class="cx">                 1A6F9FB711E1408500DB1371 /* CommandLinePOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6F9FB611E1408500DB1371 /* CommandLinePOSIX.cpp */; };
</span><span class="cx">                 1A6FA21E1BD0435B00AAA650 /* WKFrameInfoPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6FA21D1BD0435B00AAA650 /* WKFrameInfoPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -436,6 +437,8 @@
</span><span class="cx">                 1AC75380183BE50F0072CB15 /* DataReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC7537E183BE50F0072CB15 /* DataReference.h */; };
</span><span class="cx">                 1AC75A1B1B3368270056745B /* HangDetectionDisabler.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC75A1A1B3368270056745B /* HangDetectionDisabler.h */; };
</span><span class="cx">                 1AC75A1E1B33695E0056745B /* HangDetectionDisablerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AC75A1C1B33695E0056745B /* HangDetectionDisablerMac.mm */; };
</span><ins>+                1ACC50F11CBC381D003C7D03 /* WKOpenPanelParameters.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ACC50EF1CBC381D003C7D03 /* WKOpenPanelParameters.mm */; };
+                1ACC50F21CBC381D003C7D03 /* WKOpenPanelParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACC50F01CBC381D003C7D03 /* WKOpenPanelParameters.h */; settings = {ATTRIBUTES = (Public, ); }; };
</ins><span class="cx">                 1ACC87BA1981C341003D1AF4 /* WKNavigationPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACC87B91981C341003D1AF4 /* WKNavigationPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1ACECD2417162DB1001FC9EF /* StorageAreaMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACECD2217162DB1001FC9EF /* StorageAreaMap.cpp */; };
</span><span class="cx">                 1ACECD2517162DB1001FC9EF /* StorageAreaMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACECD2317162DB1001FC9EF /* StorageAreaMap.h */; };
</span><span class="lines">@@ -1504,8 +1507,8 @@
</span><span class="cx">                 BC857F7E12B82CEE00EDEB2E /* WebOpenPanelResultListenerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC1DFEA312B31F87005DF730 /* WebOpenPanelResultListenerProxy.cpp */; };
</span><span class="cx">                 BC857F8512B82D0B00EDEB2E /* WebOpenPanelResultListener.h in Headers */ = {isa = PBXBuildFile; fileRef = BC857F8312B82D0B00EDEB2E /* WebOpenPanelResultListener.h */; };
</span><span class="cx">                 BC857F8612B82D0B00EDEB2E /* WebOpenPanelResultListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC857F8412B82D0B00EDEB2E /* WebOpenPanelResultListener.cpp */; };
</span><del>-                BC857FB512B830E600EDEB2E /* WebOpenPanelParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = BC857FB312B830E600EDEB2E /* WebOpenPanelParameters.h */; };
-                BC857FB612B830E600EDEB2E /* WebOpenPanelParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC857FB412B830E600EDEB2E /* WebOpenPanelParameters.cpp */; };
</del><ins>+                BC857FB512B830E600EDEB2E /* APIOpenPanelParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = BC857FB312B830E600EDEB2E /* APIOpenPanelParameters.h */; };
+                BC857FB612B830E600EDEB2E /* APIOpenPanelParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC857FB412B830E600EDEB2E /* APIOpenPanelParameters.cpp */; };
</ins><span class="cx">                 BC857FE612B843D800EDEB2E /* WKOpenPanelParametersRef.h in Headers */ = {isa = PBXBuildFile; fileRef = BC857FE412B843D800EDEB2E /* WKOpenPanelParametersRef.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BC85806212B8505700EDEB2E /* WKOpenPanelResultListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC1DFE8E12B31CA8005DF730 /* WKOpenPanelResultListener.cpp */; };
</span><span class="cx">                 BC85806312B8505700EDEB2E /* WKOpenPanelParametersRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC857FE512B843D800EDEB2E /* WKOpenPanelParametersRef.cpp */; };
</span><span class="lines">@@ -2230,6 +2233,7 @@
</span><span class="cx">                 1A6563E21B7A8C50009CF787 /* APIWindowFeatures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIWindowFeatures.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A6563E31B7A8C50009CF787 /* APIWindowFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIWindowFeatures.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1A67CD2D1CBC513F00BFE3EA /* WKOpenPanelParametersInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKOpenPanelParametersInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1A6D141F1B0167D500785FF0 /* Info-OSX-10.9-10.10.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = &quot;Info-OSX-10.9-10.10.plist&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A6D14211B01681600785FF0 /* PluginService.32-64-10.9-10.10.Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = &quot;PluginService.32-64-10.9-10.10.Info.plist&quot;; path = &quot;PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist&quot;; sourceTree = SOURCE_ROOT; };
</span><span class="cx">                 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandLine.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2404,6 +2408,8 @@
</span><span class="cx">                 1AC7537E183BE50F0072CB15 /* DataReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataReference.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AC75A1A1B3368270056745B /* HangDetectionDisabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HangDetectionDisabler.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AC75A1C1B33695E0056745B /* HangDetectionDisablerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HangDetectionDisablerMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1ACC50EF1CBC381D003C7D03 /* WKOpenPanelParameters.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKOpenPanelParameters.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1ACC50F01CBC381D003C7D03 /* WKOpenPanelParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKOpenPanelParameters.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1ACC87B91981C341003D1AF4 /* WKNavigationPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationPrivate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1ACECD2217162DB1001FC9EF /* StorageAreaMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageAreaMap.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1ACECD2317162DB1001FC9EF /* StorageAreaMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageAreaMap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -3563,8 +3569,8 @@
</span><span class="cx">                 BC857E8512B71EBB00EDEB2E /* WebPageProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPageProxyMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC857F8312B82D0B00EDEB2E /* WebOpenPanelResultListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebOpenPanelResultListener.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC857F8412B82D0B00EDEB2E /* WebOpenPanelResultListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebOpenPanelResultListener.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                BC857FB312B830E600EDEB2E /* WebOpenPanelParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebOpenPanelParameters.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                BC857FB412B830E600EDEB2E /* WebOpenPanelParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebOpenPanelParameters.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                BC857FB312B830E600EDEB2E /* APIOpenPanelParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIOpenPanelParameters.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                BC857FB412B830E600EDEB2E /* APIOpenPanelParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIOpenPanelParameters.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 BC857FE412B843D800EDEB2E /* WKOpenPanelParametersRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKOpenPanelParametersRef.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC857FE512B843D800EDEB2E /* WKOpenPanelParametersRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKOpenPanelParametersRef.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC8699B2116AADAA002A925B /* WKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKView.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4512,8 +4518,6 @@
</span><span class="cx">                                 905620E912BC248B000799B6 /* WebMemorySampler.h */,
</span><span class="cx">                                 C0337DAF127A28D0008FF4F4 /* WebMouseEvent.cpp */,
</span><span class="cx">                                 BCF69F981176CED600471A52 /* WebNavigationDataStore.h */,
</span><del>-                                BC857FB412B830E600EDEB2E /* WebOpenPanelParameters.cpp */,
-                                BC857FB312B830E600EDEB2E /* WebOpenPanelParameters.h */,
</del><span class="cx">                                 C06C6093124C14430001682F /* WebPageCreationParameters.cpp */,
</span><span class="cx">                                 C06C6094124C14430001682F /* WebPageCreationParameters.h */,
</span><span class="cx">                                 BC7B625112A43C9600D174A4 /* WebPageGroupData.cpp */,
</span><span class="lines">@@ -5136,6 +5140,9 @@
</span><span class="cx">                                 1AD60F5C18E20F4C0020C034 /* WKWindowFeatures.h */,
</span><span class="cx">                                 1AD60F5B18E20F4C0020C034 /* WKWindowFeatures.mm */,
</span><span class="cx">                                 1AD60F5F18E20F740020C034 /* WKWindowFeaturesInternal.h */,
</span><ins>+                                1ACC50EF1CBC381D003C7D03 /* WKOpenPanelParameters.mm */,
+                                1ACC50F01CBC381D003C7D03 /* WKOpenPanelParameters.h */,
+                                1A67CD2D1CBC513F00BFE3EA /* WKOpenPanelParametersInternal.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = Cocoa;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -5982,6 +5989,8 @@
</span><span class="cx">                                 BC111B47112F616900337BAB /* mac */,
</span><span class="cx">                                 99C81D5B1C20E817005C4C82 /* APIAutomationClient.h */,
</span><span class="cx">                                 990D28B31C6526D400986977 /* APIAutomationSessionClient.h */,
</span><ins>+                                BC857FB412B830E600EDEB2E /* APIOpenPanelParameters.cpp */,
+                                BC857FB312B830E600EDEB2E /* APIOpenPanelParameters.h */,
</ins><span class="cx">                                 076E884D1A13CADF005E90FC /* APIContextMenuClient.h */,
</span><span class="cx">                                 83891B621A68B3420030F386 /* APIDiagnosticLoggingClient.h */,
</span><span class="cx">                                 1F7D36C018DA513F00D9D659 /* APIDownloadClient.h */,
</span><span class="lines">@@ -7347,6 +7356,7 @@
</span><span class="cx">                                 83891B6C1A68C30B0030F386 /* DiagnosticLoggingClient.h in Headers */,
</span><span class="cx">                                 A1DF631318E0B7C8003A3E2A /* DownloadClient.h in Headers */,
</span><span class="cx">                                 1AB7D4CA1288AAA700CFD08C /* DownloadProxy.h in Headers */,
</span><ins>+                                1ACC50F21CBC381D003C7D03 /* WKOpenPanelParameters.h in Headers */,
</ins><span class="cx">                                 1AD25E96167AB08100EA9BCD /* DownloadProxyMap.h in Headers */,
</span><span class="cx">                                 1AB7D61A1288B9D900CFD08C /* DownloadProxyMessages.h in Headers */,
</span><span class="cx">                                 C517388112DF8F4F00EE3F47 /* DragControllerAction.h in Headers */,
</span><span class="lines">@@ -7707,7 +7717,7 @@
</span><span class="cx">                                 31BA924E148831260062EDB5 /* WebNotificationManagerMessages.h in Headers */,
</span><span class="cx">                                 31A2EC4B148997C200810D71 /* WebNotificationManagerProxy.h in Headers */,
</span><span class="cx">                                 31A2EC4E148997C200810D71 /* WebNotificationProvider.h in Headers */,
</span><del>-                                BC857FB512B830E600EDEB2E /* WebOpenPanelParameters.h in Headers */,
</del><ins>+                                BC857FB512B830E600EDEB2E /* APIOpenPanelParameters.h in Headers */,
</ins><span class="cx">                                 BC857F8512B82D0B00EDEB2E /* WebOpenPanelResultListener.h in Headers */,
</span><span class="cx">                                 BC1DFEA412B31F87005DF730 /* WebOpenPanelResultListenerProxy.h in Headers */,
</span><span class="cx">                                 BC032D8F10F437A00058C15A /* WebPage.h in Headers */,
</span><span class="lines">@@ -7824,6 +7834,7 @@
</span><span class="cx">                                 BC7043CC12F75EE0006472B9 /* WKBundleNavigationAction.h in Headers */,
</span><span class="cx">                                 51A728DE1B1BAD3800102EEE /* WKBundleNavigationActionPrivate.h in Headers */,
</span><span class="cx">                                 BC4BEFE1120A1A4C00FBA0C7 /* WKBundleNodeHandle.h in Headers */,
</span><ins>+                                1A67CD2E1CBC513F00BFE3EA /* WKOpenPanelParametersInternal.h in Headers */,
</ins><span class="cx">                                 BC57450C1263B155006F0F12 /* WKBundleNodeHandlePrivate.h in Headers */,
</span><span class="cx">                                 BC20528111C94284008F3375 /* WKBundlePage.h in Headers */,
</span><span class="cx">                                 7CF47FF717275B71008ACB91 /* WKBundlePageBanner.h in Headers */,
</span><span class="lines">@@ -9035,6 +9046,7 @@
</span><span class="cx">                                 753E3E0D1887398500188496 /* SessionTracker.cpp in Sources */,
</span><span class="cx">                                 1A6420E412DCE2FF00CAAE2C /* ShareableBitmap.cpp in Sources */,
</span><span class="cx">                                 C01A260112662F2100C9ED55 /* ShareableBitmapCG.cpp in Sources */,
</span><ins>+                                1ACC50F11CBC381D003C7D03 /* WKOpenPanelParameters.mm in Sources */,
</ins><span class="cx">                                 51217460164C20E30037A5C1 /* ShareableResource.cpp in Sources */,
</span><span class="cx">                                 1A24BF3A120896A600FBB059 /* SharedMemoryMac.cpp in Sources */,
</span><span class="cx">                                 2DAF06D718BD1A470081CEB1 /* SmartMagnificationController.mm in Sources */,
</span><span class="lines">@@ -9190,7 +9202,7 @@
</span><span class="cx">                                 31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 31A2EC4A148997C200810D71 /* WebNotificationManagerProxy.cpp in Sources */,
</span><span class="cx">                                 31A2EC4D148997C200810D71 /* WebNotificationProvider.cpp in Sources */,
</span><del>-                                BC857FB612B830E600EDEB2E /* WebOpenPanelParameters.cpp in Sources */,
</del><ins>+                                BC857FB612B830E600EDEB2E /* APIOpenPanelParameters.cpp in Sources */,
</ins><span class="cx">                                 BC857F8612B82D0B00EDEB2E /* WebOpenPanelResultListener.cpp in Sources */,
</span><span class="cx">                                 BC857F7E12B82CEE00EDEB2E /* WebOpenPanelResultListenerProxy.cpp in Sources */,
</span><span class="cx">                                 9955A6F61C7986E300EB6A93 /* AutomationProtocolObjects.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -43,7 +43,6 @@
</span><span class="cx"> #include &quot;WebFullScreenManager.h&quot;
</span><span class="cx"> #include &quot;WebHitTestResultData.h&quot;
</span><span class="cx"> #include &quot;WebImage.h&quot;
</span><del>-#include &quot;WebOpenPanelParameters.h&quot;
</del><span class="cx"> #include &quot;WebOpenPanelResultListener.h&quot;
</span><span class="cx"> #include &quot;WebPage.h&quot;
</span><span class="cx"> #include &quot;WebPageCreationParameters.h&quot;
</span><span class="lines">@@ -718,7 +717,7 @@
</span><span class="cx">     WebFrame* webFrame = WebFrame::fromCoreFrame(*frame);
</span><span class="cx">     ASSERT(webFrame);
</span><span class="cx"> 
</span><del>-    m_page-&gt;send(Messages::WebPageProxy::RunOpenPanel(webFrame-&gt;frameID(), fileChooser-&gt;settings()));
</del><ins>+    m_page-&gt;send(Messages::WebPageProxy::RunOpenPanel(webFrame-&gt;frameID(), SecurityOriginData::fromFrame(frame), fileChooser-&gt;settings()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebChromeClient::loadIconForFiles(const Vector&lt;String&gt;&amp; filenames, FileIconLoader* loader)
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Tools/ChangeLog        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-04-14  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        [Mac] Add API for open panel handling to WKWebView
+        https://bugs.webkit.org/show_bug.cgi?id=137759
+        rdar://problem/23278623
+
+        Reviewed by Tim Horton.
+
+        Have MiniBrowser implement the new delegate method.
+
+        * MiniBrowser/mac/WK2BrowserWindowController.m:
+        (-[WK2BrowserWindowController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
+
</ins><span class="cx"> 2016-04-14  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r199554.
</span></span></pre></div>
<a id="trunkToolsMiniBrowsermacWK2BrowserWindowControllerm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m (199557 => 199558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m        2016-04-14 21:54:13 UTC (rev 199557)
+++ trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m        2016-04-14 22:07:00 UTC (rev 199558)
</span><span class="lines">@@ -448,6 +448,24 @@
</span><span class="cx">     }];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101100
+- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSArray&lt;NSURL *&gt; * URLs))completionHandler
+#else
+- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSArray* _Nullable result))completionHandler
+#endif
+{
+    NSOpenPanel *openPanel = [NSOpenPanel openPanel];
+
+    openPanel.allowsMultipleSelection = parameters.allowsMultipleSelection;
+
+    [openPanel beginSheetModalForWindow:webView.window completionHandler:^(NSInteger result) {
+        if (result == NSFileHandlingPanelOKButton)
+            completionHandler(openPanel.URLs);
+        else
+            completionHandler(nil);
+    }];
+}
+
</ins><span class="cx"> - (void)updateTextFieldFromURL:(NSURL *)URL
</span><span class="cx"> {
</span><span class="cx">     if (!URL)
</span></span></pre>
</div>
</div>

</body>
</html>