[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
andersca at apple.com
andersca at apple.com
Tue Jan 5 23:54:16 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 8ebfffff50ae349930f0bc8ebae1521c95c716f2
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 18 21:17:38 2009 +0000
Add a useProxiedOpenPanel WebPreference and tunnel it through to the plug-in host.
Reviewed by Sam Weinig.
* Plugins/Hosted/NetscapePluginHostManager.h:
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::hostForPackage):
(WebKit::NetscapePluginHostManager::spawnPluginHost):
(WebKit::NetscapePluginHostManager::instantiatePlugin):
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences usesProxiedOpenPanel]):
(-[WebPreferences setUsesProxiedOpenPanel:]):
* WebView/WebPreferencesPrivate.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj
index 0a906b7..d4bd625 100644
--- a/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -1931,9 +1931,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 1C904FD20BA9DD0F0081E9D0 /* WebKit.xcconfig */;
buildSettings = {
- BUILD_VARIANTS = (
- normal,
- );
+ BUILD_VARIANTS = normal;
OTHER_LDFLAGS = (
"$(OTHER_LDFLAGS)",
"-lWebKitSystemInterface",
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index bf6808c..f7438b0 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,21 @@
+2009-12-18 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add a useProxiedOpenPanel WebPreference and tunnel it through to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPackage):
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences usesProxiedOpenPanel]):
+ (-[WebPreferences setUsesProxiedOpenPanel:]):
+ * WebView/WebPreferencesPrivate.h:
+
2009-12-18 Sam Weinig <sam at webkit.org>
Reviewed by Anders Carlsson.
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
index 9e29062..a4dcdf1 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
@@ -52,12 +52,12 @@ public:
void didCreateWindow();
private:
- NetscapePluginHostProxy* hostForPackage(WebNetscapePluginPackage *);
+ NetscapePluginHostProxy* hostForPackage(WebNetscapePluginPackage *, bool useProxiedOpenPanel);
NetscapePluginHostManager();
~NetscapePluginHostManager();
- bool spawnPluginHost(WebNetscapePluginPackage *, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN);
+ bool spawnPluginHost(WebNetscapePluginPackage *, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN, bool useProxiedOpenPanel);
bool initializeVendorPort();
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
index 6b36a6d..01b08ce 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
@@ -31,7 +31,10 @@
#import "NetscapePluginInstanceProxy.h"
#import "WebLocalizableStrings.h"
#import "WebKitSystemInterface.h"
+#import "WebHostedNetscapePluginView.h"
#import "WebNetscapePluginPackage.h"
+#import "WebPreferencesPrivate.h"
+#import "WebView.h"
#import <mach/mach_port.h>
#import <servers/bootstrap.h>
#import <spawn.h>
@@ -66,7 +69,7 @@ NetscapePluginHostManager::~NetscapePluginHostManager()
{
}
-NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePluginPackage *package)
+NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePluginPackage *package, bool useProxiedOpenPanel)
{
pair<PluginHostMap::iterator, bool> result = m_pluginHosts.add(package, 0);
@@ -82,7 +85,7 @@ NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePl
mach_port_t pluginHostPort;
ProcessSerialNumber pluginHostPSN;
- if (!spawnPluginHost(package, clientPort, pluginHostPort, pluginHostPSN)) {
+ if (!spawnPluginHost(package, clientPort, pluginHostPort, pluginHostPSN, useProxiedOpenPanel)) {
mach_port_destroy(mach_task_self(), clientPort);
m_pluginHosts.remove(result.first);
return 0;
@@ -100,7 +103,7 @@ NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePl
return hostProxy;
}
-bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *package, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN)
+bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *package, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN, bool useProxiedOpenPanel)
{
if (m_pluginVendorPort == MACH_PORT_NULL) {
if (!initializeVendorPort())
@@ -213,7 +216,8 @@ void NetscapePluginHostManager::pluginHostDied(NetscapePluginHostProxy* pluginHo
PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(WebNetscapePluginPackage *pluginPackage, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled)
{
- NetscapePluginHostProxy* hostProxy = hostForPackage(pluginPackage);
+ WebPreferences *preferences = [[pluginView webView] preferences];
+ NetscapePluginHostProxy* hostProxy = hostForPackage(pluginPackage, [preferences usesProxiedOpenPanel]);
if (!hostProxy)
return 0;
@@ -251,7 +255,7 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl
pluginHostDied(hostProxy);
// Try to spawn it again.
- hostProxy = hostForPackage(pluginPackage);
+ hostProxy = hostForPackage(pluginPackage, [preferences usesProxiedOpenPanel]);
// Create a new instance.
instance = NetscapePluginInstanceProxy::create(hostProxy, pluginView, fullFrame);
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index d295323..58c70f6 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -88,6 +88,7 @@
#define WebKitShowDebugBordersPreferenceKey @"WebKitShowDebugBorders"
#define WebKitShowRepaintCounterPreferenceKey @"WebKitShowRepaintCounter"
#define WebKitWebGLEnabledPreferenceKey @"WebKitWebGLEnabled"
+#define WebKitUsesProxiedOpenPanelPreferenceKey @"WebKitUsesProxiedOpenPanelPreferenceKey"
#define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime"
// These are private both because callers should be using the cover methods and because the
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index 6b55ea3..d06cc13 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -351,9 +351,10 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:YES], WebKitZoomsTextOnlyPreferenceKey,
[NSNumber numberWithBool:YES], WebKitXSSAuditorEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAcceleratedCompositingEnabledPreferenceKey,
- [NSNumber numberWithBool:NO], WebKitShowDebugBordersPreferenceKey,
- [NSNumber numberWithBool:NO], WebKitShowRepaintCounterPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitShowDebugBordersPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitShowRepaintCounterPreferenceKey,
[NSNumber numberWithBool:NO], WebKitWebGLEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitUsesProxiedOpenPanelPreferenceKey,
[NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey,
nil];
@@ -1183,6 +1184,16 @@ static NSString *classIBCreatorID = nil;
[self _setBoolValue:enabled forKey:WebKitWebGLEnabledPreferenceKey];
}
+- (BOOL)usesProxiedOpenPanel
+{
+ return [self _boolValueForKey:WebKitUsesProxiedOpenPanelPreferenceKey];
+}
+
+- (void)setUsesProxiedOpenPanel:(BOOL)enabled
+{
+ [self _setBoolValue:enabled forKey:WebKitUsesProxiedOpenPanelPreferenceKey];
+}
+
- (unsigned)pluginAllowedRunTime
{
return [self _integerValueForKey:WebKitPluginAllowedRunTimePreferenceKey];
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 3cea78b..20c98b2 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -158,6 +158,9 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)webGLEnabled;
- (void)setWebGLEnabled:(BOOL)enabled;
+- (BOOL)usesProxiedOpenPanel;
+- (void)setUsesProxiedOpenPanel:(BOOL)enabled;
+
// Other private methods
- (void)_postPreferencesChangesNotification;
+ (WebPreferences *)_getInstanceForIdentifier:(NSString *)identifier;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list