Title: [155003] branches/safari-537.60-branch/Source/WebKit/win

Diff

Modified: branches/safari-537.60-branch/Source/WebKit/win/ChangeLog (155002 => 155003)


--- branches/safari-537.60-branch/Source/WebKit/win/ChangeLog	2013-09-03 22:14:51 UTC (rev 155002)
+++ branches/safari-537.60-branch/Source/WebKit/win/ChangeLog	2013-09-03 22:20:55 UTC (rev 155003)
@@ -1,5 +1,28 @@
 2013-09-03  Lucas Forschler  <[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-09-03  Lucas Forschler  <[email protected]>
+
         Merge r154759
 
     2013-08-27  Brent Fulgham  <[email protected]>

Modified: branches/safari-537.60-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (155002 => 155003)


--- branches/safari-537.60-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2013-09-03 22:14:51 UTC (rev 155002)
+++ branches/safari-537.60-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2013-09-03 22:20:55 UTC (rev 155003)
@@ -63,6 +63,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>
@@ -814,12 +815,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’t be found", "WebKitErrorCannotFindPlugin description");
             break;
         case PluginStatusCanNotLoadPlugin:
             errorCode = WebKitErrorCannotLoadPlugIn;
+            description = WEB_UI_STRING("The plug-in can’t be loaded", "WebKitErrorCannotLoadPlugin description");
             break;
         default:
             ASSERT_NOT_REACHED();

Modified: branches/safari-537.60-branch/Source/WebKit/win/WebFrame.cpp (155002 => 155003)


--- branches/safari-537.60-branch/Source/WebKit/win/WebFrame.cpp	2013-09-03 22:14:51 UTC (rev 155002)
+++ branches/safari-537.60-branch/Source/WebKit/win/WebFrame.cpp	2013-09-03 22:20:55 UTC (rev 155003)
@@ -82,6 +82,7 @@
 #include <WebCore/HTMLPlugInElement.h>
 #include <WebCore/JSDOMWindow.h>
 #include <WebCore/KeyboardEvent.h>
+#include <WebCore/LocalizedStrings.h>
 #include <WebCore/MouseRelatedEvent.h>
 #include <WebCore/NotImplemented.h>
 #include <WebCore/Page.h>
@@ -1650,42 +1651,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 WebFrame::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 descriptiondescriptiondescription"));
 }
 
 ResourceError WebFrame::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’t be shown", "WebKitErrorCannotShowURL description"));
 }
 
 ResourceError WebFrame::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 WebFrame::cannotShowMIMETypeError(const ResourceResponse&)
 {
-    notImplemented();
-    return ResourceError();
+    return ResourceError(String(), WebKitErrorCannotShowMIMEType, response.url().string(), WEB_UI_STRING("Content with specified MIME type can’t be shown", "WebKitErrorCannotShowMIMEType description"));
 }
 
 ResourceError WebFrame::fileDoesNotExistError(const ResourceResponse&)
 {
-    notImplemented();
-    return ResourceError();
+    return ResourceError(String(WebURLErrorDomain), -1100, response.url().string(), String("File does not exist."));
 }
 
 ResourceError WebFrame::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 WebFrame::shouldFallBack(const ResourceError& error)
@@ -1858,7 +1854,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()));
      
     resourceLoadDelegate->plugInFailedWithError(d->webView, error.get(), getWebDataSource(d->frame->loader()->documentLoader()));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to