Title: [214934] trunk/Source
Revision
214934
Author
[email protected]
Date
2017-04-05 00:41:53 -0700 (Wed, 05 Apr 2017)

Log Message

Move WebErrors from WebProcess to Shared and get rid of ErrorsGtk in WebCore
https://bugs.webkit.org/show_bug.cgi?id=156974

Reviewed by Sam Weinig.

Source/WebCore:

Remove ErrorsGtk.

* PlatformGTK.cmake:
* platform/gtk/ErrorsGtk.cpp: Removed.
* platform/gtk/ErrorsGtk.h: Removed.

Source/WebCore/platform/gtk/po:

* POTFILES.in: Add new paths with translatable strings.

Source/WebKit2:

WebErrors are not only used by the frame loader client in the web process, but also by the network process. So,
move them to Shared make most of the implementation cross-platform.

* CMakeLists.txt: Add new files to compilation.
* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::download): Use WebErrors directly instead of platform methods that are no longer needed.
(WebKit::NetworkDataTaskSoup::writeDownloadCallback): Ditto.
(WebKit::NetworkDataTaskSoup::didFinishDownload): Ditto.
(WebKit::NetworkDataTaskSoup::didFail): Ditto.
* PlatformGTK.cmake: Add new files to compilation and remove DownloadSoupErrorsGtk.cpp
* PlatformMac.cmake:
* Shared/API/APIError.cpp: Add error domains used by glib based ports.
(API::Error::webKitNetworkErrorDomain):
(API::Error::webKitPolicyErrorDomain):
(API::Error::webKitPluginErrorDomain):
(API::Error::webKitDownloadErrorDomain):
(API::Error::webKitPrintErrorDomain):
* Shared/API/APIError.h:
* Shared/Cocoa/WebErrorsCocoa.mm: Copied from Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h.
(WebKit::createNSError):
(WebKit::cancelledError):
(WebKit::fileDoesNotExistError):
* Shared/WebErrors.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp.
(WebKit::blockedError):
(WebKit::blockedByContentBlockerError):
(WebKit::cannotShowURLError):
(WebKit::interruptedForPolicyChangeError):
(WebKit::blockedByContentFilterError):
(WebKit::cannotShowMIMETypeError):
(WebKit::pluginWillHandleLoadError):
(WebKit::internalError):
* Shared/WebErrors.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h.
* Shared/glib/WebErrorsGlib.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp.
(WebKit::cancelledError):
(WebKit::fileDoesNotExistError):
* Shared/gtk/WebErrorsGtk.cpp: Copied from Source/WebKit2/NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp.
(WebKit::printError):
(WebKit::printerNotFoundError):
(WebKit::invalidPageRangeToPrint):
* Shared/soup/WebErrorsSoup.cpp: Renamed from Source/WebKit2/NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp.
(WebKit::downloadNetworkError):
(WebKit::downloadCancelledByUserError):
(WebKit::downloadDestinationError):
* UIProcess/API/gtk/WebKitDownload.cpp:
* UIProcess/API/gtk/WebKitError.cpp:
(webkit_network_error_quark):
(webkit_policy_error_quark):
(webkit_plugin_error_quark):
(webkit_download_error_quark):
(webkit_print_error_quark):
* UIProcess/API/gtk/WebKitPrivate.cpp:
(toWebKitError):
(toWebCoreError):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: Removed.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (214933 => 214934)


--- trunk/Source/WebCore/ChangeLog	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebCore/ChangeLog	2017-04-05 07:41:53 UTC (rev 214934)
@@ -1,3 +1,16 @@
+2017-04-04  Carlos Garcia Campos  <[email protected]>
+
+        Move WebErrors from WebProcess to Shared and get rid of ErrorsGtk in WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=156974
+
+        Reviewed by Sam Weinig.
+
+        Remove ErrorsGtk.
+
+        * PlatformGTK.cmake:
+        * platform/gtk/ErrorsGtk.cpp: Removed.
+        * platform/gtk/ErrorsGtk.h: Removed.
+
 2017-04-05  Andy Estes  <[email protected]>
 
         [ios-simulator] API test WebKit2.DataDetectionReferenceDate timing out

Modified: trunk/Source/WebCore/PlatformGTK.cmake (214933 => 214934)


--- trunk/Source/WebCore/PlatformGTK.cmake	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebCore/PlatformGTK.cmake	2017-04-05 07:41:53 UTC (rev 214934)
@@ -139,7 +139,6 @@
     platform/graphics/x11/XUniqueResource.cpp
 
     platform/gtk/DragDataGtk.cpp
-    platform/gtk/ErrorsGtk.cpp
     platform/gtk/LocalizedStringsGtk.cpp
     platform/gtk/PasteboardGtk.cpp
     platform/gtk/ScrollAnimatorGtk.cpp

Deleted: trunk/Source/WebCore/platform/gtk/ErrorsGtk.cpp (214933 => 214934)


--- trunk/Source/WebCore/platform/gtk/ErrorsGtk.cpp	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebCore/platform/gtk/ErrorsGtk.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "ErrorsGtk.h"
-
-#include "ResourceError.h"
-#include "ResourceRequest.h"
-#include "ResourceResponse.h"
-#include <glib/gi18n-lib.h>
-
-namespace WebCore {
-
-ResourceError cancelledError(const ResourceRequest& request)
-{
-    return ResourceError(errorDomainNetwork, NetworkErrorCancelled, request.url(), _("Load request cancelled"));
-}
-
-ResourceError blockedError(const ResourceRequest& request)
-{
-    return ResourceError(errorDomainPolicy, PolicyErrorCannotUseRestrictedPort, request.url(), _("Not allowed to use restricted network port"));
-}
-
-ResourceError blockedByContentBlockerError(const ResourceRequest& request)
-{
-    return ResourceError(errorDomainPolicy, PolicyErrorBlockedByContentBlocker, request.url(), _("Blocked by content blocker"));
-}
-
-ResourceError cannotShowURLError(const ResourceRequest& request)
-{
-    return ResourceError(errorDomainPolicy, PolicyErrorCannotShowURL, request.url(), _("URL cannot be shown"));
-}
-
-ResourceError interruptedForPolicyChangeError(const ResourceRequest& request)
-{
-    return ResourceError(errorDomainPolicy, PolicyErrorFrameLoadInterruptedByPolicyChange, request.url(), _("Frame load was interrupted"));
-}
-
-ResourceError cannotShowMIMETypeError(const ResourceResponse& response)
-{
-    return ResourceError(errorDomainPolicy, PolicyErrorCannotShowMimeType, response.url(), _("Content with the specified MIME type cannot be shown"));
-}
-
-ResourceError fileDoesNotExistError(const ResourceResponse& response)
-{
-    return ResourceError(errorDomainNetwork, NetworkErrorFileDoesNotExist, response.url(), _("File does not exist"));
-}
-
-ResourceError pluginWillHandleLoadError(const ResourceResponse& response)
-{
-    return ResourceError(errorDomainPlugin, PluginErrorWillHandleLoad, response.url(), _("Plugin will handle load"));
-}
-
-ResourceError downloadNetworkError(const ResourceError& networkError)
-{
-    return ResourceError(errorDomainDownload, DownloadErrorNetwork, networkError.failingURL(), networkError.localizedDescription());
-}
-
-ResourceError downloadCancelledByUserError(const ResourceResponse& response)
-{
-    return ResourceError(errorDomainDownload, DownloadErrorCancelledByUser, response.url(), _("User cancelled the download"));
-}
-
-ResourceError downloadDestinationError(const ResourceResponse& response, const String& errorMessage)
-{
-    return ResourceError(errorDomainDownload, DownloadErrorDestination, response.url(), errorMessage);
-}
-
-ResourceError printError(const URL& failingURL, const String& errorMessage)
-{
-    return ResourceError(errorDomainPrint, PrintErrorGeneral, failingURL, errorMessage);
-}
-
-ResourceError printerNotFoundError(const URL& failingURL)
-{
-    return ResourceError(errorDomainPrint, PrintErrorPrinterNotFound, failingURL, _("Printer not found"));
-}
-
-ResourceError invalidPageRangeToPrint(const URL& failingURL)
-{
-    return ResourceError(errorDomainPrint, PrintErrorInvalidPageRange, failingURL, _("Invalid page range"));
-}
-
-} // namespace WebCore

Deleted: trunk/Source/WebCore/platform/gtk/ErrorsGtk.h (214933 => 214934)


