[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

commit-queue at webkit.org commit-queue at webkit.org
Sun Feb 20 22:49:54 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 553f1f3c82252af791a4c80e2d8672486b8f37c8
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 12 00:33:21 2011 +0000

    2011-01-11  Nicolas Dufresne  <nicolas.dufresne at collabora.co.uk>
    
            Reviewed by Adam Barth.
    
            Use plug-in DB for extensions to MIME type convertion
    
            Plugins extension to MIME type conversion was not used in the
            frameLoader. This was causing some fallback to be use which as the side
            effect of loosing all the <OBJECT> parameters or <EMBED> attributes.
            This patch ensure that we try to convert the extension to MIME type
            using the plugin database beofre using this fallback.
    
            Attribute lost with Flash plugin without mime type set
            https://bugs.webkit.org/show_bug.cgi?id=50657
    
            * plugins/no-mime-with-valid-extension.html: Added.
            * plugins/no-mime-with-valid-extension-expected.txt: Added.
    2011-01-11  Nicolas Dufresne  <nicolas.dufresne at collabora.co.uk>
    
            Reviewed by Adam Barth.
    
            Use plug-in DB for extensions to MIME type convertion
    
            Plugins extension to MIME type conversion was not used in the
            frameLoader. This was causing some fallback to be use which as the side
            effect of loosing all the <OBJECT> parameters or <EMBED> attributes.
            This patch ensure that we try to convert the extension to MIME type
            using the plugin database beofre using this fallback.
    
            Attribute lost with Flash plugin without mime type set
            https://bugs.webkit.org/show_bug.cgi?id=50657
    
            Test: plugins/no-mime-with-valid-extension.html
    
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::defaultObjectContentType): Use PluginDatabase for MIME
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75567 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f98f469..456556f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,21 @@
+2011-01-11  Nicolas Dufresne  <nicolas.dufresne at collabora.co.uk>
+
+        Reviewed by Adam Barth.
+
+        Use plug-in DB for extensions to MIME type convertion
+
+        Plugins extension to MIME type conversion was not used in the
+        frameLoader. This was causing some fallback to be use which as the side
+        effect of loosing all the <OBJECT> parameters or <EMBED> attributes.
+        This patch ensure that we try to convert the extension to MIME type
+        using the plugin database beofre using this fallback.
+
+        Attribute lost with Flash plugin without mime type set
+        https://bugs.webkit.org/show_bug.cgi?id=50657
+
+        * plugins/no-mime-with-valid-extension.html: Added.
+        * plugins/no-mime-with-valid-extension-expected.txt: Added.
+
 2011-01-11  Justin Schuh  <jschuh at chromium.org>
 
         Unreviewed, test expectations update.
diff --git a/LayoutTests/plugins/no-mime-with-valid-extension-expected.txt b/LayoutTests/plugins/no-mime-with-valid-extension-expected.txt
new file mode 100644
index 0000000..31e2386
--- /dev/null
+++ b/LayoutTests/plugins/no-mime-with-valid-extension-expected.txt
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 0: PLUGIN: src: resources/test.testnetscape
+This test checks that bug 50568 is fixed. It runs logSrc test as found in the test plugin which prints the src attribute to stdout. If the bug is present, the logSrc attrbitute that triggers the test will be lost and nothing will be displayed on screen. Upon success, this test should display the src attribute.
+
+
diff --git a/LayoutTests/plugins/no-mime-with-valid-extension.html b/LayoutTests/plugins/no-mime-with-valid-extension.html
new file mode 100644
index 0000000..3b06f27
--- /dev/null
+++ b/LayoutTests/plugins/no-mime-with-valid-extension.html
@@ -0,0 +1,19 @@
+<script>
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        layoutTestController.waitUntilDone();
+    }
+</script>
+<p>
+This test checks that <a href="https://bugs.webkit.org/show_bug.cgi?id=50657">bug 50568</a>
+is fixed. It runs logSrc test as found in the test plugin which prints the src attribute
+to stdout. If the bug is present, the logSrc attrbitute that triggers the test will be lost
+and nothing will be displayed on screen. Upon success, this test should display the src
+attribute.
+</p>
+<!-- Embed tag with missing type="" parameter -->
+<embed id="plugin" name="plugin" src="resources/test.testnetscape" logSrc="1">
+<script>
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+</script>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 803e5f1..1f41dcb 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2011-01-11  Nicolas Dufresne  <nicolas.dufresne at collabora.co.uk>
+
+        Reviewed by Adam Barth.
+
+        Use plug-in DB for extensions to MIME type convertion
+
+        Plugins extension to MIME type conversion was not used in the
+        frameLoader. This was causing some fallback to be use which as the side
+        effect of loosing all the <OBJECT> parameters or <EMBED> attributes.
+        This patch ensure that we try to convert the extension to MIME type
+        using the plugin database beofre using this fallback.
+
+        Attribute lost with Flash plugin without mime type set
+        https://bugs.webkit.org/show_bug.cgi?id=50657
+
+        Test: plugins/no-mime-with-valid-extension.html
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::defaultObjectContentType): Use PluginDatabase for MIME
+
 2011-01-11  James Simonsen  <simonjam at chromium.org>
 
         Reviewed by Eric Seidel.
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
index 7f9e913..0df8db6 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
@@ -960,9 +960,16 @@ void FrameLoader::loadArchive(PassRefPtr<Archive> prpArchive)
 ObjectContentType FrameLoader::defaultObjectContentType(const KURL& url, const String& mimeTypeIn)
 {
     String mimeType = mimeTypeIn;
+    String extension = url.path().substring(url.path().reverseFind('.') + 1);
+
     // We don't use MIMETypeRegistry::getMIMETypeForPath() because it returns "application/octet-stream" upon failure
     if (mimeType.isEmpty())
-        mimeType = MIMETypeRegistry::getMIMETypeForExtension(url.path().substring(url.path().reverseFind('.') + 1));
+        mimeType = MIMETypeRegistry::getMIMETypeForExtension(extension);
+
+#if !PLATFORM(MAC) && !PLATFORM(CHROMIUM) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL
+    if (mimeType.isEmpty())
+        mimeType = PluginDatabase::installedPlugins()->MIMETypeForExtension(extension);
+#endif
 
     if (mimeType.isEmpty())
         return ObjectContentFrame; // Go ahead and hope that we can display the content.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list