summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/mac/Plugins')
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm1
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.mm8
2 files changed, 8 insertions, 1 deletions
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index c0c480b..e03bc27 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -704,6 +704,7 @@ void NetscapePluginInstanceProxy::evaluateJavaScript(PluginRequest* pluginReques
NSData *JSData = [result dataUsingEncoding:NSUTF8StringEncoding];
RefPtr<HostedNetscapePluginStream> stream = HostedNetscapePluginStream::create(this, pluginRequest->requestID(), pluginRequest->request());
+ m_streams.add(stream->streamID(), stream);
RetainPtr<NSURLResponse> response(AdoptNS, [[NSURLResponse alloc] initWithURL:URL
MIMEType:@"text/plain"
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index 3d5d7a1..ff0ca77 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -661,13 +661,19 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
// Temporarily retain self in case the plug-in view is released while sending an event.
[[self retain] autorelease];
-
+
BOOL acceptedEvent;
[self willCallPlugInFunction];
+ // Set the pluginAllowPopup flag.
+ ASSERT(_eventHandler);
+ bool oldAllowPopups = frame->script()->allowPopupsFromPlugin();
+ frame->script()->setAllowPopupsFromPlugin(_eventHandler->currentEventIsUserGesture());
{
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
acceptedEvent = [_pluginPackage.get() pluginFuncs]->event(plugin, event);
}
+ // Restore the old pluginAllowPopup flag.
+ frame->script()->setAllowPopupsFromPlugin(oldAllowPopups);
[self didCallPlugInFunction];
if (portState) {