summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-01-13 11:51:46 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2010-01-13 11:51:46 -0800
commitccc6dd6b0e8e44376d1240aa859eda1919cdd095 (patch)
treeef57c498cd55890dade61713034ce9eec0f11110 /WebKit/android/WebCoreSupport
parent3bbaa0e0bda36b5a555a55d744d8f1b287b1df37 (diff)
parente4771f1b95589eff8479702dfbf5ef03c267c5c3 (diff)
downloadexternal_webkit-ccc6dd6b0e8e44376d1240aa859eda1919cdd095.zip
external_webkit-ccc6dd6b0e8e44376d1240aa859eda1919cdd095.tar.gz
external_webkit-ccc6dd6b0e8e44376d1240aa859eda1919cdd095.tar.bz2
am e4771f1b: am 6916255e: Call into MimeTypeMap to get the mime type for an extension.
Merge commit 'e4771f1b95589eff8479702dfbf5ef03c267c5c3' * commit 'e4771f1b95589eff8479702dfbf5ef03c267c5c3': Call into MimeTypeMap to get the mime type for an extension.
Diffstat (limited to 'WebKit/android/WebCoreSupport')
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index c928d46..cb361bf 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -1033,35 +1033,7 @@ WTF::PassRefPtr<Widget> FrameLoaderClientAndroid::createJavaAppletWidget(const I
// the contents and work out if it can render it.
ObjectContentType FrameLoaderClientAndroid::objectContentType(const KURL& url,
const String& mimeType) {
- if (mimeType.length() == 0)
- {
- // Guess the mimeType from the extension
- if (url.hasPath())
- {
- String path = url.path();
- int lastIndex = path.reverseFind('.');
- static const String image("image/");
- if (lastIndex >= 0)
- {
- String mime(path.substring(lastIndex + 1));
- mime.insert(image, 0);
- if (Image::supportsType(mime))
- return ObjectContentImage;
- }
- }
- return ObjectContentFrame;
- }
-
- if (Image::supportsType(mimeType))
- return ObjectContentImage;
-
- if (PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType))
- return ObjectContentOtherPlugin;
-
- if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType))
- return ObjectContentFrame;
-
- return ObjectContentNone;
+ return FrameLoader::defaultObjectContentType(url, mimeType);
}
// This function allows the application to set the correct CSS media