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();