[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 06:52:13 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0f5f7034c8c8a3a66996e66a8b257ead2ef8c97e
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 22 20:52:42 2002 +0000

    	Use the mouseDown point instead of the mouseDragged point to determine the mouseOffset when dragging images. When you drag an image now, the point where you clicked is the point where the cursor is in relation to the drag image.
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView mouseDown:]): retain the mouse down event
            (-[WebHTMLView mouseDragged:]): use the mouse down event
            * WebView.subproj/WebHTMLViewPrivate.h:
            * WebView.subproj/WebHTMLViewPrivate.m:
            (-[WebHTMLViewPrivate dealloc]): release the mouse down event
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2410 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 96ae218..fc47a74 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2002-10-22  Chris Blumenberg  <cblu at apple.com>
+
+	Use the mouseDown point instead of the mouseDragged point to determine the mouseOffset when dragging images. When you drag an image now, the point where you clicked is the point where the cursor is in relation to the drag image.
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView mouseDown:]): retain the mouse down event
+        (-[WebHTMLView mouseDragged:]): use the mouse down event
+        * WebView.subproj/WebHTMLViewPrivate.h:
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLViewPrivate dealloc]): release the mouse down event
+
 2002-10-21  Darin Adler  <darin at apple.com>
 
         * WebCoreSupport.subproj/WebViewFactory.h: Changed to use new protocol scheme so we
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 96ae218..fc47a74 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,14 @@
+2002-10-22  Chris Blumenberg  <cblu at apple.com>
+
+	Use the mouseDown point instead of the mouseDragged point to determine the mouseOffset when dragging images. When you drag an image now, the point where you clicked is the point where the cursor is in relation to the drag image.
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView mouseDown:]): retain the mouse down event
+        (-[WebHTMLView mouseDragged:]): use the mouse down event
+        * WebView.subproj/WebHTMLViewPrivate.h:
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLViewPrivate dealloc]): release the mouse down event
+
 2002-10-21  Darin Adler  <darin at apple.com>
 
         * WebCoreSupport.subproj/WebViewFactory.h: Changed to use new protocol scheme so we
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 5991773..de19448 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -556,7 +556,8 @@
 {
     // Record the mouse down position so we can determine
     // drag hysteresis.
-    _private->mouseDownPoint = [event locationInWindow];
+    [_private->mouseDownEvent release];
+    _private->mouseDownEvent = [event retain];
     
     // Let khtml get a chance to deal with the event.
     [[self _bridge] mouseDown:event];
@@ -603,17 +604,18 @@
     
     // Ensure that we're visible wrt the event location.
     BOOL didScroll = [self autoscroll:event];
-    
+
+    NSPoint mouseDownPoint = [_private->mouseDownEvent locationInWindow];
     if (didScroll){
-        _private->mouseDownPoint.x = -FLT_MAX;
-        _private->mouseDownPoint.y = -FLT_MAX;
+        mouseDownPoint.x = -FLT_MAX;
+        mouseDownPoint.y = -FLT_MAX;
     }
     
     // Now do WebKit dragging.
-    float deltaX = ABS([event locationInWindow].x - _private->mouseDownPoint.x);
-    float deltaY = ABS([event locationInWindow].y - _private->mouseDownPoint.y);
+    float deltaX = ABS([event locationInWindow].x - mouseDownPoint.x);
+    float deltaY = ABS([event locationInWindow].y - mouseDownPoint.y);
 
-    NSPoint point = [self convertPoint:_private->mouseDownPoint fromView:nil];
+    NSPoint point = [self convertPoint:mouseDownPoint fromView:nil];
     NSDictionary *element = [self _elementAtPoint: point];
     NSURL *linkURL = [element objectForKey: WebElementLinkURLKey];
     NSURL *imageURL = [element objectForKey: WebElementImageURLKey];
@@ -632,7 +634,7 @@
                                       fromRect:NSZeroRect
                                         source:self
                                      slideBack:YES
-                                         event:event];
+                                         event:_private->mouseDownEvent];
                 
             }else if (linkURL) {
                 BOOL drawURLString = YES;
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.h b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
index d4b1666..3352899 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
@@ -15,7 +15,6 @@
 @interface WebHTMLViewPrivate : NSObject
 {
 @public
-    NSPoint mouseDownPoint;
     BOOL needsLayout;
     BOOL needsToApplyStyles;
     BOOL canDragTo;
@@ -27,6 +26,8 @@
     id savedSubviews;
     BOOL subviewsSetAside;
 
+    NSEvent *mouseDownEvent;
+
     NSDictionary *draggingImageElement;
     
     BOOL lastMouseOverElementWasNotNil;
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index a6ffebb..45f2a4c 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -53,6 +53,7 @@
 
 - (void)dealloc
 {
+    [mouseDownEvent release];
     [draggingImageElement release];
     [super dealloc];
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list