[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:54:36 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit ec5c44a4b5c38bed6f460d841b24fe4ad6eb333b
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 26 00:27:02 2002 +0000
- Fix case where we would name a new window _blank
- If a data source can't be created for a plug-in request, don't create the frame or open a window.
- cleaned up plug-in stream notifications
* Plugins.subproj/WebBaseNetscapePluginView.h:
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView initWithFrame:]): create streamNotifications dict
(-[WebBaseNetscapePluginView dealloc]): release streamNotifications dict
(-[WebBaseNetscapePluginView frameStateChanged:]): cleaned up
(-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): create data source before frame
* Plugins.subproj/WebPluginController.m:
(-[WebPluginController showURL:inFrame:]): create data source before frame
* WebView.subproj/WebControllerPrivate.m:
(-[WebController _setTopLevelFrameName:]): don't allow _blank frames
* WebView.subproj/WebFrame.m:
(-[WebFrame findOrCreateFramedNamed:]): no need to check for _blank
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 5b1db41..995321f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,22 @@
+2002-10-25 Chris Blumenberg <cblu at apple.com>
+
+ - Fix case where we would name a new window _blank
+ - If a data source can't be created for a plug-in request, don't create the frame or open a window.
+ - cleaned up plug-in stream notifications
+
+ * Plugins.subproj/WebBaseNetscapePluginView.h:
+ * Plugins.subproj/WebBaseNetscapePluginView.m:
+ (-[WebBaseNetscapePluginView initWithFrame:]): create streamNotifications dict
+ (-[WebBaseNetscapePluginView dealloc]): release streamNotifications dict
+ (-[WebBaseNetscapePluginView frameStateChanged:]): cleaned up
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): create data source before frame
+ * Plugins.subproj/WebPluginController.m:
+ (-[WebPluginController showURL:inFrame:]): create data source before frame
+ * WebView.subproj/WebControllerPrivate.m:
+ (-[WebController _setTopLevelFrameName:]): don't allow _blank frames
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame findOrCreateFramedNamed:]): no need to check for _blank
+
2002-10-25 Darin Adler <darin at apple.com>
Tighten up the code that observes mouse moved events.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 5b1db41..995321f 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,22 @@
+2002-10-25 Chris Blumenberg <cblu at apple.com>
+
+ - Fix case where we would name a new window _blank
+ - If a data source can't be created for a plug-in request, don't create the frame or open a window.
+ - cleaned up plug-in stream notifications
+
+ * Plugins.subproj/WebBaseNetscapePluginView.h:
+ * Plugins.subproj/WebBaseNetscapePluginView.m:
+ (-[WebBaseNetscapePluginView initWithFrame:]): create streamNotifications dict
+ (-[WebBaseNetscapePluginView dealloc]): release streamNotifications dict
+ (-[WebBaseNetscapePluginView frameStateChanged:]): cleaned up
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): create data source before frame
+ * Plugins.subproj/WebPluginController.m:
+ (-[WebPluginController showURL:inFrame:]): create data source before frame
+ * WebView.subproj/WebControllerPrivate.m:
+ (-[WebController _setTopLevelFrameName:]): don't allow _blank frames
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame findOrCreateFramedNamed:]): no need to check for _blank
+
2002-10-25 Darin Adler <darin at apple.com>
Tighten up the code that observes mouse moved events.
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h
index 4ffbee8..deb3950 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h
@@ -39,7 +39,7 @@
NSURL *baseURL;
NSTrackingRectTag trackingTag;
NSMutableArray *streams;
- NSMutableDictionary *notificationData;
+ NSMutableDictionary *streamNotifications;
NPP_NewProcPtr NPP_New;
NPP_DestroyProcPtr NPP_Destroy;
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
index 907d99b..2c79277 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
@@ -595,7 +595,7 @@
canRestart = YES;
streams = [[NSMutableArray alloc] init];
- notificationData = [[NSMutableDictionary alloc] init];
+ streamNotifications = [[NSMutableDictionary alloc] init];
return self;
}
@@ -614,7 +614,8 @@
[streams release];
[MIMEType release];
[baseURL release];
- [notificationData release];
+ [streamNotifications removeAllObjects];
+ [streamNotifications release];
free(cAttributes);
free(cValues);
[super dealloc];
@@ -728,24 +729,19 @@
- (void)frameStateChanged:(NSNotification *)notification
{
- WebFrame *frame;
- WebFrameState frameState;
- NSValue *notifyDataValue;
- void *notifyData;
- NSURL *URL;
+ WebFrame *frame = [notification object];
+ NSURL *URL = [[[frame dataSource] request] URL];
+ NSValue *notifyDataValue = [streamNotifications objectForKey:URL];
- frame = [notification object];
- URL = [[[frame dataSource] request] URL];
- notifyDataValue = [notificationData objectForKey:URL];
-
if(!notifyDataValue){
return;
}
- notifyData = [notifyDataValue pointerValue];
- frameState = [[[notification userInfo] objectForKey:WebCurrentFrameState] intValue];
+ void *notifyData = [notifyDataValue pointerValue];
+ WebFrameState frameState = [[[notification userInfo] objectForKey:WebCurrentFrameState] intValue];
if (frameState == WebFrameStateComplete) {
NPP_URLNotify(instance, [[URL absoluteString] cString], NPRES_DONE, notifyData);
+ [streamNotifications removeObjectForKey:URL];
}
//FIXME: Need to send other NPReasons
}
@@ -791,26 +787,25 @@
return NPERR_INVALID_URL;
}
}else{
- WebFrame *frame = [[self webFrame] findOrCreateFramedNamed:target];
-
- if(notifyData){
- if(![target isEqualToString:@"_self"] && ![target isEqualToString:@"_current"] &&
- ![target isEqualToString:@"_parent"] && ![target isEqualToString:@"_top"]){
+ WebDataSource *dataSource = [[WebDataSource alloc] initWithRequest:request];
- [notificationData setObject:[NSValue valueWithPointer:notifyData] forKey:URL];
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(frameStateChanged:) name:WebFrameStateChangedNotification object:frame];
+ if(dataSource){
+ WebFrame *frame = [[self webFrame] findOrCreateFramedNamed:target];
+ if ([frame setProvisionalDataSource:dataSource]) {
+ 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];
+ }
+ }
+
+ [frame startLoading];
}
- // Plug-in docs say to return NPERR_INVALID_PARAM here
- // but IE allows an NPP_*URLNotify when the target is _self, _current, _parent or _top
- // so we have to allow this as well. Needed for iTools.
- }
-
- WebDataSource *dataSource = [[WebDataSource alloc] initWithRequest:request];
- if ([frame setProvisionalDataSource:dataSource]) {
- [frame startLoading];
+ [dataSource release];
}
- [dataSource release];
}
return NPERR_NO_ERROR;
diff --git a/WebKit/Plugins.subproj/WebPluginController.m b/WebKit/Plugins.subproj/WebPluginController.m
index 68fa807..053d299 100644
--- a/WebKit/Plugins.subproj/WebPluginController.m
+++ b/WebKit/Plugins.subproj/WebPluginController.m
@@ -97,13 +97,13 @@
return;
}
- WebFrame *otherFrame = [frame findOrCreateFramedNamed:target];
-
WebDataSource *dataSource = [[WebDataSource alloc] initWithRequest:[WebResourceRequest requestWithURL:URL]];
if(!dataSource){
return;
}
+ WebFrame *otherFrame = [frame findOrCreateFramedNamed:target];
+
if([otherFrame setProvisionalDataSource:dataSource]){
[otherFrame startLoading];
}
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 3903f23..e858eb9 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -215,8 +215,11 @@
- (void)_setTopLevelFrameName:(NSString *)name
{
- [_private->topLevelFrameName release];
- _private->topLevelFrameName = [name retain];
+ // It's wrong to name a frame "_blank".
+ if(![name isEqualToString:@"_blank"]){
+ [_private->topLevelFrameName release];
+ _private->topLevelFrameName = [name retain];
+ }
}
- (WebFrame *)_frameInThisWindowNamed:(NSString *)name
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 5670ef8..64a181c 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -238,12 +238,8 @@
WebController *controller = [[[self controller] windowOperationsDelegate]
createWindowWithURL:nil referrer:[[self _bridge] referrer]];
- if(![name isEqualToString:@"_blank"]){
- [controller _setTopLevelFrameName:name];
- }
-
+ [controller _setTopLevelFrameName:name];
[[controller windowOperationsDelegate] showWindow];
-
frame = [controller mainFrame];
}
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 3903f23..e858eb9 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -215,8 +215,11 @@
- (void)_setTopLevelFrameName:(NSString *)name
{
- [_private->topLevelFrameName release];
- _private->topLevelFrameName = [name retain];
+ // It's wrong to name a frame "_blank".
+ if(![name isEqualToString:@"_blank"]){
+ [_private->topLevelFrameName release];
+ _private->topLevelFrameName = [name retain];
+ }
}
- (WebFrame *)_frameInThisWindowNamed:(NSString *)name
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list