summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-04-30 12:18:03 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-04-30 12:18:32 (GMT)
commitbc6a6f5fea11ec90f91ca3a0765afcbf620c10a5 (patch)
tree24c1252d578195735db89533ec0833b88cac93de
parente84d5d76cf2def894aeef8d8dae22578e36c4285 (diff)
downloadQt-bc6a6f5fea11ec90f91ca3a0765afcbf620c10a5.zip
Qt-bc6a6f5fea11ec90f91ca3a0765afcbf620c10a5.tar.gz
Qt-bc6a6f5fea11ec90f91ca3a0765afcbf620c10a5.tar.bz2
Updated WebKit to 540ae4ccd25609e1bfe1673195ce126255e36774
This should fix the createPluginWithPluginsDisabled autotest.
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog65
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.h4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/MIMETypeRegistryMac.mm5
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp6
7 files changed, 87 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index 5c76b5c..c750e67 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-540ae4ccd25609e1bfe1673195ce126255e36774
+8941bee5706ef2171ed5def63834deefc7440d11
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 3b7a26b..23cae67 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from
and has the sha1 checksum
- 2c346f58ae70470d88dcd856bfe59b04a144b65a
+ 540ae4ccd25609e1bfe1673195ce126255e36774
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 8db76e8..b8825bd 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,68 @@
+2010-03-27 Robert Hogan <robert@webkit.org>
+
+ Reviewed by nobody, fix typo in previous commit.
+
+ Allow plugins implemented by the application, such as mimetype 'x-qt-plugin',
+ when pluginsEnabled is false
+
+ Fix parentheses typo in r56661. This happened while rebasing and was not present
+ in the reviewed patch, so committing unreviewed.
+
+ https://bugs.webkit.org/attachment.cgi?id=49515
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::requestObject):
+
+2010-03-26 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Simon Hausmann.
+
+ Allow plugins implemented by the application, such as mimetype 'x-qt-plugin',
+ when pluginsEnabled is false.
+
+ The purpose of disabling plugins is to prevent the execution of third-party code
+ that may be untrustworthy. Qt plugins are implemented by the client rather than
+ loaded from an external source, so the client should have the opportunity to
+ consider them separately from other plugins.
+
+ Add a function MimeTypeRegistry::isApplicationPluginMIMEType() that WebKit
+ uses in conjunction with arePluginsEnabled() to determine if it should attempt
+ to load a plugin. If isApplicationPluginMIMEType() returns true, WebKit will load
+ the plugin even if arePluginsEnabled() is false.
+
+ Currently, only Qt has application-implemented plugins: these use the mimetype
+ 'x-qt-plugin' and 'x-qt-styled-widget'. This patch permits Qt clients'
+ reimplementation of QWebPage::createPlugin() to decide whether or not
+ to create a Qt plugin, even when arePluginsEnabled is false.
+
+ For all platforms apart from Qt, isApplicationPluginMIMEType() returns false.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32196
+
+ Test: plugins/application-plugin-plugins-disabled.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::requestObject):
+ * platform/MIMETypeRegistry.h:
+ * platform/brew/MIMETypeRegistryBrew.cpp:
+ (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
+ * platform/chromium/MIMETypeRegistryChromium.cpp:
+ (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
+ * platform/gtk/MIMETypeRegistryGtk.cpp:
+ (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
+ * platform/haiku/MIMETypeRegistryHaiku.cpp:
+ (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
+ * platform/mac/MIMETypeRegistryMac.mm:
+ (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
+ * platform/qt/MIMETypeRegistryQt.cpp:
+ (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
+ * platform/win/MIMETypeRegistryWin.cpp:
+ (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
+ * platform/wince/MIMETypeRegistryWince.cpp:
+ (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
+ * platform/wx/MimeTypeRegistryWx.cpp:
+ (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
+
2010-04-29 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
index 0323e97..316caab 100644
--- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
@@ -1274,7 +1274,11 @@ bool FrameLoader::requestObject(RenderEmbeddedObject* renderer, const String& ur
bool useFallback;
if (shouldUsePlugin(completedURL, mimeType, renderer->hasFallbackContent(), useFallback)) {
Settings* settings = m_frame->settings();
- if (!allowPlugins(AboutToInstantiatePlugin)
+ if ((!allowPlugins(AboutToInstantiatePlugin)
+ // Application plugins are plugins implemented by the user agent, for example Qt plugins,
+ // as opposed to third-party code such as flash. The user agent decides whether or not they are
+ // permitted, rather than WebKit.
+ && !MIMETypeRegistry::isApplicationPluginMIMEType(mimeType))
|| (!settings->isJavaEnabled() && MIMETypeRegistry::isJavaAppletMIMEType(mimeType)))
return false;
if (isDocumentSandboxed(SandboxPlugins))
diff --git a/src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.h b/src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.h
index 8801ac1..27c2c3a 100644
--- a/src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.h
+++ b/src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.h
@@ -67,6 +67,10 @@ public:
// Check to see if a mime type is a valid Java applet mime type
static bool isJavaAppletMIMEType(const String& mimeType);
+ // Check to see if a mime type is a plugin implemented by the
+ // browser (e.g. a Qt Plugin).
+ static bool isApplicationPluginMIMEType(const String& mimeType);
+
static HashSet<String>& getSupportedImageMIMETypes();
static HashSet<String>& getSupportedImageResourceMIMETypes();
static HashSet<String>& getSupportedImageMIMETypesForEncoding();
diff --git a/src/3rdparty/webkit/WebCore/platform/mac/MIMETypeRegistryMac.mm b/src/3rdparty/webkit/WebCore/platform/mac/MIMETypeRegistryMac.mm
index 7d43505..82348e0 100644
--- a/src/3rdparty/webkit/WebCore/platform/mac/MIMETypeRegistryMac.mm
+++ b/src/3rdparty/webkit/WebCore/platform/mac/MIMETypeRegistryMac.mm
@@ -56,4 +56,9 @@ String MIMETypeRegistry::getPreferredExtensionForMIMEType(const String& type)
return wkGetPreferredExtensionForMIMEType(type);
}
+bool MIMETypeRegistry::isApplicationPluginMIMEType(const String&)
+{
+ return false;
+}
+
}
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp
index 22cee6f..4161f81 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp
@@ -82,4 +82,10 @@ String MIMETypeRegistry::getMIMETypeForExtension(const String &ext)
return "application/octet-stream";
}
+bool MIMETypeRegistry::isApplicationPluginMIMEType(const String& mimeType)
+{
+ return mimeType.startsWith("application/x-qt-plugin", false)
+ || mimeType.startsWith("application/x-qt-styled-widget", false);
+}
+
}