[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:09 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit f01bb606691f9c66efeee2f22a44fb8cdff2ac60
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Feb 22 23:58:10 2002 +0000
Fixed a problem where plug-ins would show up blank
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/Plugins.subproj/IFPluginView.h b/WebKit/Plugins.subproj/IFPluginView.h
index b0d27e4..7a1a4de 100644
--- a/WebKit/Plugins.subproj/IFPluginView.h
+++ b/WebKit/Plugins.subproj/IFPluginView.h
@@ -22,6 +22,7 @@ typedef struct _StreamData{
@interface IFPluginViewNullEventSender : NSObject{
NPP instance;
NPP_HandleEventProcPtr NPP_HandleEvent;
+ bool shouldStop;
}
-(id)initializeWithNPP:(NPP)pluginInstance functionPointer:(NPP_HandleEventProcPtr)HandleEventFunction;
diff --git a/WebKit/Plugins.subproj/IFPluginView.mm b/WebKit/Plugins.subproj/IFPluginView.mm
index 1c6eaec..68c7464 100644
--- a/WebKit/Plugins.subproj/IFPluginView.mm
+++ b/WebKit/Plugins.subproj/IFPluginView.mm
@@ -30,6 +30,7 @@ extern "C" {
{
instance = pluginInstance;
NPP_HandleEvent = HandleEventFunction;
+ shouldStop = FALSE;
return self;
}
@@ -39,16 +40,20 @@ extern "C" {
bool acceptedEvent;
UnsignedWide msecs;
- event.what = nullEvent;
- Microseconds(&msecs);
- event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
- acceptedEvent = NPP_HandleEvent(instance, &event);
- //KWQDebug("NPP_HandleEvent(nullEvent): %d when: %u\n", acceptedEvent, (unsigned)event.when);
- [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:.1];
+ if(!shouldStop){
+ event.what = nullEvent;
+ Microseconds(&msecs);
+ event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
+ acceptedEvent = NPP_HandleEvent(instance, &event);
+ //KWQDebug("NPP_HandleEvent(nullEvent): %d when: %u %d\n", acceptedEvent, (unsigned)event.when, shouldStop);
+ [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:.1];
+ }
}
-(void) stop
{
+ KWQDebug("Stopping null events\n");
+ shouldStop = TRUE;
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(sendNullEvents) object:nil];
}
@@ -132,9 +137,11 @@ extern "C" {
- (void)drawRect:(NSRect)rect
{
if(!transferred){
+ NSNotificationCenter *notificationCenter;
[self setWindow];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewHasMoved:) name:@"NSViewBoundsDidChangeNotification" object:[self findSuperview:@"NSClipView"]];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewHasMoved:) name:@"NSWindowDidResizeNotification" object:[self window]];
+ notificationCenter = [NSNotificationCenter defaultCenter];
+ [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];
transferred = TRUE;
@@ -309,14 +316,12 @@ extern "C" {
NPP_URLNotify(instance, streamData->stream->url, NPRES_DONE, streamData->stream->notifyData);
KWQDebug("NPP_URLNotify\n");
}
- [self setNeedsDisplay:YES];
free(streamData);
[activeURLHandles removeObject:sender];
}
- (void)WCURLHandleResourceDidBeginLoading:(id)sender userData:(void *)userData
{
- [self setNeedsDisplay:YES];
}
- (void)WCURLHandleResourceDidCancelLoading:(id)sender userData:(void *)userData
@@ -499,6 +504,7 @@ extern "C" {
webController = [webView controller];
[webController setMainDataSource:dataSource];
[dataSource startLoading: YES];
+ NPP_URLNotify(instance, url, NPRES_DONE, notifyData);
}else if(!strcmp(target, "_blank") || !strcmp(target, "_new")){
printf("Error: No API to open new browser window\n");
}
diff --git a/WebKit/Plugins.subproj/WebPluginView.h b/WebKit/Plugins.subproj/WebPluginView.h
index b0d27e4..7a1a4de 100644
--- a/WebKit/Plugins.subproj/WebPluginView.h
+++ b/WebKit/Plugins.subproj/WebPluginView.h
@@ -22,6 +22,7 @@ typedef struct _StreamData{
@interface IFPluginViewNullEventSender : NSObject{
NPP instance;
NPP_HandleEventProcPtr NPP_HandleEvent;
+ bool shouldStop;
}
-(id)initializeWithNPP:(NPP)pluginInstance functionPointer:(NPP_HandleEventProcPtr)HandleEventFunction;
diff --git a/WebKit/Plugins.subproj/WebPluginView.m b/WebKit/Plugins.subproj/WebPluginView.m
index 1c6eaec..68c7464 100644
--- a/WebKit/Plugins.subproj/WebPluginView.m
+++ b/WebKit/Plugins.subproj/WebPluginView.m
@@ -30,6 +30,7 @@ extern "C" {
{
instance = pluginInstance;
NPP_HandleEvent = HandleEventFunction;
+ shouldStop = FALSE;
return self;
}
@@ -39,16 +40,20 @@ extern "C" {
bool acceptedEvent;
UnsignedWide msecs;
- event.what = nullEvent;
- Microseconds(&msecs);
- event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
- acceptedEvent = NPP_HandleEvent(instance, &event);
- //KWQDebug("NPP_HandleEvent(nullEvent): %d when: %u\n", acceptedEvent, (unsigned)event.when);
- [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:.1];
+ if(!shouldStop){
+ event.what = nullEvent;
+ Microseconds(&msecs);
+ event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
+ acceptedEvent = NPP_HandleEvent(instance, &event);
+ //KWQDebug("NPP_HandleEvent(nullEvent): %d when: %u %d\n", acceptedEvent, (unsigned)event.when, shouldStop);
+ [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:.1];
+ }
}
-(void) stop
{
+ KWQDebug("Stopping null events\n");
+ shouldStop = TRUE;
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(sendNullEvents) object:nil];
}
@@ -132,9 +137,11 @@ extern "C" {
- (void)drawRect:(NSRect)rect
{
if(!transferred){
+ NSNotificationCenter *notificationCenter;
[self setWindow];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewHasMoved:) name:@"NSViewBoundsDidChangeNotification" object:[self findSuperview:@"NSClipView"]];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewHasMoved:) name:@"NSWindowDidResizeNotification" object:[self window]];
+ notificationCenter = [NSNotificationCenter defaultCenter];
+ [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];
transferred = TRUE;
@@ -309,14 +316,12 @@ extern "C" {
NPP_URLNotify(instance, streamData->stream->url, NPRES_DONE, streamData->stream->notifyData);
KWQDebug("NPP_URLNotify\n");
}
- [self setNeedsDisplay:YES];
free(streamData);
[activeURLHandles removeObject:sender];
}
- (void)WCURLHandleResourceDidBeginLoading:(id)sender userData:(void *)userData
{
- [self setNeedsDisplay:YES];
}
- (void)WCURLHandleResourceDidCancelLoading:(id)sender userData:(void *)userData
@@ -499,6 +504,7 @@ extern "C" {
webController = [webView controller];
[webController setMainDataSource:dataSource];
[dataSource startLoading: YES];
+ NPP_URLNotify(instance, url, NPRES_DONE, notifyData);
}else if(!strcmp(target, "_blank") || !strcmp(target, "_new")){
printf("Error: No API to open new browser window\n");
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list