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 cant be found", "WebKitErrorCannotFindPlugin description");
break;
case PluginStatusCanNotLoadPlugin:
errorCode = WebKitErrorCannotLoadPlugIn;
+ description = WEB_UI_STRING("The plug-in cant 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 cant 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 cant 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()));