[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
aestes at apple.com
aestes at apple.com
Wed Dec 22 14:53:35 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 58313ef8286b01fa16403658bd2e77b781462787
Author: aestes at apple.com <aestes at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 23 02:26:18 2010 +0000
WebKit shouldn't load a plug-in based on file extension if a MIME type
is specified.
https://bugs.webkit.org/show_bug.cgi?id=48046
Reviewed by Adam Roben and Sam Weinig.
WebCore:
The fix landed in r70332 only covered the Mac port. Implement this fix
for other ports as well.
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::findPlugin):
WebKit2:
The fix landed in r70332 only covered the Mac port. Implement this fix
for WebKit2 as well.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::findPlugin):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 57674c7..0b98c88 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-22 Andy Estes <aestes at apple.com>
+
+ Reviewed by Adam Roben and Sam Weinig.
+
+ WebKit shouldn't load a plug-in based on file extension if a MIME type
+ is specified.
+ https://bugs.webkit.org/show_bug.cgi?id=48046
+
+ The fix landed in r70332 only covered the Mac port. Implement this fix
+ for other ports as well.
+
+ * plugins/PluginDatabase.cpp:
+ (WebCore::PluginDatabase::findPlugin):
+
2010-10-21 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel, Peter Kasting, and Darin Fisher.
diff --git a/WebCore/plugins/PluginDatabase.cpp b/WebCore/plugins/PluginDatabase.cpp
index 7f46758..cf96b00 100644
--- a/WebCore/plugins/PluginDatabase.cpp
+++ b/WebCore/plugins/PluginDatabase.cpp
@@ -279,26 +279,26 @@ String PluginDatabase::MIMETypeForExtension(const String& extension) const
PluginPackage* PluginDatabase::findPlugin(const KURL& url, String& mimeType)
{
- PluginPackage* plugin = pluginForMIMEType(mimeType);
- String filename = url.string();
-
+ if (!mimeType.isEmpty())
+ return pluginForMIMEType(mimeType);
+
+ String filename = url.lastPathComponent();
+ if (filename.endsWith("/"))
+ return 0;
+
+ int extensionPos = filename.reverseFind('.');
+ if (extensionPos == -1)
+ return 0;
+
+ String mimeTypeForExtension = MIMETypeForExtension(filename.substring(extensionPos + 1));
+ PluginPackage* plugin = pluginForMIMEType(mimeTypeForExtension);
if (!plugin) {
- String filename = url.lastPathComponent();
- if (!filename.endsWith("/")) {
- int extensionPos = filename.reverseFind('.');
- if (extensionPos != -1) {
- String extension = filename.substring(extensionPos + 1);
-
- String mimeTypeForExtension = MIMETypeForExtension(extension);
- if ((plugin = pluginForMIMEType(mimeTypeForExtension)))
- mimeType = mimeTypeForExtension;
- }
- }
+ // FIXME: if no plugin could be found, query Windows for the mime type
+ // corresponding to the extension.
+ return 0;
}
-
- // FIXME: if no plugin could be found, query Windows for the mime type
- // corresponding to the extension.
-
+
+ mimeType = mimeTypeForExtension;
return plugin;
}
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 5469216..789213d 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-22 Andy Estes <aestes at apple.com>
+
+ Reviewed by Adam Roben and Sam Weinig.
+
+ WebKit shouldn't load a plug-in based on file extension if a MIME type
+ is specified.
+ https://bugs.webkit.org/show_bug.cgi?id=48046
+
+ The fix landed in r70332 only covered the Mac port. Implement this fix
+ for WebKit2 as well.
+
+ * UIProcess/Plugins/PluginInfoStore.cpp:
+ (WebKit::PluginInfoStore::findPlugin):
+
2010-10-22 Anders Carlsson <andersca at apple.com>
Fix clang++ build.
diff --git a/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp b/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp
index 22f4678..4db9784 100644
--- a/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp
+++ b/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp
@@ -187,7 +187,7 @@ PluginInfoStore::Plugin PluginInfoStore::findPlugin(String& mimeType, const KURL
// Next, check if any plug-ins claim to support the URL extension.
String extension = pathExtension(url).lower();
- if (!extension.isNull()) {
+ if (!extension.isNull() && mimeType.isEmpty()) {
Plugin plugin = findPluginForExtension(extension, mimeType);
if (!plugin.path.isNull())
return plugin;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list