[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 05:56:33 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 9bb0d59c902ae8dabefa16667850608e19946222
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Mar 4 21:22:29 2002 +0000
- Now, no stream is created when there is no URL passed to IFPluginView. This is done for the Java plug-in since it handles its own downloading/caching.
- IFPluginView can now handle nil arguments. This is for full-page non-embedded plug-ins.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/kwq/WCJavaAppletWidget.mm b/WebCore/kwq/WCJavaAppletWidget.mm
index 197df3e..0ecf18f 100644
--- a/WebCore/kwq/WCJavaAppletWidget.mm
+++ b/WebCore/kwq/WCJavaAppletWidget.mm
@@ -41,7 +41,6 @@ WCIFPluginMakeFunc WCIFPluginMake;
WCJavaAppletWidget::WCJavaAppletWidget(QMap<QString, QString> args)
{
NSMutableDictionary *arguments;
- NSString *URL, *codebase, *code;
WCPlugin *plugin;
QMap<QString, QString>::Iterator it;
@@ -56,19 +55,8 @@ WCJavaAppletWidget::WCJavaAppletWidget(QMap<QString, QString> args)
arguments = [NSMutableDictionary dictionaryWithCapacity:10];
for( it = args.begin(); it != args.end(); ++it ){
[arguments setObject:QSTRING_TO_NSSTRING(it.data()) forKey:QSTRING_TO_NSSTRING(it.key())];
- if(it.key().contains("codebase", FALSE)){
- codebase = [NSString stringWithString:QSTRING_TO_NSSTRING(it.data())];
- }
- else if(it.key().contains("code", FALSE)){
- code = [NSString stringWithString:QSTRING_TO_NSSTRING(it.data())];
- }
}
- if([codebase characterAtIndex:[codebase length]-1] != '/'){
- URL = [[codebase stringByAppendingString:@"/"] stringByAppendingString:code];
- }else{
- URL = [codebase stringByAppendingString:code];
- }
- setView(WCIFPluginMake(NSMakeRect(0,0,0,0), plugin, URL, @"application/x-java-applet", arguments, NP_EMBED));
+ setView(WCIFPluginMake(NSMakeRect(0,0,0,0), plugin, nil, @"application/x-java-applet", arguments, NP_EMBED));
}
WCJavaAppletWidget::~WCJavaAppletWidget()
diff --git a/WebCore/src/kwq/WCJavaAppletWidget.mm b/WebCore/src/kwq/WCJavaAppletWidget.mm
index 197df3e..0ecf18f 100644
--- a/WebCore/src/kwq/WCJavaAppletWidget.mm
+++ b/WebCore/src/kwq/WCJavaAppletWidget.mm
@@ -41,7 +41,6 @@ WCIFPluginMakeFunc WCIFPluginMake;
WCJavaAppletWidget::WCJavaAppletWidget(QMap<QString, QString> args)
{
NSMutableDictionary *arguments;
- NSString *URL, *codebase, *code;
WCPlugin *plugin;
QMap<QString, QString>::Iterator it;
@@ -56,19 +55,8 @@ WCJavaAppletWidget::WCJavaAppletWidget(QMap<QString, QString> args)
arguments = [NSMutableDictionary dictionaryWithCapacity:10];
for( it = args.begin(); it != args.end(); ++it ){
[arguments setObject:QSTRING_TO_NSSTRING(it.data()) forKey:QSTRING_TO_NSSTRING(it.key())];
- if(it.key().contains("codebase", FALSE)){
- codebase = [NSString stringWithString:QSTRING_TO_NSSTRING(it.data())];
- }
- else if(it.key().contains("code", FALSE)){
- code = [NSString stringWithString:QSTRING_TO_NSSTRING(it.data())];
- }
}
- if([codebase characterAtIndex:[codebase length]-1] != '/'){
- URL = [[codebase stringByAppendingString:@"/"] stringByAppendingString:code];
- }else{
- URL = [codebase stringByAppendingString:code];
- }
- setView(WCIFPluginMake(NSMakeRect(0,0,0,0), plugin, URL, @"application/x-java-applet", arguments, NP_EMBED));
+ setView(WCIFPluginMake(NSMakeRect(0,0,0,0), plugin, nil, @"application/x-java-applet", arguments, NP_EMBED));
}
WCJavaAppletWidget::~WCJavaAppletWidget()
diff --git a/WebKit/Plugins.subproj/IFPluginView.mm b/WebKit/Plugins.subproj/IFPluginView.mm
index 5270a59..30fc84b 100644
--- a/WebKit/Plugins.subproj/IFPluginView.mm
+++ b/WebKit/Plugins.subproj/IFPluginView.mm
@@ -109,32 +109,38 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
NPP_SetValue = [plugin NPP_SetValue];
NPP_Print = [plugin NPP_Print];
- attributes = [arguments allKeys];
- values = [arguments allValues];
- cAttributes = malloc(sizeof(char *) * [arguments count]);
- cValues = malloc(sizeof(char *) * [arguments count]);
-
- for(i=0; i<[arguments count]; i++){ // convert dictionary to 2 string arrays
- attributeString = [attributes objectAtIndex:i];
- s = malloc([attributeString length]+1);
- [attributeString getCString:s];
- cAttributes[i] = s;
-
- attributeString = [values objectAtIndex:i];
- s = malloc([attributeString length]+1);
- [attributeString getCString:s];
- cValues[i] = s;
- }
cMime = malloc([mime length]+1);
[mime getCString:cMime];
- npErr = NPP_New(cMime, instance, mode, [arguments count], cAttributes, cValues, &saved);
- KWQDebug("NPP_New: %d\n", npErr);
- if([attributes containsObject:@"HIDDEN"]){
- hidden = TRUE;
+ if(arguments){
+ attributes = [arguments allKeys];
+ values = [arguments allValues];
+ cAttributes = malloc(sizeof(char *) * [arguments count]);
+ cValues = malloc(sizeof(char *) * [arguments count]);
+
+ if([attributes containsObject:@"HIDDEN"]){
+ hidden = TRUE;
+ }else{
+ hidden = FALSE;
+ }
+
+ for(i=0; i<[arguments count]; i++){ // convert dictionary to 2 string arrays
+ attributeString = [attributes objectAtIndex:i];
+ s = malloc([attributeString length]+1);
+ [attributeString getCString:s];
+ cAttributes[i] = s;
+
+ attributeString = [values objectAtIndex:i];
+ s = malloc([attributeString length]+1);
+ [attributeString getCString:s];
+ cValues[i] = s;
+ }
+ npErr = NPP_New(cMime, instance, mode, [arguments count], cAttributes, cValues, &saved);
}else{
- hidden = FALSE;
+ npErr = NPP_New(cMime, instance, mode, 0, NULL, NULL, &saved);
}
+ KWQDebug("NPP_New: %d\n", npErr);
+
transferred = FALSE;
stopped = FALSE;
filesToErase = [NSMutableArray arrayWithCapacity:2];
@@ -154,7 +160,8 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
[notificationCenter addObserver:self selector:@selector(viewHasMoved:) name:@"NSViewBoundsDidChangeNotification" object:[self findSuperview:@"NSClipView"]];
[notificationCenter addObserver:self selector:@selector(viewHasMoved:) name:@"NSWindowDidResizeNotification" object:[self window]];
[self sendActivateEvent];
- [self newStream:URL mimeType:mime notifyData:NULL];
+ if(URL)
+ [self newStream:URL mimeType:mime notifyData:NULL];
eventSender = [[IFPluginViewNullEventSender alloc] initializeWithNPP:instance functionPointer:NPP_HandleEvent];
[eventSender sendNullEvents];
transferred = TRUE;
@@ -170,8 +177,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
-(void) viewHasMoved:(NSNotification *)note
{
[self setWindow];
- //[self sendUpdateEvent];
- [self performSelector:@selector(sendUpdateEvent) withObject:nil afterDelay:.1];
+ [self sendUpdateEvent];
}
- (void) setWindow
diff --git a/WebKit/Plugins.subproj/WebPluginView.m b/WebKit/Plugins.subproj/WebPluginView.m
index 5270a59..30fc84b 100644
--- a/WebKit/Plugins.subproj/WebPluginView.m
+++ b/WebKit/Plugins.subproj/WebPluginView.m
@@ -109,32 +109,38 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
NPP_SetValue = [plugin NPP_SetValue];
NPP_Print = [plugin NPP_Print];
- attributes = [arguments allKeys];
- values = [arguments allValues];
- cAttributes = malloc(sizeof(char *) * [arguments count]);
- cValues = malloc(sizeof(char *) * [arguments count]);
-
- for(i=0; i<[arguments count]; i++){ // convert dictionary to 2 string arrays
- attributeString = [attributes objectAtIndex:i];
- s = malloc([attributeString length]+1);
- [attributeString getCString:s];
- cAttributes[i] = s;
-
- attributeString = [values objectAtIndex:i];
- s = malloc([attributeString length]+1);
- [attributeString getCString:s];
- cValues[i] = s;
- }
cMime = malloc([mime length]+1);
[mime getCString:cMime];
- npErr = NPP_New(cMime, instance, mode, [arguments count], cAttributes, cValues, &saved);
- KWQDebug("NPP_New: %d\n", npErr);
- if([attributes containsObject:@"HIDDEN"]){
- hidden = TRUE;
+ if(arguments){
+ attributes = [arguments allKeys];
+ values = [arguments allValues];
+ cAttributes = malloc(sizeof(char *) * [arguments count]);
+ cValues = malloc(sizeof(char *) * [arguments count]);
+
+ if([attributes containsObject:@"HIDDEN"]){
+ hidden = TRUE;
+ }else{
+ hidden = FALSE;
+ }
+
+ for(i=0; i<[arguments count]; i++){ // convert dictionary to 2 string arrays
+ attributeString = [attributes objectAtIndex:i];
+ s = malloc([attributeString length]+1);
+ [attributeString getCString:s];
+ cAttributes[i] = s;
+
+ attributeString = [values objectAtIndex:i];
+ s = malloc([attributeString length]+1);
+ [attributeString getCString:s];
+ cValues[i] = s;
+ }
+ npErr = NPP_New(cMime, instance, mode, [arguments count], cAttributes, cValues, &saved);
}else{
- hidden = FALSE;
+ npErr = NPP_New(cMime, instance, mode, 0, NULL, NULL, &saved);
}
+ KWQDebug("NPP_New: %d\n", npErr);
+
transferred = FALSE;
stopped = FALSE;
filesToErase = [NSMutableArray arrayWithCapacity:2];
@@ -154,7 +160,8 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
[notificationCenter addObserver:self selector:@selector(viewHasMoved:) name:@"NSViewBoundsDidChangeNotification" object:[self findSuperview:@"NSClipView"]];
[notificationCenter addObserver:self selector:@selector(viewHasMoved:) name:@"NSWindowDidResizeNotification" object:[self window]];
[self sendActivateEvent];
- [self newStream:URL mimeType:mime notifyData:NULL];
+ if(URL)
+ [self newStream:URL mimeType:mime notifyData:NULL];
eventSender = [[IFPluginViewNullEventSender alloc] initializeWithNPP:instance functionPointer:NPP_HandleEvent];
[eventSender sendNullEvents];
transferred = TRUE;
@@ -170,8 +177,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
-(void) viewHasMoved:(NSNotification *)note
{
[self setWindow];
- //[self sendUpdateEvent];
- [self performSelector:@selector(sendUpdateEvent) withObject:nil afterDelay:.1];
+ [self sendUpdateEvent];
}
- (void) setWindow
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list