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


The following commit has been merged in the debian/unstable branch:
commit 5489fb348f6e60f368ca53b3941c18876b897c35
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 19 00:46:57 2002 +0000

    WebKit:
    
    	WebKit part of fix for
    
    	- 3000823 -- special-case drag of webloc file to bookmarks
    	- 3004466 -- favorites bar doesn't accept drops of URL strings
    	or webloc files
    
            * Misc.subproj/WebNSViewExtras.h:
    	- make _web_bestURLForDraggingInfo: a class method and have it
    	take an NSPasteboard * instead of an NSDraggingInfo *; change
    	name to _web_bestURLFromPasteboard:
            * Misc.subproj/WebNSViewExtras.m:
            (+[NSView _web_bestURLFromPasteboard:]):
    	- make this a class method and have it take an NSPasteboard *
    	instead of an NSDraggingInfo *
            (-[NSView _web_dragOperationForDraggingInfo:]): Updated for
    	SPI change.
    
            * WebView.subproj/WebView.m:
            (-[WebView draggingEntered:]),
            (-[WebView concludeDragOperation:]): Updated for SPI change.
    
    WebBrowser:
    
    	WebBrowser part of fix for
    
    	- 3000823 -- special-case drag of webloc file to bookmarks
    	- 3004466 -- favorites bar doesn't accept drops of URL strings
    	or webloc files
    
            * BrowserWebBookmarkExtras.h:
            * BrowserWebBookmarkExtras.m:
            (+[WebBookmark defaultTitleFromURL:]):
    	New method, broken out of bookmarkFromURL, now handles remote
    	as well as file URLs, and URLs ending with /.
            (+[WebBookmark bookmarkFromURL:]): call defaultTitleFromURL:
            (+[WebBookmark bookmarkPasteboardTypes]): include the types
    	that _web_bestURLFromPasteboard:
            (+[WebBookmark anyBookmarksOnPasteboard:]):
    	New method, faster than getting bookmarksFromPasteboard and
    	checking for non-empty array; more accurate than just checking
    	bookmarkPasteboardTypes.
            (+[WebBookmark bookmarksFromPasteboard:]):
    	Use _web_bestURLFromPasteboard: if all else fails.
    
            * BookmarksViewController.m:
            (-[BookmarksViewController outlineView:validateDrop:proposedItem:proposedChildIndex:]),
            (-[BookmarksViewController canPaste]):
    	Use +[WebBookmark anyBookmarksOnPasteboard] instead of
    	just checking types, since NSStringPboardType (e.g.) may
    	or may not be convertible to a bookmark
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2093 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 7478c4c..fb9dee6 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,26 @@
+2002-09-18  John Sullivan  <sullivan at apple.com>
+
+	WebKit part of fix for 
+	
+	- 3000823 -- special-case drag of webloc file to bookmarks
+	- 3004466 -- favorites bar doesn't accept drops of URL strings
+	or webloc files
+
+        * Misc.subproj/WebNSViewExtras.h:
+	- make _web_bestURLForDraggingInfo: a class method and have it
+	take an NSPasteboard * instead of an NSDraggingInfo *; change
+	name to _web_bestURLFromPasteboard:
+        * Misc.subproj/WebNSViewExtras.m:
+        (+[NSView _web_bestURLFromPasteboard:]):
+	- make this a class method and have it take an NSPasteboard * 
+	instead of an NSDraggingInfo *
+        (-[NSView _web_dragOperationForDraggingInfo:]): Updated for
+	SPI change.
+
+        * WebView.subproj/WebView.m:
+        (-[WebView draggingEntered:]),
+        (-[WebView concludeDragOperation:]): Updated for SPI change.
+
 2002-09-18  Richard Williamson   <rjw at apple.com>
 
         Added documentation keywords to header.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 7478c4c..fb9dee6 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,26 @@
+2002-09-18  John Sullivan  <sullivan at apple.com>
+
+	WebKit part of fix for 
+	
+	- 3000823 -- special-case drag of webloc file to bookmarks
+	- 3004466 -- favorites bar doesn't accept drops of URL strings
+	or webloc files
+
+        * Misc.subproj/WebNSViewExtras.h:
+	- make _web_bestURLForDraggingInfo: a class method and have it
+	take an NSPasteboard * instead of an NSDraggingInfo *; change
+	name to _web_bestURLFromPasteboard:
+        * Misc.subproj/WebNSViewExtras.m:
+        (+[NSView _web_bestURLFromPasteboard:]):
+	- make this a class method and have it take an NSPasteboard * 
+	instead of an NSDraggingInfo *
+        (-[NSView _web_dragOperationForDraggingInfo:]): Updated for
+	SPI change.
+
+        * WebView.subproj/WebView.m:
+        (-[WebView draggingEntered:]),
+        (-[WebView concludeDragOperation:]): Updated for SPI change.
+
 2002-09-18  Richard Williamson   <rjw at apple.com>
 
         Added documentation keywords to header.
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.h b/WebKit/Misc.subproj/WebNSViewExtras.h
index 2adf955..b466162 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.h
+++ b/WebKit/Misc.subproj/WebNSViewExtras.h
@@ -24,9 +24,10 @@
 
 // Finds the best URL from the NSURLPboardType, NSStringPboardType and NSFilenamesPboardType pasteboard types
 // and gives priority to http and https URLs
