Title: [121423] trunk/Source/WebCore
Revision
121423
Author
[email protected]
Date
2012-06-28 02:36:04 -0700 (Thu, 28 Jun 2012)

Log Message

[Qt] plugin is loaded to the web process via MainResourceLoader::substituteMIMETypeFromPluginDatabase
https://bugs.webkit.org/show_bug.cgi?id=86489

Reviewed by Simon Hausmann.

Removed the substituteMIMETypeFromPluginDatabase quirk from
MainResourceLoader. It would be possible to fix it in a way
that is compatible with WebKit2, but given that it was a Qt
only fix, and that it's not clear that we still need it, and
it's not even work currently, I decided to remove it. At least
it is -1 platform ifdef in common code.

Just removed a non-tested quirk, no test needed.

* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::didReceiveResponse):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121422 => 121423)


--- trunk/Source/WebCore/ChangeLog	2012-06-28 09:30:28 UTC (rev 121422)
+++ trunk/Source/WebCore/ChangeLog	2012-06-28 09:36:04 UTC (rev 121423)
@@ -1,3 +1,22 @@
+2012-06-28  Balazs Kelemen  <[email protected]>
+
+        [Qt] plugin is loaded to the web process via MainResourceLoader::substituteMIMETypeFromPluginDatabase
+        https://bugs.webkit.org/show_bug.cgi?id=86489
+
+        Reviewed by Simon Hausmann.
+
+        Removed the substituteMIMETypeFromPluginDatabase quirk from
+        MainResourceLoader. It would be possible to fix it in a way
+        that is compatible with WebKit2, but given that it was a Qt
+        only fix, and that it's not clear that we still need it, and
+        it's not even work currently, I decided to remove it. At least
+        it is -1 platform ifdef in common code.
+
+        Just removed a non-tested quirk, no test needed.
+
+        * loader/MainResourceLoader.cpp:
+        (WebCore::MainResourceLoader::didReceiveResponse):
+
 2012-06-28  Kentaro Hara  <[email protected]>
 
         [V8] Optimize Integer::New() by caching persistent handles for small integers

Modified: trunk/Source/WebCore/loader/MainResourceLoader.cpp (121422 => 121423)


--- trunk/Source/WebCore/loader/MainResourceLoader.cpp	2012-06-28 09:30:28 UTC (rev 121422)
+++ trunk/Source/WebCore/loader/MainResourceLoader.cpp	2012-06-28 09:36:04 UTC (rev 121423)
@@ -352,29 +352,6 @@
     deref(); // balances ref in didReceiveResponse
 }
 
-#if PLATFORM(QT)
-void MainResourceLoader::substituteMIMETypeFromPluginDatabase(const ResourceResponse& r)
-{
-    if (!m_frame->loader()->subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
-        return;
-
-    String filename = r.url().lastPathComponent();
-    if (filename.endsWith('/'))
-        return;
-
-    size_t extensionPos = filename.reverseFind('.');
-    if (extensionPos == notFound)
-        return;
-
-    String extension = filename.substring(extensionPos + 1);
-    String mimeType = PluginDatabase::installedPlugins()->MIMETypeForExtension(extension);
-    if (!mimeType.isEmpty()) {
-        ResourceResponse* response = const_cast<ResourceResponse*>(&r);
-        response->setMimeType(mimeType);
-    }
-}
-#endif
-
 void MainResourceLoader::didReceiveResponse(const ResourceResponse& r)
 {
     if (documentLoader()->applicationCacheHost()->maybeLoadFallbackForMainResponse(request(), r))
@@ -399,11 +376,6 @@
     ASSERT(shouldLoadAsEmptyDocument(r.url()) || !defersLoading());
 #endif
 
-#if PLATFORM(QT)
-    if (r.mimeType() == "application/octet-stream")
-        substituteMIMETypeFromPluginDatabase(r);
-#endif
-
     if (m_loadingMultipartContent) {
         frameLoader()->activeDocumentLoader()->setupForReplaceByMIMEType(r.mimeType());
         clearResourceData();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to