--- trunk/Source/WebCore/platform/gtk/ErrorsGtk.h	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebCore/platform/gtk/ErrorsGtk.h	2017-04-05 07:41:53 UTC (rev 214934)
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef ErrorsGtk_h
-#define ErrorsGtk_h
-
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-class ResourceError;
-class ResourceRequest;
-class ResourceResponse;
-class URL;
-
-const char* const errorDomainNetwork = "WebKitNetworkError";
-const char* const errorDomainPolicy = "WebKitPolicyError";
-const char* const errorDomainPlugin = "WebKitPluginError";
-const char* const errorDomainDownload = "WebKitDownloadError";
-const char* const errorDomainPrint = "WebKitPrintError";
-
-enum NetworkError {
-    NetworkErrorFailed = 399,
-    NetworkErrorTransport = 300,
-    NetworkErrorUnknownProtocol = 301,
-    NetworkErrorCancelled = 302,
-    NetworkErrorFileDoesNotExist = 303
-};
-
-// Sync'd with Mac's WebKit Errors.
-enum PolicyError {
-    PolicyErrorFailed = 199,
-    PolicyErrorCannotShowMimeType = 100,
-    PolicyErrorCannotShowURL = 101,
-    PolicyErrorFrameLoadInterruptedByPolicyChange = 102,
-    PolicyErrorCannotUseRestrictedPort = 103,
-    PolicyErrorBlockedByContentBlocker = 104,
-};
-
-enum PluginError {
-    PluginErrorFailed = 299,
-    PluginErrorCannotFindPlugin = 200,
-    PluginErrorCannotLoadPlugin = 201,
-    PluginErrorJavaUnavailable = 202,
-    PluginErrorConnectionCancelled = 203,
-    PluginErrorWillHandleLoad = 204
-};
-
-enum DownloadError {
-    DownloadErrorNetwork = 499,
-    DownloadErrorCancelledByUser = 400,
-    DownloadErrorDestination = 401
-};
-
-enum PrintError {
-    PrintErrorGeneral = 599,
-    PrintErrorPrinterNotFound = 500,
-    PrintErrorInvalidPageRange = 501
-};
-
-ResourceError cancelledError(const ResourceRequest&);
-ResourceError blockedError(const ResourceRequest&);
-ResourceError blockedByContentBlockerError(const ResourceRequest&);
-ResourceError cannotShowURLError(const ResourceRequest&);
-ResourceError interruptedForPolicyChangeError(const ResourceRequest&);
-ResourceError cannotShowMIMETypeError(const ResourceResponse&);
-ResourceError fileDoesNotExistError(const ResourceResponse&);
-ResourceError pluginWillHandleLoadError(const ResourceResponse&);
-ResourceError downloadNetworkError(const ResourceError&);
-ResourceError downloadCancelledByUserError(const ResourceResponse&);
-ResourceError downloadDestinationError(const ResourceResponse&, const String& errorMessage);
-ResourceError printError(const URL& failingURL, const String& errorMessage);
-ResourceError printerNotFoundError(const URL& failingURL);
-ResourceError invalidPageRangeToPrint(const URL& failingURL);
-
-}
-
-#endif

Modified: trunk/Source/WebCore/platform/gtk/po/ChangeLog (214933 => 214934)


--- trunk/Source/WebCore/platform/gtk/po/ChangeLog	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebCore/platform/gtk/po/ChangeLog	2017-04-05 07:41:53 UTC (rev 214934)
@@ -1,3 +1,12 @@
+2017-04-04  Carlos Garcia Campos  <[email protected]>
+
+        Move WebErrors from WebProcess to Shared and get rid of ErrorsGtk in WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=156974
+
+        Reviewed by Sam Weinig.
+
+        * POTFILES.in: Add new paths with translatable strings.
+
 2017-03-22  Carlos Garcia Campos  <[email protected]>
 
         Make it possible to use WEB_UI_STRING macros to mark translatable strings in glib based ports

Modified: trunk/Source/WebCore/platform/gtk/po/POTFILES.in (214933 => 214934)


--- trunk/Source/WebCore/platform/gtk/po/POTFILES.in	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebCore/platform/gtk/po/POTFILES.in	2017-04-05 07:41:53 UTC (rev 214934)
@@ -1,7 +1,10 @@
 # List of source files which contain translatable strings.
-ErrorsGtk.cpp
 LocalizedStringsGtk.cpp
 ../LocalizedStrings.cpp
+../../../WebKit2/Shared/WebErrors.cpp
+../../../WebKit2/Shared/glib/WebErrorsGlib.cpp
+../../../WebKit2/Shared/gtk/WebErrorsGtk.cpp
+../../../WebKit2/Shared/soup/WebErrorsSoup.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitAuthenticationDialog.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitDownload.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.cpp

Modified: trunk/Source/WebKit2/CMakeLists.txt (214933 => 214934)


--- trunk/Source/WebKit2/CMakeLists.txt	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/CMakeLists.txt	2017-04-05 07:41:53 UTC (rev 214934)
@@ -189,6 +189,7 @@
     Shared/WebContextMenuItem.cpp
     Shared/WebContextMenuItemData.cpp
     Shared/WebCoreArgumentCoders.cpp
+    Shared/WebErrors.cpp
     Shared/WebEvent.cpp
     Shared/WebEventConversion.cpp
     Shared/WebGeolocationPosition.cpp

Modified: trunk/Source/WebKit2/ChangeLog (214933 => 214934)


--- trunk/Source/WebKit2/ChangeLog	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/ChangeLog	2017-04-05 07:41:53 UTC (rev 214934)
@@ -1,3 +1,67 @@
+2017-04-04  Carlos Garcia Campos  <[email protected]>
+
+        Move WebErrors from WebProcess to Shared and get rid of ErrorsGtk in WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=156974
+
+        Reviewed by Sam Weinig.
+
+        WebErrors are not only used by the frame loader client in the web process, but also by the network process. So,
+        move them to Shared make most of the implementation cross-platform.
+
+        * CMakeLists.txt: Add new files to compilation.
+        * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
+        (WebKit::NetworkDataTaskSoup::download): Use WebErrors directly instead of platform methods that are no longer needed.
+        (WebKit::NetworkDataTaskSoup::writeDownloadCallback): Ditto.
+        (WebKit::NetworkDataTaskSoup::didFinishDownload): Ditto.
+        (WebKit::NetworkDataTaskSoup::didFail): Ditto.
+        * PlatformGTK.cmake: Add new files to compilation and remove DownloadSoupErrorsGtk.cpp
+        * PlatformMac.cmake:
+        * Shared/API/APIError.cpp: Add error domains used by glib based ports.
+        (API::Error::webKitNetworkErrorDomain):
+        (API::Error::webKitPolicyErrorDomain):
+        (API::Error::webKitPluginErrorDomain):
+        (API::Error::webKitDownloadErrorDomain):
+        (API::Error::webKitPrintErrorDomain):
+        * Shared/API/APIError.h:
+        * Shared/Cocoa/WebErrorsCocoa.mm: Copied from Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h.
+        (WebKit::createNSError):
+        (WebKit::cancelledError):
+        (WebKit::fileDoesNotExistError):
+        * Shared/WebErrors.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp.
+        (WebKit::blockedError):
+        (WebKit::blockedByContentBlockerError):
+        (WebKit::cannotShowURLError):
+        (WebKit::interruptedForPolicyChangeError):
+        (WebKit::blockedByContentFilterError):
+        (WebKit::cannotShowMIMETypeError):
+        (WebKit::pluginWillHandleLoadError):
+        (WebKit::internalError):
+        * Shared/WebErrors.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h.
+        * Shared/glib/WebErrorsGlib.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp.
+        (WebKit::cancelledError):
+        (WebKit::fileDoesNotExistError):
+        * Shared/gtk/WebErrorsGtk.cpp: Copied from Source/WebKit2/NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp.
+        (WebKit::printError):
+        (WebKit::printerNotFoundError):
+        (WebKit::invalidPageRangeToPrint):
+        * Shared/soup/WebErrorsSoup.cpp: Renamed from Source/WebKit2/NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp.
+        (WebKit::downloadNetworkError):
+        (WebKit::downloadCancelledByUserError):
+        (WebKit::downloadDestinationError):
+        * UIProcess/API/gtk/WebKitDownload.cpp:
+        * UIProcess/API/gtk/WebKitError.cpp:
+        (webkit_network_error_quark):
+        (webkit_policy_error_quark):
+        (webkit_plugin_error_quark):
+        (webkit_download_error_quark):
+        (webkit_print_error_quark):
+        * UIProcess/API/gtk/WebKitPrivate.cpp:
+        (toWebKitError):
+        (toWebCoreError):
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: Removed.
+        * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
+
 2017-04-04  Youenn Fablet  <[email protected]>
 
         [Mac] Add back web audio support for getUserMedia MediaStreamTrack

