Title: [158215] branches/safari-537.73-branch/Source/WebKit/win
Revision
158215
Author
[email protected]
Date
2013-10-29 13:26:20 -0700 (Tue, 29 Oct 2013)

Log Message

Merge r154764

    2013-08-28  Brent Fulgham  <[email protected]> 

    [Windows] Provide useful error messages for WebKitErrorDomain errors 
    https://bugs.webkit.org/show_bug.cgi?id=120428 

    Reviewed by Anders Carlsson. 

    * WebCoreSupport/WebFrameLoaderClient.cpp: 
    (WebFrameLoaderClient::cancelledError): Provide text for this error. 
    (WebFrameLoaderClient::blockedError): Hook up WEB_UI_STRING for this error. 
    (WebFrameLoaderClient::cannotShowURLError): Ditto 
    (WebFrameLoaderClient::interruptedForPolicyChangeError): Ditto 
    (WebFrameLoaderClient::cannotShowMIMETypeError): Ditto 
    (WebFrameLoaderClient::fileDoesNotExistError): Provide text for this error. 
    (WebFrameLoaderClient::pluginWillHandleLoadError): Hook up WEB_UI_STRING for this error. 
    (WebFrameLoaderClient::dispatchDidFailToStartPlugin): Ditto. 
    (WebFrameLoaderClient::createJavaAppletWidget): Ditto. 
    (WebFrameLoaderClient::webHistory): Remove blank line above method. 

Modified Paths

Diff

Modified: branches/safari-537.73-branch/Source/WebKit/win/ChangeLog (158214 => 158215)


--- branches/safari-537.73-branch/Source/WebKit/win/ChangeLog	2013-10-29 20:25:44 UTC (rev 158214)
+++ branches/safari-537.73-branch/Source/WebKit/win/ChangeLog	2013-10-29 20:26:20 UTC (rev 158215)
@@ -1,5 +1,28 @@
 2013-10-29  Brent Fulgham  <[email protected]>
 
+        Merge r154764
+
+    2013-08-28  Brent Fulgham  <[email protected]> 
+
+            [Windows] Provide useful error messages for WebKitErrorDomain errors 
+            https://bugs.webkit.org/show_bug.cgi?id=120428 
+
+            Reviewed by Anders Carlsson. 
+
+            * WebCoreSupport/WebFrameLoaderClient.cpp: 
+            (WebFrameLoaderClient::cancelledError): Provide text for this error. 
+            (WebFrameLoaderClient::blockedError): Hook up WEB_UI_STRING for this error. 
+            (WebFrameLoaderClient::cannotShowURLError): Ditto 
+            (WebFrameLoaderClient::interruptedForPolicyChangeError): Ditto 
+            (WebFrameLoaderClient::cannotShowMIMETypeError): Ditto 
+            (WebFrameLoaderClient::fileDoesNotExistError): Provide text for this error. 
+            (WebFrameLoaderClient::pluginWillHandleLoadError): Hook up WEB_UI_STRING for this error. 
+            (WebFrameLoaderClient::dispatchDidFailToStartPlugin): Ditto. 
+            (WebFrameLoaderClient::createJavaAppletWidget): Ditto. 
+            (WebFrameLoaderClient::webHistory): Remove blank line above method. 
+
+2013-10-29  Brent Fulgham  <[email protected]>
+
         Merge r154759
 
     2013-08-27  Brent Fulgham  <[email protected]>

Modified: branches/safari-537.73-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (158214 => 158215)


--- branches/safari-537.73-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2013-10-29 20:25:44 UTC (rev 158214)
+++ branches/safari-537.73-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2013-10-29 20:26:20 UTC (rev 158215)
@@ -71,6 +71,7 @@
 #include <WebCore/HTMLParserIdioms.h>
 #include <WebCore/HTMLPlugInElement.h>
 #include <WebCore/HistoryItem.h>
+#include <WebCore/LocalizedStrings.h>
 #include <WebCore/Page.h>
 #include <WebCore/PluginPackage.h>
 #include <WebCore/PluginView.h>
