[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
eric at webkit.org
eric at webkit.org
Thu Feb 4 21:24:29 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 152ce60eb966d973c1a8aa139c47c8275aae17c6
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 22 07:11:24 2010 +0000
2010-01-21 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
[chromium] Add allowPlugins callback to allow per-site enabling of plugins
https://bugs.webkit.org/show_bug.cgi?id=33974
Add a callback into the FrameLoaderClient to let the embedder enable or
disable plugins on a per-site basis.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::requestObject):
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::allowPlugins):
2010-01-21 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
[chromium] Add allowPlugins callback to allow per-site enabling of plugins
https://bugs.webkit.org/show_bug.cgi?id=33974
Forward the new allowPlugins callback to WebKitClient so that it can
make the policy decision.
* public/WebFrameClient.h:
(WebKit::WebFrameClient::allowPlugins):
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::allowJavaScript):
(WebKit::FrameLoaderClientImpl::allowPlugins):
* src/FrameLoaderClientImpl.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1ebc6ad..c660715 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-01-21 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Add allowPlugins callback to allow per-site enabling of plugins
+ https://bugs.webkit.org/show_bug.cgi?id=33974
+
+ Add a callback into the FrameLoaderClient to let the embedder enable or
+ disable plugins on a per-site basis.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::requestObject):
+ * loader/FrameLoaderClient.h:
+ (WebCore::FrameLoaderClient::allowPlugins):
+
2010-01-21 Tony Chang <tony at chromium.org>
Reviewed by Darin Adler.
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index 095dca6..7e7842e 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -1274,8 +1274,8 @@ bool FrameLoader::requestObject(RenderPart* renderer, const String& url, const A
bool useFallback;
if (shouldUsePlugin(completedURL, mimeType, renderer->hasFallbackContent(), useFallback)) {
Settings* settings = m_frame->settings();
- if (!settings || !settings->arePluginsEnabled() ||
- (!settings->isJavaEnabled() && MIMETypeRegistry::isJavaAppletMIMEType(mimeType)))
+ if (!m_client->allowPlugins(settings && settings->arePluginsEnabled())
+ || (!settings->isJavaEnabled() && MIMETypeRegistry::isJavaAppletMIMEType(mimeType)))
return false;
if (isSandboxed(SandboxPlugins))
return false;
diff --git a/WebCore/loader/FrameLoaderClient.h b/WebCore/loader/FrameLoaderClient.h
index 99505b8..642b701 100644
--- a/WebCore/loader/FrameLoaderClient.h
+++ b/WebCore/loader/FrameLoaderClient.h
@@ -257,6 +257,7 @@ namespace WebCore {
virtual void didChangeScrollOffset() { }
virtual bool allowJavaScript(bool enabledPerSettings) { return enabledPerSettings; }
+ virtual bool allowPlugins(bool enabledPerSettings) { return enabledPerSettings; }
};
} // namespace WebCore
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index ec51897..e16c7cc 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,20 @@
+2010-01-21 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Add allowPlugins callback to allow per-site enabling of plugins
+ https://bugs.webkit.org/show_bug.cgi?id=33974
+
+ Forward the new allowPlugins callback to WebKitClient so that it can
+ make the policy decision.
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::allowPlugins):
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::allowJavaScript):
+ (WebKit::FrameLoaderClientImpl::allowPlugins):
+ * src/FrameLoaderClientImpl.h:
+
2010-01-21 James Robinson <jamesr at chromium.org>
Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h
index 297eb62..e74113a 100644
--- a/WebKit/chromium/public/WebFrameClient.h
+++ b/WebKit/chromium/public/WebFrameClient.h
@@ -80,6 +80,8 @@ public:
// This frame is about to be closed.
virtual void willClose(WebFrame*) { }
+ // Controls whether plugins are allowed for this frame.
+ virtual bool allowPlugins(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }
// Load commands -------------------------------------------------------
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index cdeebed..4333c5d 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -164,6 +164,14 @@ bool FrameLoaderClientImpl::allowJavaScript(bool enabledPerSettings)
return enabledPerSettings;
}
+bool FrameLoaderClientImpl::allowPlugins(bool enabledPerSettings)
+{
+ if (m_webFrame->client())
+ return m_webFrame->client()->allowPlugins(m_webFrame, enabledPerSettings);
+
+ return enabledPerSettings;
+}
+
bool FrameLoaderClientImpl::hasWebView() const
{
return m_webFrame->viewImpl();
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h
index cbf084e..a273ce7 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -192,6 +192,7 @@ public:
virtual void registerForIconNotification(bool listen = true);
virtual void didChangeScrollOffset();
virtual bool allowJavaScript(bool enabledPerSettings);
+ virtual bool allowPlugins(bool enabledPerSettings);
private:
void makeDocumentView();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list