Modified: trunk/Source/WebKit2/NetworkProcess/soup/NetworkDataTaskSoup.cpp (214933 => 214934)


--- trunk/Source/WebKit2/NetworkProcess/soup/NetworkDataTaskSoup.cpp	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/NetworkProcess/soup/NetworkDataTaskSoup.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -869,7 +869,7 @@
     ASSERT(!m_response.isNull());
 
     if (m_response.httpStatusCode() >= 400) {
-        didFailDownload(platformDownloadNetworkError(m_response.httpStatusCode(), m_response.url(), m_response.httpStatusText()));
+        didFailDownload(downloadNetworkError(m_response.url(), m_response.httpStatusText()));
         return;
     }
 
@@ -884,7 +884,7 @@
     else
         outputStream = adoptGRef(g_file_create(m_downloadDestinationFile.get(), G_FILE_CREATE_NONE, nullptr, &error.outPtr()));
     if (!outputStream) {
-        didFailDownload(platformDownloadDestinationError(m_response, error->message));
+        didFailDownload(downloadDestinationError(m_response, error->message));
         return;
     }
 
@@ -893,7 +893,7 @@
     m_downloadIntermediateFile = adoptGRef(g_file_new_for_uri(intermediateURI.get()));
     outputStream = adoptGRef(g_file_replace(m_downloadIntermediateFile.get(), 0, TRUE, G_FILE_CREATE_NONE, 0, &error.outPtr()));
     if (!outputStream) {
-        didFailDownload(platformDownloadDestinationError(m_response, error->message));
+        didFailDownload(downloadDestinationError(m_response, error->message));
         return;
     }
     m_downloadOutputStream = adoptGRef(G_OUTPUT_STREAM(outputStream.leakRef()));
@@ -927,7 +927,7 @@
         bytesWritten = writeTaskResult;
 #endif
     if (error)
-        task->didFailDownload(platformDownloadDestinationError(task->m_response, error->message));
+        task->didFailDownload(downloadDestinationError(task->m_response, error->message));
     else
         task->didWriteDownload(bytesWritten);
 }
@@ -982,7 +982,7 @@
     ASSERT(m_downloadIntermediateFile);
     GUniqueOutPtr<GError> error;
     if (!g_file_move(m_downloadIntermediateFile.get(), m_downloadDestinationFile.get(), G_FILE_COPY_OVERWRITE, m_cancellable.get(), nullptr, nullptr, &error.outPtr())) {
-        didFailDownload(platformDownloadDestinationError(m_response, error->message));
+        didFailDownload(downloadDestinationError(m_response, error->message));
         return;
     }
 
@@ -1026,7 +1026,7 @@
 void NetworkDataTaskSoup::didFail(const ResourceError& error)
 {
     if (isDownload()) {
-        didFailDownload(platformDownloadNetworkError(error.errorCode(), error.failingURL(), error.localizedDescription()));
+        didFailDownload(downloadNetworkError(error.failingURL(), error.localizedDescription()));
         return;
     }
 

Modified: trunk/Source/WebKit2/PlatformGTK.cmake (214933 => 214934)


--- trunk/Source/WebKit2/PlatformGTK.cmake	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/PlatformGTK.cmake	2017-04-05 07:41:53 UTC (rev 214934)
@@ -30,8 +30,6 @@
 
     NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp
 
-    NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp
-
     NetworkProcess/cache/NetworkCacheCodersSoup.cpp
     NetworkProcess/cache/NetworkCacheDataSoup.cpp
     NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp
@@ -75,6 +73,8 @@
 
     Shared/cairo/ShareableBitmapCairo.cpp
 
+    Shared/glib/WebErrorsGlib.cpp
+
     Shared/gtk/ArgumentCodersGtk.cpp
     Shared/gtk/NativeWebKeyboardEventGtk.cpp
     Shared/gtk/NativeWebMouseEventGtk.cpp
@@ -83,6 +83,7 @@
     Shared/gtk/PrintInfoGtk.cpp
     Shared/gtk/ProcessExecutablePathGtk.cpp
     Shared/gtk/WebContextMenuItemGtk.cpp
+    Shared/gtk/WebErrorsGtk.cpp
     Shared/gtk/WebEventFactory.cpp
     Shared/gtk/WebSelectionData.cpp
 
@@ -89,6 +90,7 @@
     Shared/linux/WebMemorySamplerLinux.cpp
 
     Shared/soup/WebCoreArgumentCodersSoup.cpp
+    Shared/soup/WebErrorsSoup.cpp
 
     Shared/unix/ChildProcessMain.cpp
 
@@ -475,7 +477,6 @@
     WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp
     WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp
     WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp
-    WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp
     WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp
 
     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp

Modified: trunk/Source/WebKit2/PlatformMac.cmake (214933 => 214934)


--- trunk/Source/WebKit2/PlatformMac.cmake	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/PlatformMac.cmake	2017-04-05 07:41:53 UTC (rev 214934)
@@ -116,6 +116,7 @@
     Shared/Cocoa/WKNSURLExtras.mm
     Shared/Cocoa/WKNSURLRequest.mm
     Shared/Cocoa/WKObject.mm
+    Shared/Cocoa/WebErrorsCocoa.mm
 
     Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm
     Shared/Plugins/Netscape/mac/PluginInformationMac.mm
@@ -355,7 +356,6 @@
     WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm
     WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
     WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm
-    WebProcess/WebCoreSupport/mac/WebErrorsMac.mm
     WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
     WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm
     WebProcess/WebCoreSupport/mac/WebSystemInterface.mm

Modified: trunk/Source/WebKit2/Shared/API/APIError.cpp (214933 => 214934)


--- trunk/Source/WebKit2/Shared/API/APIError.cpp	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/Shared/API/APIError.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -38,6 +38,52 @@
     return webKitErrorDomainString;
 }
 
+const WTF::String& Error::webKitNetworkErrorDomain()
+{
+#if USE(GLIB)
+    static NeverDestroyed<WTF::String> webKitErrorDomainString(ASCIILiteral("WebKitNetworkError"));
+    return webKitErrorDomainString;
+#else
+    return webKitErrorDomain();
+#endif
+}
+
+const WTF::String& Error::webKitPolicyErrorDomain()
+{
+#if USE(GLIB)
+    static NeverDestroyed<WTF::String> webKitErrorDomainString(ASCIILiteral("WebKitPolicyError"));
+    return webKitErrorDomainString;
+#else
+    return webKitErrorDomain();
+#endif
+}
+
+const WTF::String& Error::webKitPluginErrorDomain()
+{
+#if USE(GLIB)
+    static NeverDestroyed<WTF::String> webKitErrorDomainString(ASCIILiteral("WebKitPluginError"));
+    return webKitErrorDomainString;
+#else
+    return webKitErrorDomain();
+#endif
+}
+
+#if USE(SOUP)
+const WTF::String& Error::webKitDownloadErrorDomain()
+{
+    static NeverDestroyed<WTF::String> webKitErrorDomainString(ASCIILiteral("WebKitDownloadError"));
+    return webKitErrorDomainString;
+}
+#endif
+
+#if PLATFORM(GTK)
+const WTF::String& Error::webKitPrintErrorDomain()
+{
+    static NeverDestroyed<WTF::String> webKitErrorDomainString(ASCIILiteral("WebKitPrintError"));
+    return webKitErrorDomainString;
+}
+#endif
+
 void Error::encode(IPC::Encoder& encoder) const
 {
     encoder << platformError();

Modified: trunk/Source/WebKit2/Shared/API/APIError.h (214933 => 214934)


--- trunk/Source/WebKit2/Shared/API/APIError.h	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/Shared/API/APIError.h	2017-04-05 07:41:53 UTC (rev 214934)
@@ -49,7 +49,20 @@
     }
 
     static const WTF::String& webKitErrorDomain();