-- (NSURL *)_web_bestURLForDraggingInfo:(id <NSDraggingInfo>)sender;
+// FIXME: This method is in an awkward place. It has nothing to do with NSView.
++ (NSURL *)_web_bestURLFromPasteboard:(NSPasteboard *)pasteboard;
 
-// Convenience method. Returns NSDragOperationCopy if _web_bestURLForDraggingInfo doesn't return nil.
+// Convenience method. Returns NSDragOperationCopy if _web_bestURLFromPasteboard doesn't return nil.
 // Returns NSDragOperationNone otherwise.
 - (NSDragOperation)_web_dragOperationForDraggingInfo:(id <NSDraggingInfo>)sender;
 @end
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.m b/WebKit/Misc.subproj/WebNSViewExtras.m
index 393e47b..213ce6d 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.m
+++ b/WebKit/Misc.subproj/WebNSViewExtras.m
@@ -110,19 +110,15 @@
     return [NSArray arrayWithObjects:NSURLPboardType, NSStringPboardType, NSFilenamesPboardType, nil];
 }
 
-- (NSURL *)_web_bestURLForDraggingInfo:(id <NSDraggingInfo>)sender
++ (NSURL *)_web_bestURLFromPasteboard:(NSPasteboard *)pasteboard
 {
-    NSPasteboard *draggingPasteboard;
-    NSArray *types;
-
-    draggingPasteboard = [sender draggingPasteboard];
-    types = [draggingPasteboard types];
+    NSArray *types = [pasteboard types];
 
     if ([types containsObject:NSURLPboardType]) {
         NSURL *URLFromPasteboard;
         NSString *scheme;
 
-        URLFromPasteboard = [NSURL URLFromPasteboard:draggingPasteboard];
+        URLFromPasteboard = [NSURL URLFromPasteboard:pasteboard];
         scheme = [URLFromPasteboard scheme];
         if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"]) {
             return URLFromPasteboard;
@@ -132,7 +128,7 @@
     if ([types containsObject:NSStringPboardType]) {
         NSString *URLString;
 
-        URLString = [[draggingPasteboard stringForType:NSStringPboardType] _web_stringByTrimmingWhitespace];
+        URLString = [[pasteboard stringForType:NSStringPboardType] _web_stringByTrimmingWhitespace];
         if ([URLString _web_looksLikeAbsoluteURL]) {
             return [NSURL _web_URLWithString:URLString];
         }        
@@ -141,7 +137,7 @@
     if ([types containsObject:NSFilenamesPboardType]) {
         NSArray *files;
 
-        files = [draggingPasteboard propertyListForType:NSFilenamesPboardType];
+        files = [pasteboard propertyListForType:NSFilenamesPboardType];
         if ([files count] == 1) {
             NSString *file;
 
@@ -157,7 +153,7 @@
 
 - (NSDragOperation)_web_dragOperationForDraggingInfo:(id <NSDraggingInfo>)sender
 {
-    if([sender draggingSource] != self && [self _web_bestURLForDraggingInfo:sender]) {
+    if([sender draggingSource] != self && [NSView _web_bestURLFromPasteboard:[sender draggingPasteboard]]) {
         return NSDragOperationCopy;
     } else {
         return NSDragOperationNone;
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index f2c3d81..ed9c811 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -146,7 +146,7 @@ enum {
 
 - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
 {
-    if([sender draggingSource] != [self documentView] && [self _web_bestURLForDraggingInfo:sender]) {
+    if([sender draggingSource] != [self documentView] && [NSView _web_bestURLFromPasteboard:[sender draggingPasteboard]]) {
         return NSDragOperationCopy;
     } else {
         return NSDragOperationNone;
@@ -165,7 +165,7 @@ enum {
 
 - (void)concludeDragOperation:(id <NSDraggingInfo>)sender
 {
-    NSURL *URL = [self _web_bestURLForDraggingInfo:sender];
+    NSURL *URL = [NSView _web_bestURLFromPasteboard:[sender draggingPasteboard]];
 
     if(URL){
         WebDataSource *dataSource = [[WebDataSource alloc] initWithURL:URL];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list