summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/Plugins/WebPluginController.mm
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/mac/Plugins/WebPluginController.mm')
-rw-r--r--WebKit/mac/Plugins/WebPluginController.mm84
1 files changed, 44 insertions, 40 deletions
diff --git a/WebKit/mac/Plugins/WebPluginController.mm b/WebKit/mac/Plugins/WebPluginController.mm
index 54d9615..357cf7b 100644
--- a/WebKit/mac/Plugins/WebPluginController.mm
+++ b/WebKit/mac/Plugins/WebPluginController.mm
@@ -27,12 +27,27 @@
*/
-#import <WebKit/WebPluginController.h>
-
+#import "WebPluginController.h"
+
+#import "DOMNodeInternal.h"
+#import "WebDataSourceInternal.h"
+#import "WebFrameInternal.h"
+#import "WebFrameView.h"
+#import "WebHTMLViewPrivate.h"
+#import "WebKitErrorsPrivate.h"
+#import "WebKitLogging.h"
+#import "WebNSURLExtras.h"
+#import "WebNSViewExtras.h"
+#import "WebPlugin.h"
+#import "WebPluginContainer.h"
+#import "WebPluginContainerCheck.h"
+#import "WebPluginPackage.h"
+#import "WebPluginPrivate.h"
+#import "WebPluginViewFactory.h"
+#import "WebUIDelegate.h"
+#import "WebViewInternal.h"
#import <Foundation/NSURLRequest.h>
-#import <runtime/JSLock.h>
#import <WebCore/DocumentLoader.h>
-#import <WebCore/DOMNodeInternal.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/HTMLMediaElement.h>
@@ -42,22 +57,7 @@
#import <WebCore/ResourceRequest.h>
#import <WebCore/ScriptController.h>
#import <WebCore/WebCoreURLResponse.h>
-#import <WebKit/WebDataSourceInternal.h>
-#import <WebKit/WebFrameInternal.h>
-#import <WebKit/WebFrameView.h>
-#import <WebKit/WebHTMLViewPrivate.h>
-#import <WebKit/WebKitErrorsPrivate.h>
-#import <WebKit/WebKitLogging.h>
-#import <WebKit/WebNSURLExtras.h>
-#import <WebKit/WebNSViewExtras.h>
-#import <WebKit/WebPlugin.h>
-#import <WebKit/WebPluginContainer.h>
-#import <WebKit/WebPluginContainerCheck.h>
-#import <WebKit/WebPluginPackage.h>
-#import <WebKit/WebPluginPrivate.h>
-#import <WebKit/WebPluginViewFactory.h>
-#import <WebKit/WebUIDelegate.h>
-#import <WebKit/WebViewInternal.h>
+#import <runtime/JSLock.h>
using namespace WebCore;
using namespace HTMLNames;
@@ -90,10 +90,10 @@ static NSMutableSet *pluginViews = nil;
NSView *view = nil;
if ([viewFactory respondsToSelector:@selector(plugInViewWithArguments:)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
view = [viewFactory plugInViewWithArguments:arguments];
} else if ([viewFactory respondsToSelector:@selector(pluginViewWithArguments:)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
view = [viewFactory pluginViewWithArguments:arguments];
}
@@ -147,10 +147,10 @@ static NSMutableSet *pluginViews = nil;
for (i = 0; i < count; i++) {
id aView = [_views objectAtIndex:i];
if ([aView respondsToSelector:@selector(webPlugInStart)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView webPlugInStart];
} else if ([aView respondsToSelector:@selector(pluginStart)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView pluginStart];
}
}
@@ -170,10 +170,10 @@ static NSMutableSet *pluginViews = nil;
for (i = 0; i < count; i++) {
id aView = [_views objectAtIndex:i];
if ([aView respondsToSelector:@selector(webPlugInStop)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView webPlugInStop];
} else if ([aView respondsToSelector:@selector(pluginStop)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView pluginStop];
}
}
@@ -197,10 +197,10 @@ static NSMutableSet *pluginViews = nil;
LOG(Plugins, "initializing plug-in %@", view);
if ([view respondsToSelector:@selector(webPlugInInitialize)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view webPlugInInitialize];
} else if ([view respondsToSelector:@selector(pluginInitialize)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view pluginInitialize];
}
@@ -210,15 +210,15 @@ static NSMutableSet *pluginViews = nil;
if (_started) {
LOG(Plugins, "starting plug-in %@", view);
if ([view respondsToSelector:@selector(webPlugInStart)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view webPlugInStart];
} else if ([view respondsToSelector:@selector(pluginStart)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view pluginStart];
}
if ([view respondsToSelector:@selector(setContainingWindow:)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view setContainingWindow:[_documentView window]];
}
}
@@ -230,24 +230,26 @@ static NSMutableSet *pluginViews = nil;
if ([_views containsObject:view]) {
if (_started) {
if ([view respondsToSelector:@selector(webPlugInStop)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view webPlugInStop];
} else if ([view respondsToSelector:@selector(pluginStop)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view pluginStop];
}
}
if ([view respondsToSelector:@selector(webPlugInDestroy)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view webPlugInDestroy];
} else if ([view respondsToSelector:@selector(pluginDestroy)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view pluginDestroy];
}
+#if ENABLE(NETSCAPE_PLUGIN_API)
if (Frame* frame = core([self webFrame]))
frame->script()->cleanupScriptObjectsForPlugin(self);
+#endif
[pluginViews removeObject:view];
[[_documentView _webView] removePluginInstanceView:view];
@@ -289,15 +291,17 @@ static void cancelOutstandingCheck(const void *item, void *context)
for (i = 0; i < count; i++) {
id aView = [_views objectAtIndex:i];
if ([aView respondsToSelector:@selector(webPlugInDestroy)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView webPlugInDestroy];
} else if ([aView respondsToSelector:@selector(pluginDestroy)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView pluginDestroy];
}
+#if ENABLE(NETSCAPE_PLUGIN_API)
if (Frame* frame = core([self webFrame]))
frame->script()->cleanupScriptObjectsForPlugin(self);
+#endif
[pluginViews removeObject:aView];
[[_documentView _webView] removePluginInstanceView:aView];
@@ -311,7 +315,7 @@ static void cancelOutstandingCheck(const void *item, void *context)
- (id)_webPluginContainerCheckIfAllowedToLoadRequest:(NSURLRequest *)request inFrame:(NSString *)target resultObject:(id)obj selector:(SEL)selector
{
- WebPluginContainerCheck *check = [WebPluginContainerCheck checkWithRequest:request target:target resultObject:obj selector:selector controller:self];
+ WebPluginContainerCheck *check = [WebPluginContainerCheck checkWithRequest:request target:target resultObject:obj selector:selector controller:self contextInfo:nil];
[_checksInProgress addObject:check];
[check start];
@@ -419,7 +423,7 @@ static void cancelOutstandingCheck(const void *item, void *context)
contentURL:[response URL]
pluginPageURL:nil
pluginName:nil // FIXME: Get this from somewhere
- MIMEType:[response _webcore_MIMEType]];
+ MIMEType:[response MIMEType]];
[_dataSource _documentLoader]->cancelMainResourceLoad(error);
[error release];
}
@@ -451,7 +455,7 @@ static WebCore::HTMLMediaElement* mediaProxyClient(DOMElement* element)
return nil;
}
- Node* node = [element _node];
+ Element* node = core(element);
if (!node || (!node->hasTagName(HTMLNames::videoTag) && !node->hasTagName(HTMLNames::audioTag))) {
LOG_ERROR("invalid media element passed");
return nil;