Commit 84a69979 authored by cblu's avatar cblu

Fixed: 3061174 - javascript: URLs sent by plugins don't work

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3d0d1816
2002-11-20 Chris Blumenberg <cblu@apple.com>
Fixed: 3061174 - javascript: URLs sent by plugins don't work
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]):
2002-11-20 Darin Adler <darin@apple.com>
* English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
......
2002-11-20 Chris Blumenberg <cblu@apple.com>
Fixed: 3061174 - javascript: URLs sent by plugins don't work
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]):
2002-11-20 Darin Adler <darin@apple.com>
* English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
......
......@@ -792,18 +792,28 @@ - (NPError)loadRequest:(WebResourceRequest *)request inTarget:(NSString *)target
return NPERR_INVALID_URL;
}
} else {
WebFrame *frame = [[self webFrame] findOrCreateFramedNamed:target];
[frame loadRequest:request];
if (notifyData) {
if (![target isEqualToString:@"_self"] && ![target isEqualToString:@"_current"] &&
![target isEqualToString:@"_parent"] && ![target isEqualToString:@"_top"]) {
[streamNotifications setObject:[NSValue valueWithPointer:notifyData] forKey:URL];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(frameStateChanged:) name:WebFrameStateChangedNotification object:frame];
}
}
if([[URL scheme] isEqualToString:@"javascript"]){
NSString *JSString = [[URL absoluteString] substringFromIndex:11];
[[self controller] stringByEvaluatingJavaScriptFromString:JSString];
if(notifyData){
NPP_URLNotify(instance, [[URL absoluteString] cString], NPRES_DONE, notifyData);
}
}else{
WebFrame *frame = [[self webFrame] findOrCreateFramedNamed:target];
[frame loadRequest:request];
if (notifyData) {
if (![target isEqualToString:@"_self"] && ![target isEqualToString:@"_current"] &&
![target isEqualToString:@"_parent"] && ![target isEqualToString:@"_top"]) {
[streamNotifications setObject:[NSValue valueWithPointer:notifyData] forKey:URL];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(frameStateChanged:)
name:WebFrameStateChangedNotification
object:frame];
}
}
}
}
return NPERR_NO_ERROR;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment