[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:59:09 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c62cb003e3a2e06cd2499d5c6e5a57fd68d35f87
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Mar 27 21:52:46 2002 +0000

    2002-03-27  Chris Blumenberg  <cblu at apple.com>
    
            Now setting the modifier bit for the activate and cursor events.
    
            * Plugins.subproj/IFPluginView.h:
            * Plugins.subproj/IFPluginView.mm: (-[IFPluginView drawRect:]), (-[IFPluginView
            windowBecameKey:]), (-[IFPluginView windowResignedKey:]), (-[IFPluginView
            mouseEntered:]), (-[IFPluginView mouseExited:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@870 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0b601e3..49e325d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2002-03-27  Chris Blumenberg  <cblu at apple.com>
+
+	Now setting the modifier bit for the activate and cursor events.
+
+	* Plugins.subproj/IFPluginView.h:
+	* Plugins.subproj/IFPluginView.mm: (-[IFPluginView drawRect:]), (-[IFPluginView
+	windowBecameKey:]), (-[IFPluginView windowResignedKey:]), (-[IFPluginView
+	mouseEntered:]), (-[IFPluginView mouseExited:]):
+
 2002-03-27  Darin Adler  <darin at apple.com>
 
 	* WebView.subproj/IFPreferences.mm: (+[IFPreferences load]): Switch back
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 0b601e3..49e325d 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-03-27  Chris Blumenberg  <cblu at apple.com>
+
+	Now setting the modifier bit for the activate and cursor events.
+
+	* Plugins.subproj/IFPluginView.h:
+	* Plugins.subproj/IFPluginView.mm: (-[IFPluginView drawRect:]), (-[IFPluginView
+	windowBecameKey:]), (-[IFPluginView windowResignedKey:]), (-[IFPluginView
+	mouseEntered:]), (-[IFPluginView mouseExited:]):
+
 2002-03-27  Darin Adler  <darin at apple.com>
 
 	* WebView.subproj/IFPreferences.mm: (+[IFPreferences load]): Switch back
diff --git a/WebKit/Plugins.subproj/IFPluginView.h b/WebKit/Plugins.subproj/IFPluginView.h
index b91336a..0abfeb7 100644
--- a/WebKit/Plugins.subproj/IFPluginView.h
+++ b/WebKit/Plugins.subproj/IFPluginView.h
@@ -75,7 +75,7 @@ typedef struct _StreamData{
 -(BOOL)acceptsFirstResponder;
 -(BOOL)becomeFirstResponder;
 -(BOOL)resignFirstResponder;
--(void)sendActivateEvent;
+-(void)sendActivateEvent:(BOOL)isActive;
 -(void)sendUpdateEvent;
 -(void)mouseDown:(NSEvent *)theEvent;
 -(void)mouseUp:(NSEvent *)theEvent;
diff --git a/WebKit/Plugins.subproj/IFPluginView.mm b/WebKit/Plugins.subproj/IFPluginView.mm
index 1526d67..de221e4 100644
--- a/WebKit/Plugins.subproj/IFPluginView.mm
+++ b/WebKit/Plugins.subproj/IFPluginView.mm
@@ -154,12 +154,17 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
 {
     if(!transferred){
         NSNotificationCenter *notificationCenter;
+        NSWindow *theWindow;
+        
         [self setWindow];
+        theWindow = [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]];
-        [notificationCenter addObserver:self selector:@selector(windowWillClose:) name:@"NSWindowWillCloseNotification" object:[self window]];
-        [self sendActivateEvent];
+        [notificationCenter addObserver:self selector:@selector(viewHasMoved:) name:@"NSWindowDidResizeNotification" object:theWindow];
+        [notificationCenter addObserver:self selector:@selector(windowWillClose:) name:@"NSWindowWillCloseNotification" object:theWindow];
+        [notificationCenter addObserver:self selector:@selector(windowBecameKey:) name:@"NSWindowDidBecomeKeyNotification" object:theWindow];
+        [notificationCenter addObserver:self selector:@selector(windowResignedKey:) name:@"NSWindowDidResignKeyNotification" object:theWindow];
+        [self sendActivateEvent:[theWindow isKeyWindow]];
         if(URL)
             [self newStream:URL mimeType:mime notifyData:NULL];
         eventSender = [[IFPluginViewNullEventSender alloc] initializeWithNPP:instance functionPointer:NPP_HandleEvent];
@@ -183,6 +188,16 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
     [self setWindow];
 }
 
+-(void) windowBecameKey:(NSNotification *)notification
+{
+    [self sendActivateEvent:TRUE];
+}
+
+-(void) windowResignedKey:(NSNotification *)notification
+{
+    [self sendActivateEvent:FALSE];
+}
+
 - (void) setWindow
 {
     NPError npErr;
@@ -401,7 +416,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
     return YES;
 }
 
--(void)sendActivateEvent
+-(void)sendActivateEvent:(BOOL)isActive;
 {
     EventRecord event;
     bool acceptedEvent;
@@ -411,8 +426,9 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
     event.message = (uint32)GetWindowPort([[self window] _windowRef]);
     Microseconds(&msecs);
     event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
+    event.modifiers = isActive;
     acceptedEvent = NPP_HandleEvent(instance, &event); 
-    KWQDebug("NPP_HandleEvent(activateEvent): %d  when: %u\n", acceptedEvent, event.when);
+    KWQDebug("NPP_HandleEvent(activateEvent): %d  isActive: %d\n", acceptedEvent, (event.modifiers & activeFlag));
 }
 
 -(void)sendUpdateEvent
@@ -470,6 +486,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
     
     event.what = adjustCursorEvent;
     event.when = (uint32)([theEvent timestamp] * 60);
+    event.modifiers = 1;
     acceptedEvent = NPP_HandleEvent(instance, &event);
     KWQDebug("NPP_HandleEvent(mouseEntered): %d\n", acceptedEvent);
 }
@@ -481,6 +498,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
      
     event.what = adjustCursorEvent;
     event.when = (uint32)([theEvent timestamp] * 60);
+    event.modifiers = 0;
     acceptedEvent = NPP_HandleEvent(instance, &event);
     KWQDebug("NPP_HandleEvent(mouseExited): %d\n", acceptedEvent);
 }
diff --git a/WebKit/Plugins.subproj/WebPluginView.h b/WebKit/Plugins.subproj/WebPluginView.h
index b91336a..0abfeb7 100644
--- a/WebKit/Plugins.subproj/WebPluginView.h
+++ b/WebKit/Plugins.subproj/WebPluginView.h
@@ -75,7 +75,7 @@ typedef struct _StreamData{
 -(BOOL)acceptsFirstResponder;
 -(BOOL)becomeFirstResponder;
 -(BOOL)resignFirstResponder;
--(void)sendActivateEvent;
+-(void)sendActivateEvent:(BOOL)isActive;
 -(void)sendUpdateEvent;
 -(void)mouseDown:(NSEvent *)theEvent;
 -(void)mouseUp:(NSEvent *)theEvent;
diff --git a/WebKit/Plugins.subproj/WebPluginView.m b/WebKit/Plugins.subproj/WebPluginView.m
index 1526d67..de221e4 100644
--- a/WebKit/Plugins.subproj/WebPluginView.m
+++ b/WebKit/Plugins.subproj/WebPluginView.m
@@ -154,12 +154,17 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
 {
     if(!transferred){
         NSNotificationCenter *notificationCenter;
+        NSWindow *theWindow;
+        
         [self setWindow];
+        theWindow = [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]];
-        [notificationCenter addObserver:self selector:@selector(windowWillClose:) name:@"NSWindowWillCloseNotification" object:[self window]];
-        [self sendActivateEvent];
+        [notificationCenter addObserver:self selector:@selector(viewHasMoved:) name:@"NSWindowDidResizeNotification" object:theWindow];
+        [notificationCenter addObserver:self selector:@selector(windowWillClose:) name:@"NSWindowWillCloseNotification" object:theWindow];
+        [notificationCenter addObserver:self selector:@selector(windowBecameKey:) name:@"NSWindowDidBecomeKeyNotification" object:theWindow];
+        [notificationCenter addObserver:self selector:@selector(windowResignedKey:) name:@"NSWindowDidResignKeyNotification" object:theWindow];
+        [self sendActivateEvent:[theWindow isKeyWindow]];
         if(URL)
             [self newStream:URL mimeType:mime notifyData:NULL];
         eventSender = [[IFPluginViewNullEventSender alloc] initializeWithNPP:instance functionPointer:NPP_HandleEvent];
@@ -183,6 +188,16 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
     [self setWindow];
 }
 
+-(void) windowBecameKey:(NSNotification *)notification
+{
+    [self sendActivateEvent:TRUE];
+}
+
+-(void) windowResignedKey:(NSNotification *)notification
+{
+    [self sendActivateEvent:FALSE];
+}
+
 - (void) setWindow
 {
     NPError npErr;
@@ -401,7 +416,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
     return YES;
 }
 
--(void)sendActivateEvent
+-(void)sendActivateEvent:(BOOL)isActive;
 {
     EventRecord event;
     bool acceptedEvent;
@@ -411,8 +426,9 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
     event.message = (uint32)GetWindowPort([[self window] _windowRef]);
     Microseconds(&msecs);
     event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
+    event.modifiers = isActive;
     acceptedEvent = NPP_HandleEvent(instance, &event); 
-    KWQDebug("NPP_HandleEvent(activateEvent): %d  when: %u\n", acceptedEvent, event.when);
+    KWQDebug("NPP_HandleEvent(activateEvent): %d  isActive: %d\n", acceptedEvent, (event.modifiers & activeFlag));
 }
 
 -(void)sendUpdateEvent
@@ -470,6 +486,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
     
     event.what = adjustCursorEvent;
     event.when = (uint32)([theEvent timestamp] * 60);
+    event.modifiers = 1;
     acceptedEvent = NPP_HandleEvent(instance, &event);
     KWQDebug("NPP_HandleEvent(mouseEntered): %d\n", acceptedEvent);
 }
@@ -481,6 +498,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
      
     event.what = adjustCursorEvent;
     event.when = (uint32)([theEvent timestamp] * 60);
+    event.modifiers = 0;
     acceptedEvent = NPP_HandleEvent(instance, &event);
     KWQDebug("NPP_HandleEvent(mouseExited): %d\n", acceptedEvent);
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list