+    enum Network { Cancelled = 302, FileDoesNotExist = 303 };
+    static const WTF::String& webKitNetworkErrorDomain();
+    static const WTF::String& webKitPolicyErrorDomain();
+    static const WTF::String& webKitPluginErrorDomain();
+#if USE(SOUP)
+    enum Download { Transport = 499, CancelledByUser = 400, Destination = 401 };
+    static const WTF::String& webKitDownloadErrorDomain();
+#endif
+#if PLATFORM(GTK)
+    enum Print { General = 599, PrinterNotFound = 500, InvalidPageRange = 501 };
+    static const WTF::String& webKitPrintErrorDomain();
+#endif
 
+
     const WTF::String& domain() const { return m_platformError.domain(); }
     int errorCode() const { return m_platformError.errorCode(); }
     const WTF::String& failingURL() const { return m_platformError.failingURL(); }

Copied: trunk/Source/WebKit2/Shared/Cocoa/WebErrorsCocoa.mm (from rev 214933, trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h) (0 => 214934)


--- trunk/Source/WebKit2/Shared/Cocoa/WebErrorsCocoa.mm	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/Cocoa/WebErrorsCocoa.mm	2017-04-05 07:41:53 UTC (rev 214934)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010-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 "WebErrors.h"
+
+#import "APIError.h"
+#import "WKErrorRef.h"
+#import <WebCore/LocalizedStrings.h>
+#import <WebCore/ResourceRequest.h>
+#import <WebCore/ResourceResponse.h>
+
+using namespace WebCore;
+using namespace WebKit;
+
+namespace WebKit {
+
+static RetainPtr<NSError> createNSError(NSString* domain, int code, NSURL *URL)
+{
+    NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:
+        URL, @"NSErrorFailingURLKey",
+        [URL absoluteString], @"NSErrorFailingURLStringKey",
+        nil];
+
+    return adoptNS([[NSError alloc] initWithDomain:domain code:code userInfo:userInfo]);
+}
+
+ResourceError cancelledError(const ResourceRequest& request)
+{
+    return ResourceError(createNSError(NSURLErrorDomain, NSURLErrorCancelled, request.url()).get());
+}
+
+ResourceError fileDoesNotExistError(const ResourceResponse& response)
+{
+    return ResourceError(createNSError(NSURLErrorDomain, NSURLErrorFileDoesNotExist, response.url()).get());
+}
+
+} // namespace WebKit

Copied: trunk/Source/WebKit2/Shared/WebErrors.cpp (from rev 214933, trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp) (0 => 214934)


--- trunk/Source/WebKit2/Shared/WebErrors.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/WebErrors.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2010-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.
+ */
+
+#include "config.h"
+#include "WebErrors.h"
+
+#include "APIError.h"
+#include "WKErrorRef.h"
+#include <WebCore/LocalizedStrings.h>
+#include <WebCore/ResourceRequest.h>
+#include <WebCore/ResourceResponse.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+ResourceError blockedError(const ResourceRequest& request)
+{
+    return ResourceError(API::Error::webKitPolicyErrorDomain(), kWKErrorCodeCannotUseRestrictedPort, request.url(), WEB_UI_STRING("Not allowed to use restricted network port", "WebKitErrorCannotUseRestrictedPort description"));
+}
+
+ResourceError blockedByContentBlockerError(const ResourceRequest& request)
+{
+    return ResourceError(API::Error::webKitPolicyErrorDomain(), kWKErrorCodeFrameLoadBlockedByContentBlocker, request.url(), WEB_UI_STRING("The URL was blocked by a content blocker", "WebKitErrorBlockedByContentBlocker description"));
+}
+
+ResourceError cannotShowURLError(const ResourceRequest& request)
+{
+    return ResourceError(API::Error::webKitPolicyErrorDomain(), kWKErrorCodeCannotShowURL, request.url(), WEB_UI_STRING("The URL can’t be shown", "WebKitErrorCannotShowURL description"));
+}
+
+ResourceError interruptedForPolicyChangeError(const ResourceRequest& request)
+{
+    return ResourceError(API::Error::webKitPolicyErrorDomain(), kWKErrorCodeFrameLoadInterruptedByPolicyChange, request.url(), WEB_UI_STRING("Frame load interrupted", "WebKitErrorFrameLoadInterruptedByPolicyChange description"));
+}
+
+#if ENABLE(CONTENT_FILTERING)
+ResourceError blockedByContentFilterError(const ResourceRequest& request)
+{
+    return ResourceError(API::Error::webKitPolicyErrorDomain(), kWKErrorCodeFrameLoadBlockedByContentFilter, request.url(), WEB_UI_STRING("The URL was blocked by a content filter", "WebKitErrorFrameLoadBlockedByContentFilter description"));
+}
+#endif
+
+ResourceError cannotShowMIMETypeError(const ResourceResponse& response)
+{
+    return ResourceError(API::Error::webKitPolicyErrorDomain(), kWKErrorCodeCannotShowMIMEType, response.url(), WEB_UI_STRING("Content with specified MIME type can’t be shown", "WebKitErrorCannotShowMIMEType description"));
+}
+
+ResourceError pluginWillHandleLoadError(const ResourceResponse& response)
+{
+    return ResourceError(API::Error::webKitPluginErrorDomain(), kWKErrorCodePlugInWillHandleLoad, response.url(), WEB_UI_STRING("Plug-in handled load", "WebKitErrorPlugInWillHandleLoad description"));
+}
+
+ResourceError internalError(const URL& url)
+{
+    return ResourceError(API::Error::webKitErrorDomain(), kWKErrorInternal, url, WEB_UI_STRING("WebKit encountered an internal error", "WebKitErrorInternal description"));
+}
+
+} // namespace WebKit

Copied: trunk/Source/WebKit2/Shared/WebErrors.h (from rev 214933, trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h) (0 => 214934)


--- trunk/Source/WebKit2/Shared/WebErrors.h	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/WebErrors.h	2017-04-05 07:41:53 UTC (rev 214934)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2010-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.
+ */
+
+#pragma once
+
+#include <wtf/Forward.h>
+
+namespace WebCore {
+class URL;
+class ResourceError;
+class ResourceRequest;
+class ResourceResponse;
+}
+
+namespace WebKit {
+
+WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&);
+WebCore::ResourceError blockedError(const WebCore::ResourceRequest&);
+WebCore::ResourceError blockedByContentBlockerError(const WebCore::ResourceRequest&);
+WebCore::ResourceError cannotShowURLError(const WebCore::ResourceRequest&);
+WebCore::ResourceError interruptedForPolicyChangeError(const WebCore::ResourceRequest&);
+#if ENABLE(CONTENT_FILTERING)
+WebCore::ResourceError blockedByContentFilterError(const WebCore::ResourceRequest&);
+#endif
+WebCore::ResourceError cannotShowMIMETypeError(const WebCore::ResourceResponse&);
+WebCore::ResourceError fileDoesNotExistError(const WebCore::ResourceResponse&);
+WebCore::ResourceError pluginWillHandleLoadError(const WebCore::ResourceResponse&);
+WebCore::ResourceError internalError(const WebCore::URL&);
+
+#if USE(SOUP)
+WebCore::ResourceError downloadNetworkError(const WebCore::URL&, const WTF::String&);
+WebCore::ResourceError downloadCancelledByUserError(const WebCore::ResourceResponse&);
+WebCore::ResourceError downloadDestinationError(const WebCore::ResourceResponse&, const WTF::String&);
+#endif
+
+#if PLATFORM(GTK)
+WebCore::ResourceError printError(const WebCore::URL&, const WTF::String&);
+WebCore::ResourceError printerNotFoundError(const WebCore::URL&);
+WebCore::ResourceError invalidPageRangeToPrint(const WebCore::URL&);
+#endif
+
+} // namespace WebKit

Copied: trunk/Source/WebKit2/Shared/glib/WebErrorsGlib.cpp (from rev 214933, trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp) (0 => 214934)


--- trunk/Source/WebKit2/Shared/glib/WebErrorsGlib.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/glib/WebErrorsGlib.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Portions Copyright (c) 2010 Motorola Mobility, Inc.  All rights reserved.
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * 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 "WebErrors.h"
+
+#include "APIError.h"
+#include <WebCore/LocalizedStrings.h>
+#include <WebCore/ResourceError.h>
+#include <WebCore/ResourceRequest.h>
+#include <WebCore/ResourceResponse.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+ResourceError cancelledError(const ResourceRequest& request)
+{
+    return ResourceError(API::Error::webKitNetworkErrorDomain(), API::Error::Network::Cancelled, request.url(), WEB_UI_STRING("Load request cancelled", "Load request cancelled"));
+}
+
+ResourceError fileDoesNotExistError(const ResourceResponse& response)
+{
+    return ResourceError(API::Error::webKitNetworkErrorDomain(), API::Error::Network::FileDoesNotExist, response.url(), WEB_UI_STRING("File does not exist", "The requested file doesn't exist"));
+}
+
+} // namespace WebKit

