diff options
| author | Patrick Scott <phanna@android.com> | 2010-01-13 14:10:56 -0500 |
|---|---|---|
| committer | Patrick Scott <phanna@android.com> | 2010-01-13 14:22:41 -0500 |
| commit | 6916255e3bc5760bcaac2ec7d5057e057bd3de6a (patch) | |
| tree | bfd350a7de72fa71328f0f9ed864a41542533b91 /WebKit/android/WebCoreSupport | |
| parent | ab9c9800ae22385fd019e1f6a366fc5346d041aa (diff) | |
| download | external_webkit-6916255e3bc5760bcaac2ec7d5057e057bd3de6a.zip external_webkit-6916255e3bc5760bcaac2ec7d5057e057bd3de6a.tar.gz external_webkit-6916255e3bc5760bcaac2ec7d5057e057bd3de6a.tar.bz2 | |
Call into MimeTypeMap to get the mime type for an extension.
Use the default method to obtain the content type of a plugin. Implement
extension to mime type by calling into the java map.
Requires a small change to the webkit package.
Bug: 2368893
Diffstat (limited to 'WebKit/android/WebCoreSupport')
| -rw-r--r-- | WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp | 30 |
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 |
