[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

sullivan sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:59:23 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 8518f7bcb63a2a174eb14e50154cb84b078a6e18
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 13 01:27:05 2002 +0000

    WebKit:
    
            * Misc.subproj/WebNSViewExtras.h:
            * Misc.subproj/WebNSViewExtras.m:
            (-[NSView _web_dragShouldBeginFromMouseDown:withExpiration:xHysteresis:yHysteresis:]):
    	new method
            (-[NSView _web_dragShouldBeginFromMouseDown:withExpiration:]):
    	now calls the new method, passing the default hysteresis values
    
    WebBrowser:
    
    	- fixed 3096528 -- don't let initially-horizontal drags of
    	toolbar bookmarks escape from toolbar
    
    	Unfortunately I left behind a drawing glitch, recorded as
    	bug 3099488. Ideas to fix this are hereby solicited.
    
            * FavoritesBar.m:
            (-[FavoritesBar slideButtonsIntoPlace]):
    	renamed from repositionButtons for clarity
            (-[FavoritesBar maxButtonX]):
    	new method, extracted from _layOutButtons
            (-[FavoritesBar _layOutButtons]):
    	now calls maxButtonX
            (-[FavoritesBar setDropIndex:]):
    	updated for name change
            (-[FavoritesBar specialBookmarkSourcesCount]):
    	new method, extracted from duplicated code
            (-[FavoritesBar lastNonFavoriteIndex]):
    	new method, extracted from dropIndexFromDraggingInfo:
            (-[FavoritesBar dropIndexFromLocalPoint:]):
    	new method, extracted from dropIndexFromDraggingInfo:
            (-[FavoritesBar dropIndexFromDraggingInfo:]):
    	now calls dropIndexFromLocalPoint:
            (-[FavoritesBar addDroppedBookmarks:atIndex:]):
    	new method, extracted from performDragOperation:
            (-[FavoritesBar performDragOperation:]):
    	now calls addDroppedBookmarks:atIndex:
            (-[FavoritesBar _lastDraggedEventFollowing:]),
            (-[FavoritesBar _lastDraggedOrUpEventFollowing:]):
    	new methods, cribbed from AppKit
            (-[FavoritesBar constrainProposedButtonFrame:]):
    	new method
            (-[FavoritesBar reorderFavoriteButton:fromMouseDownEvent:]):
    	new method, drags (but not using CoreDragging stuff) button
    	horizontally within bar only
    
            * FavoritesBarView.h:
    	added definition of FavoritesBarReorderingDelegate informal protocol
            * FavoritesBarView.m:
            (-[FavoritesBarView reorderFavoriteButton:fromMouseDownEvent:]):
    	pass call through to delegate (FavoritesBar)
    
            * FavoriteButton.m:
            (-[FavoriteButton currentEventOffsetFromEvent:]):
    	new method, extracted from performDragFromEvent:
            (-[FavoriteButton performDragFromEvent:]):
    	now calls extracted method
            (-[FavoriteButton canDrag]):
    	renamed from canDragButton; now checks whether superview is a
    	FavoritesBarView
            (-[FavoriteButton mouseDown:]):
    	checks whether initial dragging movement was primarily vertical or
    	horizontal; if horizontal, calls new reordering code; if vertical,
    	uses larger hysteresis to minimize accidental poofing
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2642 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index e6fbb92..0e6a8fa 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2002-11-12  John Sullivan  <sullivan at apple.com>
+
+        * Misc.subproj/WebNSViewExtras.h:
+        * Misc.subproj/WebNSViewExtras.m:
+        (-[NSView _web_dragShouldBeginFromMouseDown:withExpiration:xHysteresis:yHysteresis:]):
+	new method
+        (-[NSView _web_dragShouldBeginFromMouseDown:withExpiration:]):
+	now calls the new method, passing the default hysteresis values
+
 2002-11-12  Richard Williamson  <rjw at apple.com>
 
         Implemented letter-spacing and word-spacing CSS properties.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index e6fbb92..0e6a8fa 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-11-12  John Sullivan  <sullivan at apple.com>
+
+        * Misc.subproj/WebNSViewExtras.h:
+        * Misc.subproj/WebNSViewExtras.m:
+        (-[NSView _web_dragShouldBeginFromMouseDown:withExpiration:xHysteresis:yHysteresis:]):
+	new method
+        (-[NSView _web_dragShouldBeginFromMouseDown:withExpiration:]):
+	now calls the new method, passing the default hysteresis values
+
 2002-11-12  Richard Williamson  <rjw at apple.com>
 
         Implemented letter-spacing and word-spacing CSS properties.
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.h b/WebKit/Misc.subproj/WebNSViewExtras.h
index 501bd67..87e98fa 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.h
+++ b/WebKit/Misc.subproj/WebNSViewExtras.h
@@ -5,8 +5,8 @@
 
 #import <AppKit/AppKit.h>
 
-#define DragImageAlpha    		0.75
-#define MaxDragImageSize 		NSMakeSize(400, 400)
+#define WebDragStartHysteresisX			5.0
+#define WebDragStartHysteresisY			5.0
 
 @class WebView;
 
@@ -18,7 +18,18 @@
 // Returns the first WebView superview. Only works if self is the WebView's document view.
 - (WebView *)_web_parentWebView;
 
-- (BOOL)_web_dragShouldBeginFromMouseDown: (NSEvent *)mouseDownEvent withExpiration:(NSDate *)expiration;
+// returns whether a drag should begin starting with mouseDownEvent; if the time
+// passes expiration or the mouse moves less than the hysteresis before the mouseUp event,
+// returns NO, else returns YES.
+- (BOOL)_web_dragShouldBeginFromMouseDown:(NSEvent *)mouseDownEvent
+                           withExpiration:(NSDate *)expiration
+                              xHysteresis:(unsigned)xHysteresis
+                              yHysteresis:(unsigned)yHysteresis;
+
+// Calls _web_dragShouldBeginFromMouseDown:withExpiration:xHysteresis:yHysteresis: with
+// the default values for xHysteresis and yHysteresis
+- (BOOL)_web_dragShouldBeginFromMouseDown:(NSEvent *)mouseDownEvent
+                           withExpiration:(NSDate *)expiration;
 
 // Convenience method. Returns NSDragOperationCopy if _web_bestURLFromPasteboard doesn't return nil.
 // Returns NSDragOperationNone otherwise.
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.m b/WebKit/Misc.subproj/WebNSViewExtras.m
index 571da61..a390e0b 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.m
+++ b/WebKit/Misc.subproj/WebNSViewExtras.m
@@ -11,7 +11,8 @@
 #import <WebFoundation/WebNSStringExtras.h>
 #import <WebFoundation/WebNSURLExtras.h>
 
-#define DragStartHysteresis  		5.0
+#define WebDragImageAlpha    			0.75
+#define WebMaxDragImageSize 			NSMakeSize(400, 400)
 
 #ifdef DEBUG_VIEWS
 @interface NSObject (Foo)
@@ -47,7 +48,10 @@
 }
 
 /* Determine whether a mouse down should turn into a drag; started as copy of NSTableView code */