Copied: trunk/Source/WebKit2/Shared/gtk/WebErrorsGtk.cpp (from rev 214933, trunk/Source/WebKit2/NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp) (0 => 214934)


--- trunk/Source/WebKit2/Shared/gtk/WebErrorsGtk.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/gtk/WebErrorsGtk.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * 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 "WebErrors.h"
+
+#include "APIError.h"
+#include <WebCore/URL.h>
+#include <glib/gi18n-lib.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+ResourceError printError(const URL& failingURL, const String& localizedDescription)
+{
+    return ResourceError(API::Error::webKitPrintErrorDomain(), API::Error::Print::General, failingURL, localizedDescription);
+}
+
+ResourceError printerNotFoundError(const URL& failingURL)
+{
+    return ResourceError(API::Error::webKitPrintErrorDomain(), API::Error::Print::PrinterNotFound, failingURL, _("Printer not found"));
+}
+
+ResourceError invalidPageRangeToPrint(const URL& failingURL)
+{
+    return ResourceError(API::Error::webKitPrintErrorDomain(), API::Error::Print::InvalidPageRange, failingURL, _("Invalid page range"));
+}
+
+} // namespace WebKit

Copied: trunk/Source/WebKit2/Shared/soup/WebErrorsSoup.cpp (from rev 214933, trunk/Source/WebKit2/NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp) (0 => 214934)


--- trunk/Source/WebKit2/Shared/soup/WebErrorsSoup.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/soup/WebErrorsSoup.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * 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 "WebErrors.h"
+
+#include "APIError.h"
+#include <WebCore/LocalizedStrings.h>
+#include <WebCore/ResourceError.h>
+#include <WebCore/ResourceResponse.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+ResourceError downloadNetworkError(const URL& failingURL, const String& localizedDescription)
+{
+    return ResourceError(API::Error::webKitDownloadErrorDomain(), API::Error::Download::Transport, failingURL, localizedDescription);
+}
+
+ResourceError downloadCancelledByUserError(const ResourceResponse& response)
+{
+    return ResourceError(API::Error::webKitDownloadErrorDomain(), API::Error::Download::CancelledByUser, response.url(), WEB_UI_STRING("User cancelled the download", "The download was cancelled by the user"));
+}
+
+ResourceError downloadDestinationError(const ResourceResponse& response, const String& localizedDescription)
+{
+    return ResourceError(API::Error::webKitDownloadErrorDomain(), API::Error::Download::Destination, response.url(), localizedDescription);
+}
+
+} // namespace WebKit

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp (214933 => 214934)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -21,12 +21,12 @@
 #include "WebKitDownload.h"
 
 #include "DownloadProxy.h"
+#include "WebErrors.h"
 #include "WebKitDownloadPrivate.h"
 #include "WebKitMarshal.h"
 #include "WebKitPrivate.h"
 #include "WebKitURIRequestPrivate.h"
 #include "WebKitURIResponsePrivate.h"
-#include <WebCore/ErrorsGtk.h>
 #include <WebCore/ResourceResponse.h>
 #include <glib/gi18n-lib.h>
 #include <wtf/glib/GRefPtr.h>

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitError.cpp (214933 => 214934)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitError.cpp	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitError.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -22,7 +22,6 @@
 #include "WebKitError.h"
 
 #include "WebKitPrivate.h"
-#include <WebCore/ErrorsGtk.h>
 
 using namespace WebCore;
 
@@ -37,27 +36,27 @@
 
 GQuark webkit_network_error_quark()
 {
-    return g_quark_from_static_string(WebCore::errorDomainNetwork);
+    return g_quark_from_static_string(reinterpret_cast<const char*>(API::Error::webKitNetworkErrorDomain().characters8()));
 }
 
 GQuark webkit_policy_error_quark()
 {
-    return g_quark_from_static_string(WebCore::errorDomainPolicy);
+    return g_quark_from_static_string(reinterpret_cast<const char*>(API::Error::webKitPolicyErrorDomain().characters8()));
 }
 
 GQuark webkit_plugin_error_quark()
 {
-    return g_quark_from_static_string(WebCore::errorDomainPlugin);
+    return g_quark_from_static_string(reinterpret_cast<const char*>(API::Error::webKitPluginErrorDomain().characters8()));
 }
 
 GQuark webkit_download_error_quark()
 {
-    return g_quark_from_static_string(WebCore::errorDomainDownload);
+    return g_quark_from_static_string(reinterpret_cast<const char*>(API::Error::webKitDownloadErrorDomain().characters8()));
 }
 
 GQuark webkit_print_error_quark()
 {
-    return g_quark_from_static_string(WebCore::errorDomainPrint);
+    return g_quark_from_static_string(reinterpret_cast<const char*>(API::Error::webKitPrintErrorDomain().characters8()));
 }
 
 GQuark webkit_javascript_error_quark()

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.cpp (214933 => 214934)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.cpp	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -20,7 +20,8 @@
 #include "config.h"
 #include "WebKitPrivate.h"
 
-#include "ErrorsGtk.h"
+#include "APIError.h"
+#include "WKErrorRef.h"
 #include "WebEvent.h"
 #include "WebKitError.h"
 #include <gdk/gdk.h>
