Unreviewed, rolling out r100448.
authorjesus@webkit.org <jesus@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Nov 2011 16:57:11 +0000 (16:57 +0000)
committerjesus@webkit.org <jesus@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Nov 2011 16:57:11 +0000 (16:57 +0000)
http://trac.webkit.org/changeset/100448
https://bugs.webkit.org/show_bug.cgi?id=72512

It caused a regression breaking LayoutTests/http/tests/loading
/text-content-type-with-binary-extension.html (Requested by
jeez_ on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-11-16

* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::canShowMIMEType):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100459 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

index a23973b..3853341 100644 (file)
@@ -1,3 +1,16 @@
+2011-11-16  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r100448.
+        http://trac.webkit.org/changeset/100448
+        https://bugs.webkit.org/show_bug.cgi?id=72512
+
+        It caused a regression breaking LayoutTests/http/tests/loading
+        /text-content-type-with-binary-extension.html (Requested by
+        jeez_ on #webkit).
+
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::canShowMIMEType):
+
 2011-11-16  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
 
         [Qt] FrameLoaderClientQt::canShowMIMEType should always return true
index fafc29f..04b1e3f 100644 (file)
@@ -650,10 +650,25 @@ bool FrameLoaderClientQt::canShowMIMETypeAsHTML(const String& MIMEType) const
     notImplemented();
     return false;
 }
-
+    
 bool FrameLoaderClientQt::canShowMIMEType(const String& MIMEType) const
 {
-    return true;
+    String type = MIMEType;
+    type.makeLower();
+    if (MIMETypeRegistry::isSupportedImageMIMEType(type))
+        return true;
+
+    if (MIMETypeRegistry::isSupportedNonImageMIMEType(type))
+        return true;
+
+    if (MIMETypeRegistry::isSupportedMediaMIMEType(type))
+        return true;
+
+    if (m_frame && m_frame->settings()  && m_frame->settings()->arePluginsEnabled()
+        && PluginDatabase::installedPlugins()->isMIMETypeRegistered(type))
+        return true;
+
+    return false;
 }
 
 bool FrameLoaderClientQt::representationExistsForURLScheme(const String&) const