Title: [97399] trunk/Source/WebKit2
Revision
97399
Author
je...@webkit.org
Date
2011-10-13 14:20:59 -0700 (Thu, 13 Oct 2011)

Log Message

[Qt][WK2] WebErrorsQt.cpp duplicates code from WKError.h and WebError.h
https://bugs.webkit.org/show_bug.cgi?id=70053

Reviewed by Kenneth Rohde Christiansen.

Now we will be aligned with WKError.h and WebError.h by using the shared
and pre-defined enum for error codes and WebError::webkitErrorDomain().

* WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
(WebKit::blockedError):
(WebKit::cannotShowURLError):
(WebKit::interruptedForPolicyChangeError):
(WebKit::cannotShowMIMETypeError):
(WebKit::pluginWillHandleLoadError):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (97398 => 97399)


--- trunk/Source/WebKit2/ChangeLog	2011-10-13 21:16:27 UTC (rev 97398)
+++ trunk/Source/WebKit2/ChangeLog	2011-10-13 21:20:59 UTC (rev 97399)
@@ -1,5 +1,22 @@
 2011-10-13  Jesus Sanchez-Palencia  <jesus.palen...@openbossa.org>
 
+        [Qt][WK2] WebErrorsQt.cpp duplicates code from WKError.h and WebError.h
+        https://bugs.webkit.org/show_bug.cgi?id=70053
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Now we will be aligned with WKError.h and WebError.h by using the shared
+        and pre-defined enum for error codes and WebError::webkitErrorDomain().
+
+        * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
+        (WebKit::blockedError):
+        (WebKit::cannotShowURLError):
+        (WebKit::interruptedForPolicyChangeError):
+        (WebKit::cannotShowMIMETypeError):
+        (WebKit::pluginWillHandleLoadError):
+
+2011-10-13  Jesus Sanchez-Palencia  <jesus.palen...@openbossa.org>
+
         [Qt][WK2] WebViews are emitting loadFailed for "private" error codes
         https://bugs.webkit.org/show_bug.cgi?id=70047
 

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp (97398 => 97399)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp	2011-10-13 21:16:27 UTC (rev 97398)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp	2011-10-13 21:20:59 UTC (rev 97399)
@@ -27,6 +27,8 @@
 #include "config.h"
 #include "WebErrors.h"
 
+#include "WKError.h"
+#include "WebError.h"
 #include <WebCore/ResourceError.h>
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/ResourceResponse.h>
@@ -38,18 +40,6 @@
 
 namespace WebKit {
 
-// copied from WebKit/Misc/WebKitErrors[Private].h
-enum {
-    WebKitErrorCannotShowMIMEType =                             100,
-    WebKitErrorCannotShowURL =                                  101,
-    WebKitErrorFrameLoadInterruptedByPolicyChange =             102,
-    WebKitErrorCannotUseRestrictedPort =                        103,
-    WebKitErrorCannotFindPlugIn =                               200,
-    WebKitErrorCannotLoadPlugIn =                               201,
-    WebKitErrorJavaUnavailable =                                202,
-    WebKitErrorPluginWillHandleLoad =                           203
-};
-
 ResourceError cancelledError(const ResourceRequest& request)
 {
     ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().string(),
@@ -60,25 +50,25 @@
 
 ResourceError blockedError(const ResourceRequest& request)
 {
-    return ResourceError("WebKit", WebKitErrorCannotUseRestrictedPort, request.url().string(),
+    return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeCannotUseRestrictedPort, request.url().string(),
                          QCoreApplication::translate("QWebFrame", "Request blocked", 0, QCoreApplication::UnicodeUTF8));
 }
 
 ResourceError cannotShowURLError(const ResourceRequest& request)
 {
-    return ResourceError("WebKit", WebKitErrorCannotShowURL, request.url().string(),
+    return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeCannotShowURL, request.url().string(),
                          QCoreApplication::translate("QWebFrame", "Cannot show URL", 0, QCoreApplication::UnicodeUTF8));
 }
 
 ResourceError interruptedForPolicyChangeError(const ResourceRequest& request)
 {
-    return ResourceError("WebKit", WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(),
+    return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeFrameLoadInterruptedByPolicyChange, request.url().string(),
                          QCoreApplication::translate("QWebFrame", "Frame load interrupted by policy change", 0, QCoreApplication::UnicodeUTF8));
 }
 
 ResourceError cannotShowMIMETypeError(const ResourceResponse& response)
 {
-    return ResourceError("WebKit", WebKitErrorCannotShowMIMEType, response.url().string(),
+    return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeCannotShowMIMEType, response.url().string(),
                          QCoreApplication::translate("QWebFrame", "Cannot show mimetype", 0, QCoreApplication::UnicodeUTF8));
 }
 
@@ -90,7 +80,7 @@
 
 ResourceError pluginWillHandleLoadError(const ResourceResponse& response)
 {
-    return ResourceError("WebKit", WebKitErrorPluginWillHandleLoad, response.url().string(),
+    return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodePlugInWillHandleLoad, response.url().string(),
                          QCoreApplication::translate("QWebFrame", "Loading is handled by the media engine", 0, QCoreApplication::UnicodeUTF8));
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to