diff options
Diffstat (limited to 'Source/WebKit/wince/WebCoreSupport')
4 files changed, 18 insertions, 6 deletions
diff --git a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp index 3fbed2b..2d8812f 100644 --- a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp +++ b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> + * Copyright (C) 2011 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -35,7 +36,10 @@ #include "Page.h" #include "PluginDatabase.h" #include "RenderPart.h" +#include "SystemInfo.h" +#include "WebKitVersion.h" #include "WebView.h" +#include <wtf/text/StringConcatenate.h> using namespace WebCore; @@ -54,7 +58,14 @@ FrameLoaderClientWinCE::~FrameLoaderClientWinCE() String FrameLoaderClientWinCE::userAgent(const KURL&) { - return "WebKitWinCE"; + DEFINE_STATIC_LOCAL(String, userAgentString, ()); + + if (userAgentString.isNull()) { + String webKitVersion = String::format("%d.%d", WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION); + userAgentString = makeString("Mozilla/5.0 (", windowsVersionForUAString(), ") AppleWebKit/", webKitVersion, " (KHTML, like Gecko) Mobile Safari/", webKitVersion); + } + + return userAgentString; } PassRefPtr<DocumentLoader> FrameLoaderClientWinCE::createDocumentLoader(const WebCore::ResourceRequest& request, const SubstituteData& substituteData) @@ -182,9 +193,9 @@ PassRefPtr<Widget> FrameLoaderClientWinCE::createJavaAppletWidget(const IntSize& return 0; } -ObjectContentType FrameLoaderClientWinCE::objectContentType(const KURL& url, const String& mimeType) +ObjectContentType FrameLoaderClientWinCE::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages) { - return FrameLoader::defaultObjectContentType(url, mimeType); + return FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages); } String FrameLoaderClientWinCE::overrideMediaType() const diff --git a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h index ce3a620..401225d 100644 --- a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h +++ b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> + * Copyright (C) 2011 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -120,7 +121,7 @@ public: virtual void registerForIconNotification(bool); - virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WTF::String& mimeType); + virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages); virtual void setMainFrameDocumentReady(bool); diff --git a/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp b/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp index fc447ab..455da71 100644 --- a/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp +++ b/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp @@ -289,7 +289,7 @@ String PlatformStrategiesWinCE::contextMenuItemTagSearchWeb() return UI_STRING("Search with Google", "Search in Google context menu item"); } -String PlatformStrategiesWinCE::contextMenuItemTagLookUpInDictionary() +String PlatformStrategiesWinCE::contextMenuItemTagLookUpInDictionary(const String&) { return UI_STRING("Look Up in Dictionary", "Look Up in Dictionary context menu item"); } diff --git a/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h b/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h index e5f87ea..6ed49ae 100644 --- a/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h +++ b/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h @@ -78,7 +78,7 @@ private: virtual WTF::String contextMenuItemTagIgnoreSpelling(); virtual WTF::String contextMenuItemTagLearnSpelling(); virtual WTF::String contextMenuItemTagSearchWeb(); - virtual WTF::String contextMenuItemTagLookUpInDictionary(); + virtual WTF::String contextMenuItemTagLookUpInDictionary(const String&); virtual WTF::String contextMenuItemTagOpenLink(); virtual WTF::String contextMenuItemTagIgnoreGrammar(); virtual WTF::String contextMenuItemTagSpellingMenu(); |