@@ -874,42 +875,37 @@
 {
     // FIXME: Need ChickenCat to include CFNetwork/CFURLError.h to get these values
     // Alternatively, we could create our own error domain/codes.
-    return ResourceError(String(WebURLErrorDomain), -999, request.url().string(), String());
+    return ResourceError(String(WebURLErrorDomain), -999, request.url().string(), String("Cancelled"));
 }
 
 ResourceError WebFrameLoaderClient::blockedError(const ResourceRequest& request)
 {
-    // FIXME: Need to implement the String descriptions for errors in the WebKitErrorDomain and have them localized
-    return ResourceError(String(WebKitErrorDomain), WebKitErrorCannotUseRestrictedPort, request.url().string(), String());
+    return ResourceError(String(WebKitErrorDomain), WebKitErrorCannotUseRestrictedPort, request.url().string(), WEB_UI_STRING("Not allowed to use restricted network port", "WebKitErrorCannotUseRestrictedPort description"));
 }
 
 ResourceError WebFrameLoaderClient::cannotShowURLError(const ResourceRequest& request)
 {
-    // FIXME: Need to implement the String descriptions for errors in the WebKitErrorDomain and have them localized
-    return ResourceError(String(WebKitErrorDomain), WebKitErrorCannotShowURL, request.url().string(), String());
+    return ResourceError(String(WebKitErrorDomain), WebKitErrorCannotShowURL, request.url().string(), WEB_UI_STRING("The URL can\x92t be shown", "WebKitErrorCannotShowURL description"));
 }
 
 ResourceError WebFrameLoaderClient::interruptedForPolicyChangeError(const ResourceRequest& request)
 {
-    // FIXME: Need to implement the String descriptions for errors in the WebKitErrorDomain and have them localized
-    return ResourceError(String(WebKitErrorDomain), WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(), String());
+    return ResourceError(String(WebKitErrorDomain), WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(), WEB_UI_STRING("Frame load interrupted", "WebKitErrorFrameLoadInterruptedByPolicyChange description"));
 }
 
-ResourceError WebFrameLoaderClient::cannotShowMIMETypeError(const ResourceResponse&)
+ResourceError WebFrameLoaderClient::cannotShowMIMETypeError(const ResourceResponse& response)
 {
-    notImplemented();
-    return ResourceError();
+    return ResourceError(String(), WebKitErrorCannotShowMIMEType, response.url().string(), WEB_UI_STRING("Content with specified MIME type can\x92t be shown", "WebKitErrorCannotShowMIMEType description"));
 }
 
-ResourceError WebFrameLoaderClient::fileDoesNotExistError(const ResourceResponse&)
+ResourceError WebFrameLoaderClient::fileDoesNotExistError(const ResourceResponse& response)
 {
-    notImplemented();
-    return ResourceError();
+    return ResourceError(String(WebURLErrorDomain), -1100, response.url().string(), String("File does not exist."));
 }
 
 ResourceError WebFrameLoaderClient::pluginWillHandleLoadError(const ResourceResponse& response)
 {
-    return ResourceError(String(WebKitErrorDomain), WebKitErrorPlugInWillHandleLoad, response.url().string(), String());
+    return ResourceError(String(WebKitErrorDomain), WebKitErrorPlugInWillHandleLoad, response.url().string(), WEB_UI_STRING("Plug-in handled load", "WebKitErrorPlugInWillHandleLoad description"));
 }
 
 bool WebFrameLoaderClient::shouldFallBack(const ResourceError& error)
@@ -1149,12 +1145,15 @@
     userInfoBag->setDictionary(userInfo.get());
  
     int errorCode = 0;
+    String description;
     switch (pluginView->status()) {
         case PluginStatusCanNotFindPlugin:
             errorCode = WebKitErrorCannotFindPlugIn;
+            description = WEB_UI_STRING("The plug-in can\x92t be found", "WebKitErrorCannotFindPlugin description");
             break;
         case PluginStatusCanNotLoadPlugin:
             errorCode = WebKitErrorCannotLoadPlugIn;
+            description = WEB_UI_STRING("The plug-in can\x92t be loaded", "WebKitErrorCannotLoadPlugin description");
             break;
         default:
             ASSERT_NOT_REACHED();
@@ -1238,7 +1237,7 @@
 
     COMPtr<CFDictionaryPropertyBag> userInfoBag = CFDictionaryPropertyBag::createInstance();
 
-    ResourceError resourceError(String(WebKitErrorDomain), WebKitErrorJavaUnavailable, String(), String());
+    ResourceError resourceError(String(WebKitErrorDomain), WebKitErrorJavaUnavailable, String(), WEB_UI_STRING("Java is unavailable", "WebKitErrorJavaUnavailable description"));
     COMPtr<IWebError> error(AdoptCOM, WebError::createInstance(resourceError, userInfoBag.get()));
 
     Frame* coreFrame = core(m_webFrame);
@@ -1257,7 +1256,6 @@
     return WebHistory::sharedHistory();
 }
 
-
 String WebFrameLoaderClient::overrideMediaType() const
 {
     notImplemented();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to