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


The following commit has been merged in the debian/unstable branch:
commit ebd03103068604a2e5caece9c13e381f8abf121c
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jul 30 19:04:53 2002 +0000

    WebKit:
    
    	- fixed 3012083 "Looked for URLs on the pasteboard, but found
    	none" spam dragging nil-target bookmark
    
            * Misc.subproj/WebNSViewExtras.m:
            (-[NSView _web_bestURLForDraggingInfo:]):
    	This method was getting data for types on the pasteboard without
    	first checking whether the types were on the pasteboard, a no-no.
    	Restructured this method and tweaked it here and there also.
    
            (-[NSView _web_dragOperationForDraggingInfo:]): moved a fast
    	test in front of a slow test
    
    WebBrowser:
    
    	- fixed 3011887 -- dropping favorite on a favorites folder
    	makes copy but should move
    
            * FavoriteButton.m:
            (-[FavoriteButton determineDragOperation:]): New helper routine
    	to decide between move & copy based on drag source and option key
    	state.
            (-[FavoriteButton draggingEntered:]),
            (-[FavoriteButton draggingUpdated:]):
    	use determineDragOperation.
    
            * ToolbarButtonItem.m:
            (+[ToolbarButtonItem itemWithIdentifier:button:action:]):
    	tweaked this while investigating some other bug.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1698 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 74b619a..3cc2981 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2002-07-30  John Sullivan  <sullivan at apple.com>
+
+	- fixed 3012083 "Looked for URLs on the pasteboard, but found
+	none" spam dragging nil-target bookmark
+
+        * Misc.subproj/WebNSViewExtras.m:
+        (-[NSView _web_bestURLForDraggingInfo:]):
+	This method was getting data for types on the pasteboard without
+	first checking whether the types were on the pasteboard, a no-no.
+	Restructured this method and tweaked it here and there also.
+
+        (-[NSView _web_dragOperationForDraggingInfo:]): moved a fast
+	test in front of a slow test
+
 2002-07-29  Richard Williamson  <rjw at apple.com>
 
         Removed setDirectsAllLinksToSystemBrowser: method, not needed
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 74b619a..3cc2981 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,17 @@
+2002-07-30  John Sullivan  <sullivan at apple.com>
+
+	- fixed 3012083 "Looked for URLs on the pasteboard, but found
+	none" spam dragging nil-target bookmark
+
+        * Misc.subproj/WebNSViewExtras.m:
+        (-[NSView _web_bestURLForDraggingInfo:]):
+	This method was getting data for types on the pasteboard without
+	first checking whether the types were on the pasteboard, a no-no.
+	Restructured this method and tweaked it here and there also.
+
+        (-[NSView _web_dragOperationForDraggingInfo:]): moved a fast
+	test in front of a slow test
+
 2002-07-29  Richard Williamson  <rjw at apple.com>
 
         Removed setDirectsAllLinksToSystemBrowser: method, not needed
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.m b/WebKit/Misc.subproj/WebNSViewExtras.m
index e7685cf..86aff21 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.m
+++ b/WebKit/Misc.subproj/WebNSViewExtras.m
@@ -112,34 +112,52 @@
 
 - (NSURL *)_web_bestURLForDraggingInfo:(id <NSDraggingInfo>)sender
 {
-    NSPasteboard *draggingPasteboard = [sender draggingPasteboard];        
-    NSURL *bestURL = [NSURL URLFromPasteboard:draggingPasteboard];
-    NSString *scheme = [bestURL scheme];
-    
-    if(!bestURL || ![scheme isEqualToString:@"http"] || ![scheme isEqualToString:@"https"]){
+    NSPasteboard *draggingPasteboard;
+    NSArray *types;
+
+    draggingPasteboard = [sender draggingPasteboard];
+    types = [draggingPasteboard types];
+
+    if ([types containsObject:NSURLPboardType]) {
+        NSURL *URLFromPasteboard;
+        NSString *scheme;
 
-        NSString *URLString = [[draggingPasteboard stringForType:NSStringPboardType] _web_stringByTrimmingWhitespace];
-        if(URLString && [URLString _web_looksLikeAbsoluteURL]){
-            bestURL = [NSURL _web_URLWithString:URLString];
+        URLFromPasteboard = [NSURL URLFromPasteboard:draggingPasteboard];
+        scheme = [URLFromPasteboard scheme];
+        if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"]) {
+            return URLFromPasteboard;
         }
+    }
+
+    if ([types containsObject:NSStringPboardType]) {
+        NSString *URLString;
+
+        URLString = [[draggingPasteboard stringForType:NSStringPboardType] _web_stringByTrimmingWhitespace];
+        if ([URLString _web_looksLikeAbsoluteURL]) {
+            return [NSURL _web_URLWithString:URLString];
+        }        
+    }
+
+    if ([types containsObject:NSFilenamesPboardType]) {
+        NSArray *files;
+
+        files = [draggingPasteboard propertyListForType:NSFilenamesPboardType];
+        if ([files count] == 1) {
+            NSString *file;
 
-        if(!bestURL){
-            NSArray *files = [draggingPasteboard propertyListForType:NSFilenamesPboardType];
-            if(files && [files count] == 1){
-                NSString *file = [files objectAtIndex:0];
-                if([WebController canShowFile:file]){
-                    bestURL = [NSURL fileURLWithPath:file];
-                }
+            file = [files objectAtIndex:0];
+            if ([WebController canShowFile:file]) {
+                return [NSURL fileURLWithPath:file];
             }
         }
     }
-
-    return bestURL;
+    
+    return nil;
 }
 
 - (NSDragOperation)_web_dragOperationForDraggingInfo:(id <NSDraggingInfo>)sender
 {
-    if([self _web_bestURLForDraggingInfo:sender] && [sender draggingSource] != self){
+    if([sender draggingSource] != self && [self _web_bestURLForDraggingInfo:sender]) {
         return NSDragOperationCopy;
     } else {
         return NSDragOperationNone;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list