-- (BOOL)_web_dragShouldBeginFromMouseDown: (NSEvent *)mouseDownEvent withExpiration:(NSDate *)expiration
+- (BOOL)_web_dragShouldBeginFromMouseDown:(NSEvent *)mouseDownEvent
+                           withExpiration:(NSDate *)expiration
+                              xHysteresis:(unsigned)xHysteresis
+                              yHysteresis:(unsigned)yHysteresis
 {
     NSEvent *nextEvent, *firstEvent, *dragEvent, *mouseUp;
     BOOL dragIt;
@@ -75,16 +79,16 @@
             float deltay = ABS([nextEvent locationInWindow].y - [mouseDownEvent locationInWindow].y);
             dragEvent = nextEvent;
 
-            if (deltax >= DragStartHysteresis) {
+            if (deltax >= xHysteresis) {
                 dragIt = YES;
                 break;
             }
 
-            if (deltay >= DragStartHysteresis) {
+            if (deltay >= yHysteresis) {
                 dragIt = YES;
                 break;
             }
-        } else if ([nextEvent type] == NSLeftMouseUp) {
+        } else if ([nextEvent type] == xHysteresis) {
             mouseUp = nextEvent;
             break;
         }
@@ -106,6 +110,16 @@
     return dragIt;
 }
 
+- (BOOL)_web_dragShouldBeginFromMouseDown:(NSEvent *)mouseDownEvent
+                           withExpiration:(NSDate *)expiration
+{
+    return [self _web_dragShouldBeginFromMouseDown:mouseDownEvent
+                                    withExpiration:expiration
+                                       xHysteresis:WebDragStartHysteresisX
+                                       yHysteresis:WebDragStartHysteresisY];
+}
+
+
 - (NSDragOperation)_web_dragOperationForDraggingInfo:(id <NSDraggingInfo>)sender
 {
     if([sender draggingSource] != self && [[sender draggingPasteboard] _web_bestURL]) {
@@ -154,10 +168,10 @@
     *dragImage = [[image copy] autorelease];
     
     NSSize originalSize = [*dragImage size];
-    [*dragImage _web_scaleToMaxSize:MaxDragImageSize];
+    [*dragImage _web_scaleToMaxSize:WebMaxDragImageSize];
     NSSize newSize = [*dragImage size];
 
-    [*dragImage _web_dissolveToFraction:DragImageAlpha];
+    [*dragImage _web_dissolveToFraction:WebDragImageAlpha];
 
     NSPoint mouseDownPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
     NSPoint currentPoint = [self convertPoint:[[_window currentEvent] locationInWindow] fromView:nil];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list