@@ -113,49 +114,39 @@
 unsigned toWebKitError(unsigned webCoreError)
 {
     switch (webCoreError) {
-    case WebCore::NetworkErrorFailed:
-        return WEBKIT_NETWORK_ERROR_FAILED;
-    case WebCore::NetworkErrorTransport:
-        return WEBKIT_NETWORK_ERROR_TRANSPORT;
-    case WebCore::NetworkErrorUnknownProtocol:
-        return WEBKIT_NETWORK_ERROR_UNKNOWN_PROTOCOL;
-    case WebCore::NetworkErrorCancelled:
+    case API::Error::Network::Cancelled:
         return WEBKIT_NETWORK_ERROR_CANCELLED;
-    case WebCore::NetworkErrorFileDoesNotExist:
+    case API::Error::Network::FileDoesNotExist:
         return WEBKIT_NETWORK_ERROR_FILE_DOES_NOT_EXIST;
-    case WebCore::PolicyErrorFailed:
-        return WEBKIT_POLICY_ERROR_FAILED;
-    case WebCore::PolicyErrorCannotShowMimeType:
+    case kWKErrorCodeCannotShowMIMEType:
         return WEBKIT_POLICY_ERROR_CANNOT_SHOW_MIME_TYPE;
-    case WebCore::PolicyErrorCannotShowURL:
+    case kWKErrorCodeCannotShowURL:
         return WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI;
-    case WebCore::PolicyErrorFrameLoadInterruptedByPolicyChange:
+    case kWKErrorCodeFrameLoadInterruptedByPolicyChange:
         return WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE;
-    case WebCore::PolicyErrorCannotUseRestrictedPort:
+    case kWKErrorCodeCannotUseRestrictedPort:
         return WEBKIT_POLICY_ERROR_CANNOT_USE_RESTRICTED_PORT;
-    case WebCore::PluginErrorFailed:
-        return WEBKIT_PLUGIN_ERROR_FAILED;
-    case WebCore::PluginErrorCannotFindPlugin:
+    case kWKErrorCodeCannotFindPlugIn:
         return WEBKIT_PLUGIN_ERROR_CANNOT_FIND_PLUGIN;
-    case WebCore::PluginErrorCannotLoadPlugin:
+    case kWKErrorCodeCannotLoadPlugIn:
         return WEBKIT_PLUGIN_ERROR_CANNOT_LOAD_PLUGIN;
-    case WebCore::PluginErrorJavaUnavailable:
+    case kWKErrorCodeJavaUnavailable:
         return WEBKIT_PLUGIN_ERROR_JAVA_UNAVAILABLE;
-    case WebCore::PluginErrorConnectionCancelled:
+    case kWKErrorCodePlugInCancelledConnection:
         return WEBKIT_PLUGIN_ERROR_CONNECTION_CANCELLED;
-    case WebCore::PluginErrorWillHandleLoad:
+    case kWKErrorCodePlugInWillHandleLoad:
         return WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD;
-    case WebCore::DownloadErrorNetwork:
+    case API::Error::Download::Transport:
         return WEBKIT_DOWNLOAD_ERROR_NETWORK;
-    case WebCore::DownloadErrorCancelledByUser:
+    case API::Error::Download::CancelledByUser:
         return WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER;
-    case WebCore::DownloadErrorDestination:
+    case API::Error::Download::Destination:
         return WEBKIT_DOWNLOAD_ERROR_DESTINATION;
-    case WebCore::PrintErrorGeneral:
+    case API::Error::Print::General:
         return WEBKIT_PRINT_ERROR_GENERAL;
-    case WebCore::PrintErrorPrinterNotFound:
+    case API::Error::Print::PrinterNotFound:
         return WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND;
-    case WebCore::PrintErrorInvalidPageRange:
+    case API::Error::Print::InvalidPageRange:
         return WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE;
     default:
         // This may be a user app defined error, which needs to be passed as-is.
@@ -166,50 +157,40 @@
 unsigned toWebCoreError(unsigned webKitError)
 {
     switch (webKitError) {
-    case WEBKIT_NETWORK_ERROR_FAILED:
-        return WebCore::NetworkErrorFailed;
-    case WEBKIT_NETWORK_ERROR_TRANSPORT:
-        return WebCore::NetworkErrorTransport;
-    case WEBKIT_NETWORK_ERROR_UNKNOWN_PROTOCOL:
-        return WebCore::NetworkErrorUnknownProtocol;
     case WEBKIT_NETWORK_ERROR_CANCELLED:
-        return WebCore::NetworkErrorCancelled;
+        return API::Error::Network::Cancelled;
     case WEBKIT_NETWORK_ERROR_FILE_DOES_NOT_EXIST:
-        return WebCore::NetworkErrorFileDoesNotExist;
-    case WEBKIT_POLICY_ERROR_FAILED:
-        return WebCore::PolicyErrorFailed;
+        return API::Error::Network::FileDoesNotExist;
     case WEBKIT_POLICY_ERROR_CANNOT_SHOW_MIME_TYPE:
-        return WebCore::PolicyErrorCannotShowMimeType;
+        return kWKErrorCodeCannotShowMIMEType;
     case WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI:
-        return WebCore::PolicyErrorCannotShowURL;
+        return kWKErrorCodeCannotShowURL;
     case WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE:
-        return WebCore::PolicyErrorFrameLoadInterruptedByPolicyChange;
+        return kWKErrorCodeFrameLoadInterruptedByPolicyChange;
     case WEBKIT_POLICY_ERROR_CANNOT_USE_RESTRICTED_PORT:
-        return WebCore::PolicyErrorCannotUseRestrictedPort;
-    case WEBKIT_PLUGIN_ERROR_FAILED:
-        return WebCore::PluginErrorFailed;
+        return kWKErrorCodeCannotUseRestrictedPort;
     case WEBKIT_PLUGIN_ERROR_CANNOT_FIND_PLUGIN:
-        return WebCore::PluginErrorCannotFindPlugin;
+        return kWKErrorCodeCannotFindPlugIn;
     case WEBKIT_PLUGIN_ERROR_CANNOT_LOAD_PLUGIN:
-        return WebCore::PluginErrorCannotLoadPlugin;
+        return kWKErrorCodeCannotLoadPlugIn;
     case WEBKIT_PLUGIN_ERROR_JAVA_UNAVAILABLE:
-        return WebCore::PluginErrorJavaUnavailable;
+        return kWKErrorCodeJavaUnavailable;
     case WEBKIT_PLUGIN_ERROR_CONNECTION_CANCELLED:
-        return WebCore::PluginErrorConnectionCancelled;
+        return kWKErrorCodePlugInCancelledConnection;
     case WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD:
-        return WebCore::PluginErrorWillHandleLoad;
+        return kWKErrorCodePlugInWillHandleLoad;
     case WEBKIT_DOWNLOAD_ERROR_NETWORK:
-        return WebCore::DownloadErrorNetwork;
+        return API::Error::Download::Transport;
     case WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER:
-        return WebCore::DownloadErrorCancelledByUser;
+        return API::Error::Download::CancelledByUser;
     case WEBKIT_DOWNLOAD_ERROR_DESTINATION:
-        return WebCore::DownloadErrorDestination;
+        return API::Error::Download::Destination;
     case WEBKIT_PRINT_ERROR_GENERAL:
-        return WebCore::PrintErrorGeneral;
+        return API::Error::Print::General;
     case WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND:
-        return WebCore::PrintErrorPrinterNotFound;
+        return API::Error::Print::PrinterNotFound;
     case WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE:
-        return WebCore::PrintErrorInvalidPageRange;
+        return API::Error::Print::InvalidPageRange;
     default:
         // This may be a user app defined error, which needs to be passed as-is.
         return webKitError;

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (214933 => 214934)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2017-04-05 07:41:53 UTC (rev 214934)
@@ -226,7 +226,6 @@
 		1A3EED0F161A535400AEB4F5 /* MessageReceiverMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3EED0D161A535300AEB4F5 /* MessageReceiverMap.h */; };
 		1A3EED12161A53D600AEB4F5 /* MessageReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3EED11161A53D600AEB4F5 /* MessageReceiver.h */; };
 		1A422F8B18B29B5400D8CD96 /* WKHistoryDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A422F8A18B29B5400D8CD96 /* WKHistoryDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		1A433F0D113C53DD00FACDE9 /* WebErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A433F0C113C53DD00FACDE9 /* WebErrors.h */; };
 		1A43E829188F3CDC009E4D30 /* _WKProcessPoolConfiguration.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A43E827188F3CDC009E4D30 /* _WKProcessPoolConfiguration.mm */; };
 		1A43E82A188F3CDC009E4D30 /* _WKProcessPoolConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A43E828188F3CDC009E4D30 /* _WKProcessPoolConfiguration.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1A445B9F184D5FB5004B3414 /* WKContextInjectedBundleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A445B9E184D5FB5004B3414 /* WKContextInjectedBundleClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1203,6 +1202,9 @@
 		7A821F4C1E2F673900604577 /* LegacyCustomProtocolManagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A821F4B1E2F664800604577 /* LegacyCustomProtocolManagerClient.h */; };
 		7A821F4E1E2F67A800604577 /* LegacyCustomProtocolManagerClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7A821F4D1E2F679E00604577 /* LegacyCustomProtocolManagerClient.mm */; };
 		7A821F501E2F7A7500604577 /* APICustomProtocolManagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A821F4F1E2F7A5C00604577 /* APICustomProtocolManagerClient.h */; };
+		7AF236201E79A3E400438A05 /* WebErrors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AF2361E1E79A3B400438A05 /* WebErrors.cpp */; };
+		7AF236211E79A40800438A05 /* WebErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF2361F1E79A3D800438A05 /* WebErrors.h */; };
+		7AF236231E79A44400438A05 /* WebErrorsCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7AF236221E79A43100438A05 /* WebErrorsCocoa.mm */; };
 		7C065F2B1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C065F291C8CD95F00C2D950 /* WebUserContentControllerDataTypes.cpp */; };
 		7C065F2C1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C065F2A1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.h */; };
 		7C135AA8173B0BCA00586AE2 /* WKPluginInformation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C135AA6173B0BCA00586AE2 /* WKPluginInformation.cpp */; };
@@ -1528,7 +1530,6 @@
 		BC111A5F112F4FBB00337BAB /* WebFrameLoaderClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC111A58112F4FBB00337BAB /* WebFrameLoaderClient.cpp */; };
 		BC111A60112F4FBB00337BAB /* WebInspectorClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC111A59112F4FBB00337BAB /* WebInspectorClient.cpp */; };
 		BC111ADD112F5B9300337BAB /* WebFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC111ADC112F5B9300337BAB /* WebFrame.cpp */; };
-		BC111AE0112F5BC200337BAB /* WebErrorsMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC111ADF112F5BC200337BAB /* WebErrorsMac.mm */; };
 		BC111AE4112F5C2600337BAB /* WebProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC111AE3112F5C2600337BAB /* WebProcess.cpp */; };
 		BC111B09112F5E3C00337BAB /* ResponsivenessTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC111B08112F5E3C00337BAB /* ResponsivenessTimer.cpp */; };
 		BC111B0E112F5E4F00337BAB /* WebFrameProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC111B0A112F5E4F00337BAB /* WebFrameProxy.cpp */; };
