[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 07:22:54 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 9b05aa12cf4a2a9e8a7a8b90ef0bab0b2e94f961
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 30 20:03:05 2003 +0000

    	Fixed: 3160464 - Slideback sometimes happens twice
    
    	Because we start drags in mouseDragged (which AppKit says we shouldn't), we get mouseDragged events after a drag (image, link, text etc) has ended. We also get mouseDragged events after we've sent the fake mouseUp to WebCore. That is probably bad for unknown reasons.
    
            Reviewed by darin.
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView mouseDown:]): set ignoringMouseDraggedEvents to NO
            (-[WebHTMLView mouseDragged:]): check ignoringMouseDraggedEvents
            (-[WebHTMLView draggedImage:endedAt:operation:]): set ignoringMouseDraggedEvents to NO
            * WebView.subproj/WebHTMLViewPrivate.h: added ignoringMouseDraggedEvents
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3508 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 846f41c..d8e6cd8 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2003-01-30  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: 3160464 - Slideback sometimes happens twice
+
+	Because we start drags in mouseDragged (which AppKit says we shouldn't), we get mouseDragged events after a drag (image, link, text etc) has ended. We also get mouseDragged events after we've sent the fake mouseUp to WebCore. That is probably bad for unknown reasons.
+
+        Reviewed by darin.
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView mouseDown:]): set ignoringMouseDraggedEvents to NO
+        (-[WebHTMLView mouseDragged:]): check ignoringMouseDraggedEvents
+        (-[WebHTMLView draggedImage:endedAt:operation:]): set ignoringMouseDraggedEvents to NO
+        * WebView.subproj/WebHTMLViewPrivate.h: added ignoringMouseDraggedEvents
+
 2003-01-30  Darin Adler  <darin at apple.com>
 
         Reviewed by John.
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 7301d1f..acf5242 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -603,6 +603,8 @@
 
 - (void)mouseDown: (NSEvent *)event
 {
+    _private->ignoringMouseDraggedEvents = NO;
+    
     // Record the mouse down position so we can determine drag hysteresis.
     [_private->mouseDownEvent release];
     _private->mouseDownEvent = [event retain];
@@ -621,7 +623,7 @@
        pasteboard:(NSPasteboard *)pasteboard
            source:(id)source
         slideBack:(BOOL)slideBack
-{
+{    
     // Don't allow drags to be accepted by this WebView.
     [[self _web_parentWebView] unregisterDraggedTypes];
     
@@ -633,7 +635,9 @@
 
 - (void)mouseDragged:(NSEvent *)event
 {
-    [[self _bridge] mouseDragged:event];
+    if (!_private->ignoringMouseDraggedEvents) {
+        [[self _bridge] mouseDragged:event];
+    }
 }
 
 - (unsigned)draggingSourceOperationMaskForLocal:(BOOL)isLocal
@@ -643,6 +647,9 @@
 
 - (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation
 {
+    // Prevent queued mouseDragged events from coming after the drag and fake mouseUp event.
+    _private->ignoringMouseDraggedEvents = YES;
+    
     // Once the dragging machinery kicks in, we no longer get mouse drags or the up event.
     // khtml expects to get balanced down/up's, so we must fake up a mouseup.
     NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSLeftMouseUp
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.h b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
index ca43acd..8bbbfa9 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
@@ -23,6 +23,7 @@
     BOOL liveAllowsScrolling;
     BOOL inWindow;
     BOOL inNextValidKeyView;
+    BOOL ignoringMouseDraggedEvents;
     
     id savedSubviews;
     BOOL subviewsSetAside;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list