[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:53:56 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 345651420708af8610a7cda253aa50c799eb1bf0
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 9 00:54:49 2002 +0000
Now sending null events to plug-ins
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/kwq/WKPluginView.h b/WebCore/kwq/WKPluginView.h
index 035b162..514d28c 100644
--- a/WebCore/kwq/WKPluginView.h
+++ b/WebCore/kwq/WKPluginView.h
@@ -7,24 +7,14 @@
//
#import <AppKit/AppKit.h>
+#include <Carbon/Carbon.h>
#include <qwidget.h>
#import <WKPlugin.h>
#include "npapi.h"
#include "kwqdebug.h"
-typedef NPStream* NPS;
-
-typedef UInt16 EventKind;
-typedef UInt16 EventModifiers;
-struct EventRecord {
- EventKind what;
- UInt32 message;
- UInt32 when;
- Point where;
- EventModifiers modifiers;
-};
-typedef struct EventRecord EventRecord;
+typedef NPStream* NPS;
@interface WKPluginView : NSQuickDrawView {
QWidget *widget;
@@ -59,7 +49,8 @@ typedef struct EventRecord EventRecord;
- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WKPlugin *)plug url: (NSString *)location mime:(NSString *)mime;
-(void)drawRect:(NSRect)rect;
-(BOOL)acceptsFirstResponder;
--(void)sendNullEvent;
+-(void)sendNullEvents;
+-(void)mouseDown:(NSEvent *)event;
-(void)dealloc;
@end
diff --git a/WebCore/kwq/WKPluginView.mm b/WebCore/kwq/WKPluginView.mm
index 13134f6..6878a39 100644
--- a/WebCore/kwq/WKPluginView.mm
+++ b/WebCore/kwq/WKPluginView.mm
@@ -40,6 +40,7 @@
npErr = NPP_New(cMime, instance, NP_EMBED, 0, NULL, NULL, &saved); //need to pass parameters to plug-in
KWQDebug("NPP_New: %d\n", npErr);
transferred = FALSE;
+ [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:0];
return self;
}
@@ -130,21 +131,31 @@
return true;
}
--(void)sendNullEvent
+-(void)sendNullEvents
{
EventRecord event;
+ bool acceptedEvent;
event.what = 0;
- KWQDebug("NPP_HandleEvent: %d\n", NPP_HandleEvent(instance, &event));
+ acceptedEvent = NPP_HandleEvent(instance, &event);
+ //KWQDebug("NPP_HandleEvent: %d\n", acceptedEvent);
+ [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:0];
+}
+
+-(void)mouseDown:(NSEvent *)theEvent
+{
+
}
-(void)dealloc
{
NPError npErr;
-
+ //[self cancelPreviousPerformRequestsWithTarget:self selector:@selector(sendNullEvents) object:nil]; //compiler can't find this method!
npErr = NPP_Destroy(instance, NULL);
KWQDebug("NPP_Destroy: %d\n", npErr);
[super dealloc];
}
+
+
@end
diff --git a/WebCore/src/kwq/WKPluginView.h b/WebCore/src/kwq/WKPluginView.h
index 035b162..514d28c 100644
--- a/WebCore/src/kwq/WKPluginView.h
+++ b/WebCore/src/kwq/WKPluginView.h
@@ -7,24 +7,14 @@
//
#import <AppKit/AppKit.h>
+#include <Carbon/Carbon.h>
#include <qwidget.h>
#import <WKPlugin.h>
#include "npapi.h"
#include "kwqdebug.h"
-typedef NPStream* NPS;
-
-typedef UInt16 EventKind;
-typedef UInt16 EventModifiers;
-struct EventRecord {
- EventKind what;
- UInt32 message;
- UInt32 when;
- Point where;
- EventModifiers modifiers;
-};
-typedef struct EventRecord EventRecord;
+typedef NPStream* NPS;
@interface WKPluginView : NSQuickDrawView {
QWidget *widget;
@@ -59,7 +49,8 @@ typedef struct EventRecord EventRecord;
- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WKPlugin *)plug url: (NSString *)location mime:(NSString *)mime;
-(void)drawRect:(NSRect)rect;
-(BOOL)acceptsFirstResponder;
--(void)sendNullEvent;
+-(void)sendNullEvents;
+-(void)mouseDown:(NSEvent *)event;
-(void)dealloc;
@end
diff --git a/WebCore/src/kwq/WKPluginView.mm b/WebCore/src/kwq/WKPluginView.mm
index 13134f6..6878a39 100644
--- a/WebCore/src/kwq/WKPluginView.mm
+++ b/WebCore/src/kwq/WKPluginView.mm
@@ -40,6 +40,7 @@
npErr = NPP_New(cMime, instance, NP_EMBED, 0, NULL, NULL, &saved); //need to pass parameters to plug-in
KWQDebug("NPP_New: %d\n", npErr);
transferred = FALSE;
+ [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:0];
return self;
}
@@ -130,21 +131,31 @@
return true;
}
--(void)sendNullEvent
+-(void)sendNullEvents
{
EventRecord event;
+ bool acceptedEvent;
event.what = 0;
- KWQDebug("NPP_HandleEvent: %d\n", NPP_HandleEvent(instance, &event));
+ acceptedEvent = NPP_HandleEvent(instance, &event);
+ //KWQDebug("NPP_HandleEvent: %d\n", acceptedEvent);
+ [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:0];
+}
+
+-(void)mouseDown:(NSEvent *)theEvent
+{
+
}
-(void)dealloc
{
NPError npErr;
-
+ //[self cancelPreviousPerformRequestsWithTarget:self selector:@selector(sendNullEvents) object:nil]; //compiler can't find this method!
npErr = NPP_Destroy(instance, NULL);
KWQDebug("NPP_Destroy: %d\n", npErr);
[super dealloc];
}
+
+
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list