@@ -2375,7 +2376,6 @@
 		1A3EED0D161A535300AEB4F5 /* MessageReceiverMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageReceiverMap.h; sourceTree = "<group>"; };
 		1A3EED11161A53D600AEB4F5 /* MessageReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageReceiver.h; sourceTree = "<group>"; };
 		1A422F8A18B29B5400D8CD96 /* WKHistoryDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKHistoryDelegatePrivate.h; sourceTree = "<group>"; };
-		1A433F0C113C53DD00FACDE9 /* WebErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebErrors.h; sourceTree = "<group>"; };
 		1A43E827188F3CDC009E4D30 /* _WKProcessPoolConfiguration.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKProcessPoolConfiguration.mm; sourceTree = "<group>"; };
 		1A43E828188F3CDC009E4D30 /* _WKProcessPoolConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKProcessPoolConfiguration.h; sourceTree = "<group>"; };
 		1A445B9E184D5FB5004B3414 /* WKContextInjectedBundleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextInjectedBundleClient.h; sourceTree = "<group>"; };
@@ -3467,6 +3467,9 @@
 		7A9CD8C01C77984900D9F6C7 /* WebResourceLoadStatisticsStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebResourceLoadStatisticsStore.cpp; sourceTree = "<group>"; };
 		7A9CD8C11C77984900D9F6C7 /* WebResourceLoadStatisticsStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebResourceLoadStatisticsStore.h; sourceTree = "<group>"; };
 		7A9CD8C21C779AD600D9F6C7 /* WebResourceLoadStatisticsStore.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebResourceLoadStatisticsStore.messages.in; sourceTree = "<group>"; };
+		7AF2361E1E79A3B400438A05 /* WebErrors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebErrors.cpp; sourceTree = "<group>"; };
+		7AF2361F1E79A3D800438A05 /* WebErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebErrors.h; sourceTree = "<group>"; };
+		7AF236221E79A43100438A05 /* WebErrorsCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebErrorsCocoa.mm; sourceTree = "<group>"; };
 		7C065F291C8CD95F00C2D950 /* WebUserContentControllerDataTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebUserContentControllerDataTypes.cpp; sourceTree = "<group>"; };
 		7C065F2A1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUserContentControllerDataTypes.h; sourceTree = "<group>"; };
 		7C0BB9A818DCDE890006C086 /* WebContent-iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "WebContent-iOS.entitlements"; sourceTree = "<group>"; };
@@ -3813,7 +3816,6 @@
 		BC111A58112F4FBB00337BAB /* WebFrameLoaderClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebFrameLoaderClient.cpp; sourceTree = "<group>"; wrapsLines = 0; };
 		BC111A59112F4FBB00337BAB /* WebInspectorClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorClient.cpp; sourceTree = "<group>"; };
 		BC111ADC112F5B9300337BAB /* WebFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebFrame.cpp; sourceTree = "<group>"; };
-		BC111ADF112F5BC200337BAB /* WebErrorsMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebErrorsMac.mm; sourceTree = "<group>"; };
 		BC111AE3112F5C2600337BAB /* WebProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebProcess.cpp; sourceTree = "<group>"; };
 		BC111B08112F5E3C00337BAB /* ResponsivenessTimer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResponsivenessTimer.cpp; sourceTree = "<group>"; };
 		BC111B0A112F5E4F00337BAB /* WebFrameProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebFrameProxy.cpp; sourceTree = "<group>"; };
@@ -4946,6 +4948,8 @@
 				510FBB991288C95E00AFFDF4 /* WebContextMenuItemData.h */,
 				939AE7651316E99C00AE06A6 /* WebCoreArgumentCoders.cpp */,
 				BC1DD7B1114DC396005ADAF3 /* WebCoreArgumentCoders.h */,
+				7AF2361E1E79A3B400438A05 /* WebErrors.cpp */,
+				7AF2361F1E79A3D800438A05 /* WebErrors.h */,
 				C0337DAD127A24FE008FF4F4 /* WebEvent.cpp */,
 				BC032DAF10F4380F0058C15A /* WebEvent.h */,
 				BC032DB010F4380F0058C15A /* WebEventConversion.cpp */,
@@ -5711,6 +5715,7 @@
 				37BF2F051947DEB400723C48 /* WKNSURLRequest.mm */,
 				378E1A3F181EDA010031007A /* WKObject.h */,
 				374436871820E7240049579F /* WKObject.mm */,
+				7AF236221E79A43100438A05 /* WebErrorsCocoa.mm */,
 			);
 			name = cocoa;
 			path = Cocoa;
@@ -6519,7 +6524,6 @@
 				BC032D6610F4378D0058C15A /* WebDragClient.h */,
 				BC111A57112F4FBB00337BAB /* WebEditorClient.cpp */,
 				BC032D6810F4378D0058C15A /* WebEditorClient.h */,
-				1A433F0C113C53DD00FACDE9 /* WebErrors.h */,
 				BC111A58112F4FBB00337BAB /* WebFrameLoaderClient.cpp */,
 				BC032D6A10F4378D0058C15A /* WebFrameLoaderClient.h */,
 				BC1BE1DF12D54A410004A228 /* WebGeolocationClient.cpp */,
@@ -7012,7 +7016,6 @@
 				51021E9B12B16788005C033C /* WebContextMenuClientMac.mm */,
 				C554FFA212E4E8EA002F22C0 /* WebDragClientMac.mm */,
 				C5237F5F12441CA300780472 /* WebEditorClientMac.mm */,
-				BC111ADF112F5BC200337BAB /* WebErrorsMac.mm */,
 				9391F283121B38F500EBF7E8 /* WebFrameNetworkingContext.h */,
 				9391F284121B38F500EBF7E8 /* WebFrameNetworkingContext.mm */,
 				BCC43AC6127B99DE00317F16 /* WebPopupMenuMac.mm */,
@@ -8576,7 +8579,6 @@
 				BC032D7B10F4378D0058C15A /* WebDragClient.h in Headers */,
 				BCA0EF9F12332642007D3CFB /* WebEditCommandProxy.h in Headers */,
 				BC032D7D10F4378D0058C15A /* WebEditorClient.h in Headers */,
-				1A433F0D113C53DD00FACDE9 /* WebErrors.h in Headers */,
 				BC032DB910F4380F0058C15A /* WebEvent.h in Headers */,
 				BC032DBB10F4380F0058C15A /* WebEventConversion.h in Headers */,
 				BC111B5D112F629800337BAB /* WebEventFactory.h in Headers */,
@@ -9009,6 +9011,7 @@
 				7C2413091AACFCB400A58C15 /* WKUserContentExtensionStoreRef.h in Headers */,
 				377EAD4817E2C77B002D193D /* WKUserContentInjectedFrames.h in Headers */,
 				F6113E29126CE19B0057D0A7 /* WKUserContentURLPattern.h in Headers */,
+				7AF236211E79A40800438A05 /* WebErrors.h in Headers */,
 				07297FA31C186ADB003F0735 /* WKUserMediaPermissionCheck.h in Headers */,
 				4A3CC18F19B07B8A00D14AEF /* WKUserMediaPermissionRequest.h in Headers */,
 				1AAF089B19267EE500B6390C /* WKUserScript.h in Headers */,
@@ -10154,7 +10157,6 @@
 				BC111A5E112F4FBB00337BAB /* WebEditorClient.cpp in Sources */,
 				2D28F3E61885CCC1004B9EAE /* WebEditorClientIOS.mm in Sources */,
 				C5237F6012441CA300780472 /* WebEditorClientMac.mm in Sources */,
-				BC111AE0112F5BC200337BAB /* WebErrorsMac.mm in Sources */,
 				C0337DAE127A24FE008FF4F4 /* WebEvent.cpp in Sources */,
 				BC032DBA10F4380F0058C15A /* WebEventConversion.cpp in Sources */,
 				BC111B5E112F629800337BAB /* WebEventFactory.mm in Sources */,
@@ -10171,6 +10173,7 @@
 				CD73BA4E131ACDB700EEDED2 /* WebFullScreenManagerMessageReceiver.cpp in Sources */,
 				CD6F75F4131B66D000D6B21E /* WebFullScreenManagerProxy.cpp in Sources */,
 				CD73BA47131ACC9A00EEDED2 /* WebFullScreenManagerProxyMessageReceiver.cpp in Sources */,
