Diff
Modified: trunk/Source/WebKit2/ChangeLog (199556 => 199557)
--- trunk/Source/WebKit2/ChangeLog 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/ChangeLog 2016-04-14 21:54:13 UTC (rev 199557)
@@ -1,3 +1,15 @@
+2016-04-14 Jiewen Tan <[email protected]>
+
+ Unreviewed, rolling out r199554.
+
+ The change breaks Yosemite Release/Debug build
+
+ Reverted changeset:
+
+ "[Mac] Add API for open panel handling to WKWebView"
+ https://bugs.webkit.org/show_bug.cgi?id=137759
+ http://trac.webkit.org/changeset/199554
+
2016-04-14 Anders Carlsson <[email protected]>
[Mac] Add API for open panel handling to WKWebView
Modified: trunk/Source/WebKit2/Shared/API/Cocoa/WebKit.h (199556 => 199557)
--- trunk/Source/WebKit2/Shared/API/Cocoa/WebKit.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/WebKit.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -33,7 +33,6 @@
#import <WebKit/WKNavigationAction.h>
#import <WebKit/WKNavigationDelegate.h>
#import <WebKit/WKNavigationResponse.h>
-#import <WebKit/WKOpenPanelParameters.h>
#import <WebKit/WKPreferences.h>
#import <WebKit/WKPreviewActionItem.h>
#import <WebKit/WKPreviewActionItemIdentifiers.h>
Modified: trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm (199556 => 199557)
--- trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm 2016-04-14 21:54:13 UTC (rev 199557)
@@ -46,7 +46,6 @@
#import "WKNavigationDataInternal.h"
#import "WKNavigationInternal.h"
#import "WKNavigationResponseInternal.h"
-#import "WKOpenPanelParametersInternal.h"
#import "WKPreferencesInternal.h"
#import "WKProcessPoolInternal.h"
#import "WKSecurityOriginInternal.h"
@@ -182,10 +181,6 @@
wrapper = [WKNavigationResponse alloc];
break;
- case Type::OpenPanelParameters:
- wrapper = [WKOpenPanelParameters alloc];
- break;
-
case Type::PageGroup:
wrapper = [WKBrowsingContextGroup alloc];
break;
Copied: trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp (from rev 199556, trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.cpp) (0 => 199557)
--- trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp (rev 0)
+++ trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp 2016-04-14 21:54:13 UTC (rev 199557)
@@ -0,0 +1,69 @@
+/*
+ * 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 "config.h"
+#include "WebOpenPanelParameters.h"
+
+#include "APIArray.h"
+#include "APIString.h"
+#include <wtf/Vector.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassRefPtr<WebOpenPanelParameters> WebOpenPanelParameters::create(const FileChooserSettings& settings)
+{
+ return adoptRef(new WebOpenPanelParameters(settings));
+}
+
+WebOpenPanelParameters::WebOpenPanelParameters(const FileChooserSettings& settings)
+ : m_settings(settings)
+{
+}
+
+WebOpenPanelParameters::~WebOpenPanelParameters()
+{
+}
+
+Ref<API::Array> WebOpenPanelParameters::acceptMIMETypes() const
+{
+ return API::Array::createStringArray(m_settings.acceptMIMETypes);
+}
+
+#if ENABLE(MEDIA_CAPTURE)
+bool WebOpenPanelParameters::capture() const
+{
+ return m_settings.capture;
+}
+#endif
+
+Ref<API::Array> WebOpenPanelParameters::selectedFileNames() const
+{
+ return API::Array::createStringArray(m_settings.selectedFiles);
+}
+
+} // namespace WebCore
Copied: trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h (from rev 199556, trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.h) (0 => 199557)
--- trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h (rev 0)
+++ trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -0,0 +1,61 @@
+/*
+ * 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 "APIObject.h"
+#include <WebCore/FileChooser.h>
+#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
+
+namespace API {
+class Array;
+}
+
+namespace WebKit {
+
+class WebOpenPanelParameters : public API::ObjectImpl<API::Object::Type::OpenPanelParameters> {
+public:
+ static PassRefPtr<WebOpenPanelParameters> create(const WebCore::FileChooserSettings&);
+ ~WebOpenPanelParameters();
+
+ bool allowMultipleFiles() const { return m_settings.allowsMultipleFiles; }
+ Ref<API::Array> acceptMIMETypes() const;
+ Ref<API::Array> selectedFileNames() const;
+#if ENABLE(MEDIA_CAPTURE)
+ bool capture() const;
+#endif
+
+private:
+ explicit WebOpenPanelParameters(const WebCore::FileChooserSettings&);
+
+ WebCore::FileChooserSettings m_settings;
+};
+
+} // namespace WebKit
+
+#endif // WebOpenPanelParameters_h
Deleted: trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.cpp (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.cpp 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.cpp 2016-04-14 21:54:13 UTC (rev 199557)
@@ -1,69 +0,0 @@
-/*
- * 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 "config.h"
-#include "APIOpenPanelParameters.h"
-
-#include "APIArray.h"
-#include "APIString.h"
-#include <wtf/Vector.h>
-
-using namespace WebCore;
-
-namespace API {
-
-Ref<OpenPanelParameters> OpenPanelParameters::create(const FileChooserSettings& settings)
-{
- return adoptRef(*new OpenPanelParameters(settings));
-}
-
-OpenPanelParameters::OpenPanelParameters(const FileChooserSettings& settings)
- : m_settings(settings)
-{
-}
-
-OpenPanelParameters::~OpenPanelParameters()
-{
-}
-
-Ref<API::Array> OpenPanelParameters::acceptMIMETypes() const
-{
- return API::Array::createStringArray(m_settings.acceptMIMETypes);
-}
-
-#if ENABLE(MEDIA_CAPTURE)
-bool OpenPanelParameters::capture() const
-{
- return m_settings.capture;
-}
-#endif
-
-Ref<API::Array> OpenPanelParameters::selectedFileNames() const
-{
- return API::Array::createStringArray(m_settings.selectedFiles);
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/API/APIOpenPanelParameters.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -1,54 +0,0 @@
-/*
- * 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 "APIObject.h"
-#include <WebCore/FileChooser.h>
-
-namespace API {
-
-class Array;
-
-class OpenPanelParameters : public API::ObjectImpl<API::Object::Type::OpenPanelParameters> {
-public:
- static Ref<OpenPanelParameters> create(const WebCore::FileChooserSettings&);
- ~OpenPanelParameters();
-
- bool allowMultipleFiles() const { return m_settings.allowsMultipleFiles; }
- Ref<API::Array> acceptMIMETypes() const;
- Ref<API::Array> selectedFileNames() const;
-#if ENABLE(MEDIA_CAPTURE)
- bool capture() const;
-#endif
-
-private:
- explicit OpenPanelParameters(const WebCore::FileChooserSettings&);
-
- WebCore::FileChooserSettings m_settings;
-};
-
-} // namespace API
Modified: trunk/Source/WebKit2/UIProcess/API/APIUIClient.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/API/APIUIClient.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/API/APIUIClient.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -55,6 +55,7 @@
class UserMediaPermissionRequestProxy;
class WebColorPickerResultListenerProxy;
class WebFrameProxy;
+class WebOpenPanelParameters;
class WebOpenPanelResultListenerProxy;
class WebPageProxy;
struct NavigationActionData;
@@ -69,7 +70,6 @@
class Data;
class Dictionary;
class Object;
-class OpenPanelParameters;
class SecurityOrigin;
class UIClient {
@@ -130,7 +130,7 @@
completionHandler(currentQuota);
}
- virtual bool runOpenPanel(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&, OpenPanelParameters*, WebKit::WebOpenPanelResultListenerProxy*) { return false; }
+ virtual bool runOpenPanel(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::WebOpenPanelParameters*, WebKit::WebOpenPanelResultListenerProxy*) { return false; }
virtual bool decidePolicyForGeolocationPermissionRequest(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, SecurityOrigin*, WebKit::GeolocationPermissionRequestProxy*) { return false; }
virtual bool decidePolicyForUserMediaPermissionRequest(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, SecurityOrigin&, SecurityOrigin&, WebKit::UserMediaPermissionRequestProxy&) { return false; }
virtual bool checkUserMediaPermissionForOrigin(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, SecurityOrigin&, SecurityOrigin&, WebKit::UserMediaPermissionCheckProxy&) { return false; }
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -58,7 +58,6 @@
class NavigationAction;
class NavigationData;
class NavigationResponse;
-class OpenPanelParameters;
class PageConfiguration;
class ProcessPoolConfiguration;
class SessionState;
@@ -98,6 +97,7 @@
class WebNotification;
class WebNotificationManagerProxy;
class WebNotificationProvider;
+class WebOpenPanelParameters;
class WebOpenPanelResultListenerProxy;
class WebPageGroup;
class WebPageProxy;
@@ -146,7 +146,7 @@
WK_ADD_API_MAPPING(WKNotificationPermissionRequestRef, NotificationPermissionRequest)
WK_ADD_API_MAPPING(WKNotificationProviderRef, WebNotificationProvider)
WK_ADD_API_MAPPING(WKNotificationRef, WebNotification)
-WK_ADD_API_MAPPING(WKOpenPanelParametersRef, API::OpenPanelParameters)
+WK_ADD_API_MAPPING(WKOpenPanelParametersRef, WebOpenPanelParameters)
WK_ADD_API_MAPPING(WKOpenPanelResultListenerRef, WebOpenPanelResultListenerProxy)
WK_ADD_API_MAPPING(WKPageGroupRef, WebPageGroup)
WK_ADD_API_MAPPING(WKPageConfigurationRef, API::PageConfiguration)
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParametersRef.cpp (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParametersRef.cpp 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParametersRef.cpp 2016-04-14 21:54:13 UTC (rev 199557)
@@ -28,14 +28,14 @@
#include "WKOpenPanelParametersRef.h"
#include "APIArray.h"
-#include "APIOpenPanelParameters.h"
#include "WKAPICast.h"
+#include "WebOpenPanelParameters.h"
using namespace WebKit;
WKTypeID WKOpenPanelParametersGetTypeID()
{
- return toAPI(API::OpenPanelParameters::APIType);
+ return toAPI(WebOpenPanelParameters::APIType);
}
bool WKOpenPanelParametersGetAllowsMultipleFiles(WKOpenPanelParametersRef parametersRef)
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelResultListener.cpp (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelResultListener.cpp 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelResultListener.cpp 2016-04-14 21:54:13 UTC (rev 199557)
@@ -28,7 +28,6 @@
#include "WKAPICast.h"
#include "WebOpenPanelResultListenerProxy.h"
-#include <WebCore/URL.h>
using namespace WebKit;
@@ -37,25 +36,9 @@
return toAPI(WebOpenPanelResultListenerProxy::APIType);
}
-static Vector<String> filePathsFromFileURLs(const API::Array& fileURLs)
-{
- Vector<String> filePaths;
-
- size_t size = fileURLs.size();
- filePaths.reserveInitialCapacity(size);
-
- for (size_t i = 0; i < size; ++i) {
- API::URL* apiURL = fileURLs.at<API::URL>(i);
- if (apiURL)
- filePaths.uncheckedAppend(WebCore::URL(WebCore::URL(), apiURL->string()).fileSystemPath());
- }
-
- return filePaths;
-}
-
void WKOpenPanelResultListenerChooseFiles(WKOpenPanelResultListenerRef listenerRef, WKArrayRef fileURLsRef)
{
- toImpl(listenerRef)->chooseFiles(filePathsFromFileURLs(*toImpl(fileURLsRef)));
+ toImpl(listenerRef)->chooseFiles(toImpl(fileURLsRef));
}
void WKOpenPanelResultListenerCancel(WKOpenPanelResultListenerRef listenerRef)
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2016-04-14 21:54:13 UTC (rev 199557)
@@ -40,7 +40,6 @@
#include "APINavigationAction.h"
#include "APINavigationClient.h"
#include "APINavigationResponse.h"
-#include "APIOpenPanelParameters.h"
#include "APIPageConfiguration.h"
#include "APIPolicyClient.h"
#include "APISessionState.h"
@@ -62,6 +61,7 @@
#include "WebFormClient.h"
#include "WebImage.h"
#include "WebInspectorProxy.h"
+#include "WebOpenPanelParameters.h"
#include "WebOpenPanelResultListenerProxy.h"
#include "WebPageGroup.h"
#include "WebPageMessages.h"
@@ -2053,7 +2053,7 @@
completionHandler(m_client.exceededDatabaseQuota(toAPI(page), toAPI(frame), toAPI(origin), toAPI(databaseName.impl()), toAPI(databaseDisplayName.impl()), currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, m_client.base.clientInfo));
}
- bool runOpenPanel(WebPageProxy* page, WebFrameProxy* frame, const WebCore::SecurityOriginData&, API::OpenPanelParameters* parameters, WebOpenPanelResultListenerProxy* listener) override
+ bool runOpenPanel(WebPageProxy* page, WebFrameProxy* frame, WebOpenPanelParameters* parameters, WebOpenPanelResultListenerProxy* listener) override
{
if (!m_client.runOpenPanel)
return false;
Deleted: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -1,47 +0,0 @@
-/*
- * 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 <WebKit/WKFoundation.h>
-
-#if WK_API_ENABLED
-
-#import <Foundation/Foundation.h>
-
-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
Deleted: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.mm (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.mm 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParameters.mm 2016-04-14 21:54:13 UTC (rev 199557)
@@ -1,47 +0,0 @@
-/*
- * 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 "config.h"
-#import "WKOpenPanelParametersInternal.h"
-
-#if WK_API_ENABLED
-
-@implementation WKOpenPanelParameters
-
-- (BOOL)allowsMultipleSelection
-{
- return _openPanelParameters->allowMultipleFiles();
-}
-
-#pragma mark WKObject protocol implementation
-
-- (API::Object&)_apiObject
-{
- return *_openPanelParameters;
-}
-
-@end
-
-#endif
Deleted: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -1,50 +0,0 @@
-/*
- * 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 "WKOpenPanelParameters.h"
-
-#if WK_API_ENABLED
-
-#import "APIOpenPanelParameters.h"
-#import "WKObject.h"
-
-namespace API {
-
-inline WKOpenPanelParameters *wrapper(OpenPanelParameters& openPanelParameters)
-{
- ASSERT([openPanelParameters.wrapper() isKindOfClass:[WKOpenPanelParameters class]]);
-
- return (WKOpenPanelParameters *)openPanelParameters.wrapper();
-}
-
-}
-
-@interface WKOpenPanelParameters () <WKObject> {
-@package
- API::ObjectStorage<API::OpenPanelParameters> _openPanelParameters;
-}
-@end
-
-#endif
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -34,7 +34,6 @@
@class WKFrameInfo;
@class WKNavigationAction;
-@class WKOpenPanelParameters;
@class WKPreviewElementInfo;
@class WKWebViewConfiguration;
@class WKWindowFeatures;
@@ -144,7 +143,7 @@
Returning nil will result in WebKit's default preview behavior. webView:commitPreviewingViewController: will only be invoked
if a non-nil view controller was returned.
*/
-- (nullable UIViewController *)webView:(WKWebView *)webView previewingViewControllerForElement:(WKPreviewElementInfo *)elementInfo defaultActions:(NSArray<id <WKPreviewActionItem>> *)previewActions WK_AVAILABLE(NA, WK_IOS_TBA);
+- (nullable UIViewController *)webView:(WKWebView *)webView previewingViewControllerForElement:(WKPreviewElementInfo *)elementInfo defaultActions:(NSArray <id <WKPreviewActionItem>> *)previewActions WK_AVAILABLE(NA, WK_IOS_TBA);
/*! @abstract Allows your app to pop to the view controller it created.
@param webView The web view invoking the delegate method.
@@ -154,20 +153,6 @@
#endif // TARGET_OS_IPHONE
-#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 (^)(NSArray<NSURL *> * WK_NULLABLE_SPECIFIER URLs))completionHandler WK_AVAILABLE(WK_MAC_TBA, NA);
-
-#endif
-
@end
NS_ASSUME_NONNULL_END
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -86,9 +86,6 @@
void runJavaScriptPrompt(WebKit::WebPageProxy*, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&, std::function<void (const WTF::String&)> completionHandler) override;
void exceededDatabaseQuota(WebPageProxy*, WebFrameProxy*, API::SecurityOrigin*, const WTF::String& databaseName, const WTF::String& displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentUsage, unsigned long long expectedUsage, std::function<void (unsigned long long)>) override;
void reachedApplicationCacheOriginQuota(WebPageProxy*, const WebCore::SecurityOrigin&, uint64_t currentQuota, uint64_t totalBytesNeeded, std::function<void (unsigned long long)> completionHandler) override;
-#if PLATFORM(MAC)
- bool runOpenPanel(WebPageProxy*, WebFrameProxy*, const WebCore::SecurityOriginData&, API::OpenPanelParameters*, WebOpenPanelResultListenerProxy*) override;
-#endif
void printFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*) override;
#if PLATFORM(IOS)
#if HAVE(APP_LINKS)
@@ -111,9 +108,6 @@
bool webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler : 1;
bool webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;
bool webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler : 1;
-#if PLATFORM(MAC)
- bool webViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler : 1;
-#endif
bool webViewDecideDatabaseQuotaForSecurityOriginCurrentQuotaCurrentOriginUsageCurrentDatabaseUsageExpectedUsageDecisionHandler : 1;
bool webViewDecideWebApplicationCacheQuotaForSecurityOriginCurrentQuotaTotalBytesNeeded : 1;
bool webViewPrintFrame : 1;
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm 2016-04-14 21:54:13 UTC (rev 199557)
@@ -32,13 +32,11 @@
#import "NavigationActionData.h"
#import "WKFrameInfoInternal.h"
#import "WKNavigationActionInternal.h"
-#import "WKOpenPanelParametersInternal.h"
#import "WKSecurityOriginInternal.h"
#import "WKWebViewConfigurationInternal.h"
#import "WKWebViewInternal.h"
#import "WKWindowFeaturesInternal.h"
#import "WKUIDelegatePrivate.h"
-#import "WebOpenPanelResultListenerProxy.h"
#import "_WKContextMenuElementInfo.h"
#import "_WKFrameHandleInternal.h"
#import <WebCore/SecurityOriginData.h>
@@ -80,11 +78,6 @@
m_delegateMethods.webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)];
m_delegateMethods.webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:)];
m_delegateMethods.webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:)];
-
-#if PLATFORM(MAC)
- m_delegateMethods.webViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:)];
-#endif
-
m_delegateMethods.webViewDecideDatabaseQuotaForSecurityOriginCurrentQuotaCurrentOriginUsageCurrentDatabaseUsageExpectedUsageDecisionHandler = [delegate respondsToSelector:@selector(_webView:decideDatabaseQuotaForSecurityOrigin:currentQuota:currentOriginUsage:currentDatabaseUsage:expectedUsage:decisionHandler:)];
m_delegateMethods.webViewDecideWebApplicationCacheQuotaForSecurityOriginCurrentQuotaTotalBytesNeeded = [delegate respondsToSelector:@selector(_webView:decideWebApplicationCacheQuotaForSecurityOrigin:currentQuota:totalBytesNeeded:decisionHandler:)];
m_delegateMethods.webViewPrintFrame = [delegate respondsToSelector:@selector(_webView:printFrame:)];
@@ -257,40 +250,6 @@
}];
}
-#if PLATFORM(MAC)
-bool UIDelegate::UIClient::runOpenPanel(WebPageProxy*, WebFrameProxy* webFrameProxy, const WebCore::SecurityOriginData& 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<WebOpenPanelResultListenerProxy> resultListener = listener;
-
- RefPtr<CompletionHandlerCallChecker> 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<NSURL *> *URLs) {
- checker->didCallCompletionHandler();
-
- if (!URLs) {
- resultListener->cancel();
- return;
- }
-
- Vector<String> filenames;
- for (NSURL *url in URLs)
- filenames.append(url.fileSystemRepresentation);
-
- resultListener->chooseFiles(filenames);
- }];
-
- return true;
-}
-#endif
-
void UIDelegate::UIClient::reachedApplicationCacheOriginQuota(WebPageProxy*, const WebCore::SecurityOrigin& securityOrigin, uint64_t currentQuota, uint64_t totalBytesNeeded, std::function<void (unsigned long long)> completionHandler)
{
if (!m_uiDelegate.m_delegateMethods.webViewDecideWebApplicationCacheQuotaForSecurityOriginCurrentQuotaTotalBytesNeeded) {
Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/PageClient.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -151,7 +151,7 @@
virtual void handleDownloadRequest(DownloadProxy*) = 0;
- virtual bool handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, API::OpenPanelParameters*, WebOpenPanelResultListenerProxy*) { return false; }
+ virtual bool handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, WebOpenPanelParameters*, WebOpenPanelResultListenerProxy*) { return false; }
virtual void didChangeContentSize(const WebCore::IntSize&) = 0;
Modified: trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp 2016-04-14 21:54:13 UTC (rev 199557)
@@ -45,22 +45,38 @@
{
}
+static Vector<String> filePathsFromFileURLs(const API::Array& fileURLs)
+{
+ Vector<String> filePaths;
+
+ size_t size = fileURLs.size();
+ filePaths.reserveInitialCapacity(size);
+
+ for (size_t i = 0; i < size; ++i) {
+ API::URL* apiURL = fileURLs.at<API::URL>(i);
+ if (apiURL)
+ filePaths.uncheckedAppend(URL(URL(), apiURL->string()).fileSystemPath());
+ }
+
+ return filePaths;
+}
+
#if PLATFORM(IOS)
-void WebOpenPanelResultListenerProxy::chooseFiles(const Vector<WTF::String>& filenames, const String& displayString, const API::Data* iconImageData)
+void WebOpenPanelResultListenerProxy::chooseFiles(API::Array* fileURLsArray, API::String* displayString, const API::Data* iconImageData)
{
if (!m_page)
return;
- m_page->didChooseFilesForOpenPanelWithDisplayStringAndIcon(filenames, displayString, iconImageData);
+ m_page->didChooseFilesForOpenPanelWithDisplayStringAndIcon(filePathsFromFileURLs(*fileURLsArray), displayString ? displayString->string() : String(), iconImageData);
}
#endif
-void WebOpenPanelResultListenerProxy::chooseFiles(const Vector<String>& filenames)
+void WebOpenPanelResultListenerProxy::chooseFiles(API::Array* fileURLsArray)
{
if (!m_page)
return;
- m_page->didChooseFilesForOpenPanel(filenames);
+ m_page->didChooseFilesForOpenPanel(filePathsFromFileURLs(*fileURLsArray));
}
void WebOpenPanelResultListenerProxy::cancel()
Modified: trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -27,10 +27,8 @@
#define WebOpenPanelResultListenerProxy_h
#include "APIObject.h"
-#include <wtf/Forward.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
namespace API {
class Array;
@@ -52,9 +50,9 @@
virtual ~WebOpenPanelResultListenerProxy();
#if PLATFORM(IOS)
- void chooseFiles(const Vector<String>& filenames, const String& displayString, const API::Data* iconImageData);
+ void chooseFiles(API::Array*, API::String* displayString, const API::Data* iconImageData);
#endif
- void chooseFiles(const Vector<String>& filenames);
+ void chooseFiles(API::Array*);
void cancel();
void invalidate();
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2016-04-14 21:54:13 UTC (rev 199557)
@@ -42,7 +42,6 @@
#include "APINavigationAction.h"
#include "APINavigationClient.h"
#include "APINavigationResponse.h"
-#include "APIOpenPanelParameters.h"
#include "APIPageConfiguration.h"
#include "APIPolicyClient.h"
#include "APISecurityOrigin.h"
@@ -91,6 +90,7 @@
#include "WebInspectorProxyMessages.h"
#include "WebNavigationState.h"
#include "WebNotificationManagerProxy.h"
+#include "WebOpenPanelParameters.h"
#include "WebOpenPanelResultListenerProxy.h"
#include "WebPageCreationParameters.h"
#include "WebPageGroup.h"
@@ -3853,7 +3853,7 @@
m_uiClient->pageDidScroll(this);
}
-void WebPageProxy::runOpenPanel(uint64_t frameID, const SecurityOriginData& frameSecurityOrigin, const FileChooserSettings& settings)
+void WebPageProxy::runOpenPanel(uint64_t frameID, const FileChooserSettings& settings)
{
if (m_openPanelResultListener) {
m_openPanelResultListener->invalidate();
@@ -3863,15 +3863,14 @@
WebFrameProxy* frame = m_process->webFrame(frameID);
MESSAGE_CHECK(frame);
- Ref<API::OpenPanelParameters> parameters = API::OpenPanelParameters::create(settings);
+ RefPtr<WebOpenPanelParameters> parameters = WebOpenPanelParameters::create(settings);
m_openPanelResultListener = WebOpenPanelResultListenerProxy::create(this);
// Since runOpenPanel() can spin a nested run loop we need to turn off the responsiveness timer.
m_process->responsivenessTimer().stop();
-
- if (!m_uiClient->runOpenPanel(this, frame, frameSecurityOrigin, parameters.ptr(), m_openPanelResultListener.get())) {
- if (!m_pageClient.handleRunOpenPanel(this, frame, parameters.ptr(), m_openPanelResultListener.get()))
+ if (!m_uiClient->runOpenPanel(this, frame, parameters.get(), m_openPanelResultListener.get())) {
+ if (!m_pageClient.handleRunOpenPanel(this, frame, parameters.get(), m_openPanelResultListener.get()))
didCancelForOpenPanel();
}
}
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -1210,7 +1210,7 @@
void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, RefPtr<Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply>);
void didChangeViewportProperties(const WebCore::ViewportAttributes&);
void pageDidScroll();
- void runOpenPanel(uint64_t frameID, const WebCore::SecurityOriginData&, const WebCore::FileChooserSettings&);
+ void runOpenPanel(uint64_t frameID, const WebCore::FileChooserSettings&);
void printFrame(uint64_t frameID);
void exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply>);
void reachedApplicationCacheOriginQuota(const String& originIdentifier, uint64_t currentQuota, uint64_t totalBytesNeeded, PassRefPtr<Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::DelayedReply>);
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2016-04-14 21:54:13 UTC (rev 199557)
@@ -71,7 +71,7 @@
RunBeforeUnloadConfirmPanel(String message, uint64_t frameID) -> (bool shouldClose) Delayed
PageDidScroll()
- RunOpenPanel(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, struct WebCore::FileChooserSettings parameters)
+ RunOpenPanel(uint64_t frameID, struct WebCore::FileChooserSettings parameters)
PrintFrame(uint64_t frameID) -> ()
RunModal()
NotifyScrollerThumbIsVisibleInRect(WebCore::IntRect scrollerThumb)
Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -132,7 +132,7 @@
void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold) override;
void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect& elementRect) override;
- bool handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, API::OpenPanelParameters*, WebOpenPanelResultListenerProxy*) override;
+ bool handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, WebOpenPanelParameters*, WebOpenPanelResultListenerProxy*) override;
void disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID) override;
double minimumZoomScale() const override;
WebCore::FloatRect documentRect() const override;
Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm 2016-04-14 21:54:13 UTC (rev 199557)
@@ -560,7 +560,7 @@
[m_contentView _showPlaybackTargetPicker:hasVideo fromRect:elementRect];
}
-bool PageClientImpl::handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, API::OpenPanelParameters* parameters, WebOpenPanelResultListenerProxy* listener)
+bool PageClientImpl::handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, WebOpenPanelParameters* parameters, WebOpenPanelResultListenerProxy* listener)
{
[m_contentView _showRunOpenPanel:parameters resultListener:listener];
return true;
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -44,10 +44,6 @@
#import <wtf/Vector.h>
#import <wtf/text/WTFString.h>
-namespace API {
-class OpenPanelParameters;
-}
-
namespace WebCore {
class Color;
class FloatQuad;
@@ -57,6 +53,7 @@
namespace WebKit {
class NativeWebTouchEvent;
class SmartMagnificationController;
+class WebOpenPanelParameters;
class WebOpenPanelResultListenerProxy;
class WebPageProxy;
}
@@ -212,7 +209,7 @@
- (void)_overflowScrollingDidEnd;
- (void)_didUpdateBlockSelectionWithTouch:(WebKit::SelectionTouch)touch withFlags:(WebKit::SelectionFlags)flags growThreshold:(CGFloat)growThreshold shrinkThreshold:(CGFloat)shrinkThreshold;
- (void)_showPlaybackTargetPicker:(BOOL)hasVideo fromRect:(const WebCore::IntRect&)elementRect;
-- (void)_showRunOpenPanel:(API::OpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;
+- (void)_showRunOpenPanel:(WebKit::WebOpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;
- (void)accessoryDone;
- (void)_didHandleKeyEvent:(WebIOSEvent *)event eventWasHandled:(BOOL)eventWasHandled;
- (Vector<WebKit::OptionItem>&) assistedNodeSelectOptions;
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-04-14 21:54:13 UTC (rev 199557)
@@ -3661,7 +3661,7 @@
[_airPlayRoutePicker show:hasVideo fromRect:elementRect];
}
-- (void)_showRunOpenPanel:(API::OpenPanelParameters*)parameters resultListener:(WebOpenPanelResultListenerProxy*)listener
+- (void)_showRunOpenPanel:(WebOpenPanelParameters*)parameters resultListener:(WebOpenPanelResultListenerProxy*)listener
{
ASSERT(!_fileUploadPanel);
if (_fileUploadPanel)
Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.h (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.h 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.h 2016-04-14 21:54:13 UTC (rev 199557)
@@ -30,18 +30,15 @@
@class WKContentView;
@protocol WKFileUploadPanelDelegate;
-namespace API {
-class OpenPanelParameters;
-}
-
namespace WebKit {
+class WebOpenPanelParameters;
class WebOpenPanelResultListenerProxy;
}
@interface WKFileUploadPanel : UIViewController
@property (nonatomic, assign) id <WKFileUploadPanelDelegate> delegate;
- (instancetype)initWithView:(WKContentView *)view;
-- (void)presentWithParameters:(API::OpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;
+- (void)presentWithParameters:(WebKit::WebOpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;
- (void)dismiss;
@end
Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm (199556 => 199557)
--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm 2016-04-14 21:54:13 UTC (rev 199557)
@@ -30,13 +30,13 @@
#import "APIArray.h"
#import "APIData.h"
-#import "APIOpenPanelParameters.h"
#import "APIString.h"
#import "UIKitSPI.h"
#import "WKContentViewInteraction.h"
#import "WKData.h"
#import "WKStringCF.h"
#import "WKURLCF.h"
+#import "WebOpenPanelParameters.h"
#import "WebOpenPanelResultListenerProxy.h"
#import "WebPageProxy.h"
#import <AVFoundation/AVFoundation.h>
@@ -333,21 +333,24 @@
return;
}
- Vector<String> filenames;
- filenames.reserveInitialCapacity(count);
+ Vector<RefPtr<API::Object>> urls;
+ urls.reserveInitialCapacity(count);
for (NSURL *fileURL in fileURLs)
- filenames.uncheckedAppend(fileURL.fileSystemRepresentation);
+ urls.uncheckedAppend(adoptRef(toImpl(WKURLCreateWithCFURL((CFURLRef)fileURL))));
+ Ref<API::Array> fileURLsRef = API::Array::create(WTFMove(urls));
NSData *jpeg = UIImageJPEGRepresentation(iconImage, 1.0);
RefPtr<API::Data> iconImageDataRef = adoptRef(toImpl(WKDataCreate(reinterpret_cast<const unsigned char*>([jpeg bytes]), [jpeg length])));
- _listener->chooseFiles(filenames, displayString, iconImageDataRef.get());
+ RefPtr<API::String> displayStringRef = adoptRef(toImpl(WKStringCreateWithCFString((CFStringRef)displayString)));
+
+ _listener->chooseFiles(fileURLsRef.ptr(), displayStringRef.get(), iconImageDataRef.get());
[self _dispatchDidDismiss];
}
#pragma mark - Present / Dismiss API
-- (void)presentWithParameters:(API::OpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener
+- (void)presentWithParameters:(WebKit::WebOpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener
{
ASSERT(!_listener);
Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (199556 => 199557)
--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2016-04-14 21:54:13 UTC (rev 199557)
@@ -285,7 +285,6 @@
1A6563E41B7A8C50009CF787 /* APIWindowFeatures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6563E21B7A8C50009CF787 /* APIWindowFeatures.cpp */; };
1A6563E51B7A8C50009CF787 /* APIWindowFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6563E31B7A8C50009CF787 /* APIWindowFeatures.h */; };
1A66BF8F18A052ED002071B4 /* WKWebViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */; };
- 1A67CD2E1CBC513F00BFE3EA /* WKOpenPanelParametersInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A67CD2D1CBC513F00BFE3EA /* WKOpenPanelParametersInternal.h */; };
1A6F9F9011E13EFC00DB1371 /* CommandLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */; };
1A6F9FB711E1408500DB1371 /* CommandLinePOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6F9FB611E1408500DB1371 /* CommandLinePOSIX.cpp */; };
1A6FA21E1BD0435B00AAA650 /* WKFrameInfoPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6FA21D1BD0435B00AAA650 /* WKFrameInfoPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -437,8 +436,6 @@
1AC75380183BE50F0072CB15 /* DataReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC7537E183BE50F0072CB15 /* DataReference.h */; };
1AC75A1B1B3368270056745B /* HangDetectionDisabler.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC75A1A1B3368270056745B /* HangDetectionDisabler.h */; };
1AC75A1E1B33695E0056745B /* HangDetectionDisablerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AC75A1C1B33695E0056745B /* HangDetectionDisablerMac.mm */; };
- 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, ); }; };
1ACC87BA1981C341003D1AF4 /* WKNavigationPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACC87B91981C341003D1AF4 /* WKNavigationPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
1ACECD2417162DB1001FC9EF /* StorageAreaMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACECD2217162DB1001FC9EF /* StorageAreaMap.cpp */; };
1ACECD2517162DB1001FC9EF /* StorageAreaMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACECD2317162DB1001FC9EF /* StorageAreaMap.h */; };
@@ -1507,8 +1504,8 @@
BC857F7E12B82CEE00EDEB2E /* WebOpenPanelResultListenerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC1DFEA312B31F87005DF730 /* WebOpenPanelResultListenerProxy.cpp */; };
BC857F8512B82D0B00EDEB2E /* WebOpenPanelResultListener.h in Headers */ = {isa = PBXBuildFile; fileRef = BC857F8312B82D0B00EDEB2E /* WebOpenPanelResultListener.h */; };
BC857F8612B82D0B00EDEB2E /* WebOpenPanelResultListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC857F8412B82D0B00EDEB2E /* WebOpenPanelResultListener.cpp */; };
- BC857FB512B830E600EDEB2E /* APIOpenPanelParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = BC857FB312B830E600EDEB2E /* APIOpenPanelParameters.h */; };
- BC857FB612B830E600EDEB2E /* APIOpenPanelParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC857FB412B830E600EDEB2E /* APIOpenPanelParameters.cpp */; };
+ BC857FB512B830E600EDEB2E /* WebOpenPanelParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = BC857FB312B830E600EDEB2E /* WebOpenPanelParameters.h */; };
+ BC857FB612B830E600EDEB2E /* WebOpenPanelParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC857FB412B830E600EDEB2E /* WebOpenPanelParameters.cpp */; };
BC857FE612B843D800EDEB2E /* WKOpenPanelParametersRef.h in Headers */ = {isa = PBXBuildFile; fileRef = BC857FE412B843D800EDEB2E /* WKOpenPanelParametersRef.h */; settings = {ATTRIBUTES = (Private, ); }; };
BC85806212B8505700EDEB2E /* WKOpenPanelResultListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC1DFE8E12B31CA8005DF730 /* WKOpenPanelResultListener.cpp */; };
BC85806312B8505700EDEB2E /* WKOpenPanelParametersRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC857FE512B843D800EDEB2E /* WKOpenPanelParametersRef.cpp */; };
@@ -2233,7 +2230,6 @@
1A6563E21B7A8C50009CF787 /* APIWindowFeatures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIWindowFeatures.cpp; sourceTree = "<group>"; };
1A6563E31B7A8C50009CF787 /* APIWindowFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIWindowFeatures.h; sourceTree = "<group>"; };
1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewInternal.h; sourceTree = "<group>"; };
- 1A67CD2D1CBC513F00BFE3EA /* WKOpenPanelParametersInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKOpenPanelParametersInternal.h; sourceTree = "<group>"; };
1A6D141F1B0167D500785FF0 /* Info-OSX-10.9-10.10.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-OSX-10.9-10.10.plist"; sourceTree = "<group>"; };
1A6D14211B01681600785FF0 /* PluginService.32-64-10.9-10.10.Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "PluginService.32-64-10.9-10.10.Info.plist"; path = "PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist"; sourceTree = SOURCE_ROOT; };
1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandLine.h; sourceTree = "<group>"; };
@@ -2408,8 +2404,6 @@
1AC7537E183BE50F0072CB15 /* DataReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataReference.h; sourceTree = "<group>"; };
1AC75A1A1B3368270056745B /* HangDetectionDisabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HangDetectionDisabler.h; sourceTree = "<group>"; };
1AC75A1C1B33695E0056745B /* HangDetectionDisablerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HangDetectionDisablerMac.mm; sourceTree = "<group>"; };
- 1ACC50EF1CBC381D003C7D03 /* WKOpenPanelParameters.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKOpenPanelParameters.mm; sourceTree = "<group>"; };
- 1ACC50F01CBC381D003C7D03 /* WKOpenPanelParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKOpenPanelParameters.h; sourceTree = "<group>"; };
1ACC87B91981C341003D1AF4 /* WKNavigationPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationPrivate.h; sourceTree = "<group>"; };
1ACECD2217162DB1001FC9EF /* StorageAreaMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageAreaMap.cpp; sourceTree = "<group>"; };
1ACECD2317162DB1001FC9EF /* StorageAreaMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageAreaMap.h; sourceTree = "<group>"; };
@@ -3569,8 +3563,8 @@
BC857E8512B71EBB00EDEB2E /* WebPageProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPageProxyMac.mm; sourceTree = "<group>"; };
BC857F8312B82D0B00EDEB2E /* WebOpenPanelResultListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebOpenPanelResultListener.h; sourceTree = "<group>"; };
BC857F8412B82D0B00EDEB2E /* WebOpenPanelResultListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebOpenPanelResultListener.cpp; sourceTree = "<group>"; };
- BC857FB312B830E600EDEB2E /* APIOpenPanelParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIOpenPanelParameters.h; sourceTree = "<group>"; };
- BC857FB412B830E600EDEB2E /* APIOpenPanelParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIOpenPanelParameters.cpp; sourceTree = "<group>"; };
+ BC857FB312B830E600EDEB2E /* WebOpenPanelParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebOpenPanelParameters.h; sourceTree = "<group>"; };
+ BC857FB412B830E600EDEB2E /* WebOpenPanelParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebOpenPanelParameters.cpp; sourceTree = "<group>"; };
BC857FE412B843D800EDEB2E /* WKOpenPanelParametersRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKOpenPanelParametersRef.h; sourceTree = "<group>"; };
BC857FE512B843D800EDEB2E /* WKOpenPanelParametersRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKOpenPanelParametersRef.cpp; sourceTree = "<group>"; };
BC8699B2116AADAA002A925B /* WKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKView.h; sourceTree = "<group>"; };
@@ -4518,6 +4512,8 @@
905620E912BC248B000799B6 /* WebMemorySampler.h */,
C0337DAF127A28D0008FF4F4 /* WebMouseEvent.cpp */,
BCF69F981176CED600471A52 /* WebNavigationDataStore.h */,
+ BC857FB412B830E600EDEB2E /* WebOpenPanelParameters.cpp */,
+ BC857FB312B830E600EDEB2E /* WebOpenPanelParameters.h */,
C06C6093124C14430001682F /* WebPageCreationParameters.cpp */,
C06C6094124C14430001682F /* WebPageCreationParameters.h */,
BC7B625112A43C9600D174A4 /* WebPageGroupData.cpp */,
@@ -5140,9 +5136,6 @@
1AD60F5C18E20F4C0020C034 /* WKWindowFeatures.h */,
1AD60F5B18E20F4C0020C034 /* WKWindowFeatures.mm */,
1AD60F5F18E20F740020C034 /* WKWindowFeaturesInternal.h */,
- 1ACC50EF1CBC381D003C7D03 /* WKOpenPanelParameters.mm */,
- 1ACC50F01CBC381D003C7D03 /* WKOpenPanelParameters.h */,
- 1A67CD2D1CBC513F00BFE3EA /* WKOpenPanelParametersInternal.h */,
);
path = Cocoa;
sourceTree = "<group>";
@@ -5989,8 +5982,6 @@
BC111B47112F616900337BAB /* mac */,
99C81D5B1C20E817005C4C82 /* APIAutomationClient.h */,
990D28B31C6526D400986977 /* APIAutomationSessionClient.h */,
- BC857FB412B830E600EDEB2E /* APIOpenPanelParameters.cpp */,
- BC857FB312B830E600EDEB2E /* APIOpenPanelParameters.h */,
076E884D1A13CADF005E90FC /* APIContextMenuClient.h */,
83891B621A68B3420030F386 /* APIDiagnosticLoggingClient.h */,
1F7D36C018DA513F00D9D659 /* APIDownloadClient.h */,
@@ -7356,7 +7347,6 @@
83891B6C1A68C30B0030F386 /* DiagnosticLoggingClient.h in Headers */,
A1DF631318E0B7C8003A3E2A /* DownloadClient.h in Headers */,
1AB7D4CA1288AAA700CFD08C /* DownloadProxy.h in Headers */,
- 1ACC50F21CBC381D003C7D03 /* WKOpenPanelParameters.h in Headers */,
1AD25E96167AB08100EA9BCD /* DownloadProxyMap.h in Headers */,
1AB7D61A1288B9D900CFD08C /* DownloadProxyMessages.h in Headers */,
C517388112DF8F4F00EE3F47 /* DragControllerAction.h in Headers */,
@@ -7717,7 +7707,7 @@
31BA924E148831260062EDB5 /* WebNotificationManagerMessages.h in Headers */,
31A2EC4B148997C200810D71 /* WebNotificationManagerProxy.h in Headers */,
31A2EC4E148997C200810D71 /* WebNotificationProvider.h in Headers */,
- BC857FB512B830E600EDEB2E /* APIOpenPanelParameters.h in Headers */,
+ BC857FB512B830E600EDEB2E /* WebOpenPanelParameters.h in Headers */,
BC857F8512B82D0B00EDEB2E /* WebOpenPanelResultListener.h in Headers */,
BC1DFEA412B31F87005DF730 /* WebOpenPanelResultListenerProxy.h in Headers */,
BC032D8F10F437A00058C15A /* WebPage.h in Headers */,
@@ -7834,7 +7824,6 @@
BC7043CC12F75EE0006472B9 /* WKBundleNavigationAction.h in Headers */,
51A728DE1B1BAD3800102EEE /* WKBundleNavigationActionPrivate.h in Headers */,
BC4BEFE1120A1A4C00FBA0C7 /* WKBundleNodeHandle.h in Headers */,
- 1A67CD2E1CBC513F00BFE3EA /* WKOpenPanelParametersInternal.h in Headers */,
BC57450C1263B155006F0F12 /* WKBundleNodeHandlePrivate.h in Headers */,
BC20528111C94284008F3375 /* WKBundlePage.h in Headers */,
7CF47FF717275B71008ACB91 /* WKBundlePageBanner.h in Headers */,
@@ -9046,7 +9035,6 @@
753E3E0D1887398500188496 /* SessionTracker.cpp in Sources */,
1A6420E412DCE2FF00CAAE2C /* ShareableBitmap.cpp in Sources */,
C01A260112662F2100C9ED55 /* ShareableBitmapCG.cpp in Sources */,
- 1ACC50F11CBC381D003C7D03 /* WKOpenPanelParameters.mm in Sources */,
51217460164C20E30037A5C1 /* ShareableResource.cpp in Sources */,
1A24BF3A120896A600FBB059 /* SharedMemoryMac.cpp in Sources */,
2DAF06D718BD1A470081CEB1 /* SmartMagnificationController.mm in Sources */,
@@ -9202,7 +9190,7 @@
31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */,
31A2EC4A148997C200810D71 /* WebNotificationManagerProxy.cpp in Sources */,
31A2EC4D148997C200810D71 /* WebNotificationProvider.cpp in Sources */,
- BC857FB612B830E600EDEB2E /* APIOpenPanelParameters.cpp in Sources */,
+ BC857FB612B830E600EDEB2E /* WebOpenPanelParameters.cpp in Sources */,
BC857F8612B82D0B00EDEB2E /* WebOpenPanelResultListener.cpp in Sources */,
BC857F7E12B82CEE00EDEB2E /* WebOpenPanelResultListenerProxy.cpp in Sources */,
9955A6F61C7986E300EB6A93 /* AutomationProtocolObjects.cpp in Sources */,
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (199556 => 199557)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2016-04-14 21:54:13 UTC (rev 199557)
@@ -43,6 +43,7 @@
#include "WebFullScreenManager.h"
#include "WebHitTestResultData.h"
#include "WebImage.h"
+#include "WebOpenPanelParameters.h"
#include "WebOpenPanelResultListener.h"
#include "WebPage.h"
#include "WebPageCreationParameters.h"
@@ -717,7 +718,7 @@
WebFrame* webFrame = WebFrame::fromCoreFrame(*frame);
ASSERT(webFrame);
- m_page->send(Messages::WebPageProxy::RunOpenPanel(webFrame->frameID(), SecurityOriginData::fromFrame(frame), fileChooser->settings()));
+ m_page->send(Messages::WebPageProxy::RunOpenPanel(webFrame->frameID(), fileChooser->settings()));
}
void WebChromeClient::loadIconForFiles(const Vector<String>& filenames, FileIconLoader* loader)
Modified: trunk/Tools/ChangeLog (199556 => 199557)
--- trunk/Tools/ChangeLog 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Tools/ChangeLog 2016-04-14 21:54:13 UTC (rev 199557)
@@ -1,3 +1,15 @@
+2016-04-14 Jiewen Tan <[email protected]>
+
+ Unreviewed, rolling out r199554.
+
+ The change breaks Yosemite Release/Debug build
+
+ Reverted changeset:
+
+ "[Mac] Add API for open panel handling to WKWebView"
+ https://bugs.webkit.org/show_bug.cgi?id=137759
+ http://trac.webkit.org/changeset/199554
+
2016-04-14 Anders Carlsson <[email protected]>
[Mac] Add API for open panel handling to WKWebView
Modified: trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m (199556 => 199557)
--- trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m 2016-04-14 21:46:20 UTC (rev 199556)
+++ trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m 2016-04-14 21:54:13 UTC (rev 199557)
@@ -448,20 +448,6 @@
}];
}
-- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSArray<NSURL *> * _Nullable result))completionHandler
-{
- NSOpenPanel *openPanel = [NSOpenPanel openPanel];
-
- openPanel.allowsMultipleSelection = parameters.allowsMultipleSelection;
-
- [openPanel beginSheetModalForWindow:webView.window completionHandler:^(NSInteger result) {
- if (result == NSFileHandlingPanelOKButton)
- completionHandler(openPanel.URLs);
- else
- completionHandler(@[]);
- }];
-}
-
- (void)updateTextFieldFromURL:(NSURL *)URL
{
if (!URL)