+				7AF236231E79A44400438A05 /* WebErrorsCocoa.mm in Sources */,
 				515BE1AA1D555A9B00DD7C68 /* WebGamepad.cpp in Sources */,
 				515BE1771D53FE8700DD7C68 /* WebGamepadProvider.cpp in Sources */,
 				BC1BE1E112D54A410004A228 /* WebGeolocationClient.cpp in Sources */,
@@ -10515,6 +10518,7 @@
 				BC407609124FF0270068F20A /* WKURL.cpp in Sources */,
 				BC40761B124FF0370068F20A /* WKURLCF.mm in Sources */,
 				BC40760B124FF0270068F20A /* WKURLRequest.cpp in Sources */,
+				7AF236201E79A3E400438A05 /* WebErrors.cpp in Sources */,
 				BC40762A124FF0400068F20A /* WKURLRequestNS.mm in Sources */,
 				BC40760D124FF0270068F20A /* WKURLResponse.cpp in Sources */,
 				BC40762C124FF0400068F20A /* WKURLResponseNS.mm in Sources */,

Deleted: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h (214933 => 214934)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h	2017-04-05 07:41:53 UTC (rev 214934)
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2010-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.
- */
-
-#pragma once
-
-namespace WebCore {
-    class URL;
-    class ResourceError;
-    class ResourceRequest;
-    class ResourceResponse;
-}
-
-namespace WebKit {
-
-WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&);
-WebCore::ResourceError blockedError(const WebCore::ResourceRequest&);
-WebCore::ResourceError blockedByContentBlockerError(const WebCore::ResourceRequest&);
-WebCore::ResourceError cannotShowURLError(const WebCore::ResourceRequest&);
-WebCore::ResourceError interruptedForPolicyChangeError(const WebCore::ResourceRequest&);
-#if ENABLE(CONTENT_FILTERING)
-WebCore::ResourceError blockedByContentFilterError(const WebCore::ResourceRequest&);
-#endif
-WebCore::ResourceError cannotShowMIMETypeError(const WebCore::ResourceResponse&);
-WebCore::ResourceError fileDoesNotExistError(const WebCore::ResourceResponse&);
-WebCore::ResourceError pluginWillHandleLoadError(const WebCore::ResourceResponse&);
-WebCore::ResourceError internalError(const WebCore::URL&);
-
-} // namespace WebKit

Deleted: trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp (214933 => 214934)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Portions Copyright (c) 2010 Motorola Mobility, Inc.  All rights reserved.
- * Copyright (C) 2011 Igalia S.L.
- *
- * 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 "WebErrors.h"
-
-#include "APIError.h"
-#include <WebCore/ErrorsGtk.h>
-#include <WebCore/ResourceError.h>
-#include <WebCore/ResourceRequest.h>
-#include <WebCore/ResourceResponse.h>
-#include <WebKit/WKErrorRef.h>
-#include <glib/gi18n-lib.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-ResourceError cancelledError(const ResourceRequest& request)
-{
-    return WebCore::cancelledError(request);
-}
-
-ResourceError blockedError(const ResourceRequest& request)
-{
-    return WebCore::blockedError(request);
-}
-
-ResourceError blockedByContentBlockerError(const ResourceRequest& request)
-{
-    return WebCore::blockedByContentBlockerError(request);
-}
-
-ResourceError cannotShowURLError(const ResourceRequest& request)
-{
-    return WebCore::cannotShowURLError(request);
-}
-
-ResourceError interruptedForPolicyChangeError(const ResourceRequest& request)
-{
-    return WebCore::interruptedForPolicyChangeError(request);
-}
-
-ResourceError cannotShowMIMETypeError(const ResourceResponse& response)
-{
-    return WebCore::cannotShowMIMETypeError(response);
-}
-
-ResourceError fileDoesNotExistError(const ResourceResponse& response)
-{
-    return WebCore::fileDoesNotExistError(response);
-}
-
-ResourceError pluginWillHandleLoadError(const ResourceResponse& response)
-{
-    return WebCore::pluginWillHandleLoadError(response);
-}
-
-WebCore::ResourceError internalError(const WebCore::URL& url)
-{
-    return ResourceError(API::Error::webKitErrorDomain(), kWKErrorInternal, url, _("Internal error"));
-}
-
-} // namespace WebKit

Deleted: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebErrorsMac.mm (214933 => 214934)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebErrorsMac.mm	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebErrorsMac.mm	2017-04-05 07:41:53 UTC (rev 214934)
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2010-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 "WebErrors.h"
-
-#import "APIError.h"
-#import "WKErrorRef.h"
-#import <WebCore/LocalizedStrings.h>
-#import <WebCore/ResourceRequest.h>
-#import <WebCore/ResourceResponse.h>
-
-using namespace WebCore;
-using namespace WebKit;
-
-namespace WebKit {
-
-static RetainPtr<NSError> createNSError(NSString* domain, int code, NSURL *URL)
-{
-    NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:
-        URL, @"NSErrorFailingURLKey",
-        [URL absoluteString], @"NSErrorFailingURLStringKey",
-        nil];
-
-    return adoptNS([[NSError alloc] initWithDomain:domain code:code userInfo:userInfo]);
-}
-
-// Use NSError's if available.
-
-ResourceError cancelledError(const ResourceRequest& request)
-{
-    return ResourceError(createNSError(NSURLErrorDomain, NSURLErrorCancelled, request.url()).get());
-}
-
-ResourceError fileDoesNotExistError(const ResourceResponse& response)
-{
-    return ResourceError(createNSError(NSURLErrorDomain, NSURLErrorFileDoesNotExist, response.url()).get());
-}
-
-
-// Otherwise, fallback to our own errors.
-
-ResourceError blockedError(const ResourceRequest& request)
-{
-    return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodeCannotUseRestrictedPort, request.url(), WEB_UI_STRING("Not allowed to use restricted network port", "WebKitErrorCannotUseRestrictedPort description"));
-}
-
-ResourceError blockedByContentBlockerError(const ResourceRequest& request)
-{
-    return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodeFrameLoadBlockedByContentBlocker, request.url(), WEB_UI_STRING("The URL was blocked by a content blocker", "WebKitErrorBlockedByContentBlocker description"));
-}
-
-ResourceError cannotShowURLError(const ResourceRequest& request)
-{
-    return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodeCannotShowURL, request.url(), WEB_UI_STRING("The URL can’t be shown", "WebKitErrorCannotShowURL description"));
-}
-
-ResourceError interruptedForPolicyChangeError(const ResourceRequest& request)
-{
-    return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodeFrameLoadInterruptedByPolicyChange, request.url(), WEB_UI_STRING("Frame load interrupted", "WebKitErrorFrameLoadInterruptedByPolicyChange description"));
-}
-
-#if ENABLE(CONTENT_FILTERING)
-ResourceError blockedByContentFilterError(const ResourceRequest& request)
-{
-    return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodeFrameLoadBlockedByContentFilter, request.url(), WEB_UI_STRING("The URL was blocked by a content filter", "WebKitErrorFrameLoadBlockedByContentFilter description"));
-}
-#endif
-
-ResourceError cannotShowMIMETypeError(const ResourceResponse& response)
-{
-    return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodeCannotShowMIMEType, response.url(), WEB_UI_STRING("Content with specified MIME type can’t be shown", "WebKitErrorCannotShowMIMEType description"));
-}
-
-ResourceError pluginWillHandleLoadError(const ResourceResponse& response)
-{
-    return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodePlugInWillHandleLoad, response.url(), WEB_UI_STRING("Plug-in handled load", "WebKitErrorPlugInWillHandleLoad description"));
-}
-
-ResourceError internalError(const URL& url)
-{
-    return ResourceError(API::Error::webKitErrorDomain(), kWKErrorInternal, url, WEB_UI_STRING("WebKit encountered an internal error", "WebKitErrorInternal description"));
-}
-
-} // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp (214933 => 214934)


--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp	2017-04-05 07:39:35 UTC (rev 214933)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp	2017-04-05 07:41:53 UTC (rev 214934)
@@ -27,11 +27,11 @@
 #include "WebPrintOperationGtk.h"
 
 #include "WebCoreArgumentCoders.h"
+#include "WebErrors.h"
 #include "WebPage.h"
 #include "WebPageProxyMessages.h"
 #include "WebProcess.h"
 #include <WebCore/DocumentLoader.h>
-#include <WebCore/ErrorsGtk.h>
 #include <WebCore/Frame.h>
 #include <WebCore/IntRect.h>
 #include <WebCore/NotImplemented.h>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to