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


The following commit has been merged in the debian/unstable branch:
commit 74cb1bf512a207a3f9a5c25d949d299f1783ab96
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 19 18:59:19 2002 +0000

    WebKit:
    
    	- cleaned up some SPI for handling URLs on pasteboard
    
            * Misc.subproj/WebNSPasteboardExtras.h: Added.
            * Misc.subproj/WebNSPasteboardExtras.m: Added.
            (+[NSPasteboard _web_dragTypesForURL]): Moved this here; was
    	-[NSView _web_acceptableDragTypes]
            (-[NSPasteboard _web_bestURL]): Moved this here; was
    	+[NSView _web_bestURLFromPasteboard:]
    
            * WebView.subproj/WebView.m:
            (-[WebView initWithFrame:]),
            (-[WebView draggingEntered:]),
            (-[WebView concludeDragOperation:]):
    	Updated for SPI change; also removed methods now in NSPasteboard.
    
            * Misc.subproj/WebNSViewExtras.h:
            * Misc.subproj/WebNSViewExtras.m:
            (-[NSView _web_dragOperationForDraggingInfo:]):
    	Updated for SPI change.
    
            * WebKit.pbproj/project.pbxproj: Updated for new files.
    
    WebBrowser:
    
    	- updated to match SPI changes in WebKit
    
            * BrowserWebBookmarkExtras.m:
            (+[WebBookmark bookmarkPasteboardTypes]):
    	Use +[NSPasteboard _web_dragTypesForURL] instead of secret inside
    	knowledge about which types are used by [NSPasteboard _web_bestURL]
            (+[WebBookmark anyBookmarksOnPasteboard:]),
            (+[WebBookmark bookmarksFromPasteboard:]):
    	replace +[NSView _web_bestURLFromPasteboard:] with
    	-[NSPasteboard _web_bestURL]
    
            * LocationFieldEditor.m:
            (-[LocationFieldEditor acceptableDragTypes]):
            (-[LocationFieldEditor concludeDragOperation:]):
    	replace +[NSView _web_bestURLFromPasteboard:] with
    	-[NSPasteboard _web_bestURL], and replace -[NSView _web_acceptableDragTypes]
    	with +[NSPasteboard _web_dragTypesForURL]
    
            * LocationTextField.m:
            (-[LocationTextField awakeFromNib]):
            (-[LocationTextField concludeDragOperation:]):
    	replace +[NSView _web_bestURLFromPasteboard:] with
    	-[NSPasteboard _web_bestURL], and replace -[NSView _web_acceptableDragTypes]
    	with +[NSPasteboard _web_dragTypesForURL]
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2099 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index a7211dc..347e3f1 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,27 @@
+2002-09-19  John Sullivan  <sullivan at apple.com>
+
+	- cleaned up some SPI for handling URLs on pasteboard
+
+        * Misc.subproj/WebNSPasteboardExtras.h: Added.
+        * Misc.subproj/WebNSPasteboardExtras.m: Added.
+        (+[NSPasteboard _web_dragTypesForURL]): Moved this here; was
+	-[NSView _web_acceptableDragTypes]
+        (-[NSPasteboard _web_bestURL]): Moved this here; was
+	+[NSView _web_bestURLFromPasteboard:]
+
+        * WebView.subproj/WebView.m:
+        (-[WebView initWithFrame:]),
+        (-[WebView draggingEntered:]),
+        (-[WebView concludeDragOperation:]):
+	Updated for SPI change; also removed methods now in NSPasteboard.
+
+        * Misc.subproj/WebNSViewExtras.h:
+        * Misc.subproj/WebNSViewExtras.m:
+        (-[NSView _web_dragOperationForDraggingInfo:]):
+	Updated for SPI change.
+
+        * WebKit.pbproj/project.pbxproj: Updated for new files.
+
 === Alexander-24 ===
 
 2002-09-18  Darin Adler  <darin at apple.com>
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index a7211dc..347e3f1 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,27 @@
+2002-09-19  John Sullivan  <sullivan at apple.com>
+
+	- cleaned up some SPI for handling URLs on pasteboard
+
+        * Misc.subproj/WebNSPasteboardExtras.h: Added.
+        * Misc.subproj/WebNSPasteboardExtras.m: Added.
+        (+[NSPasteboard _web_dragTypesForURL]): Moved this here; was
+	-[NSView _web_acceptableDragTypes]
+        (-[NSPasteboard _web_bestURL]): Moved this here; was
+	+[NSView _web_bestURLFromPasteboard:]
+
+        * WebView.subproj/WebView.m:
+        (-[WebView initWithFrame:]),
+        (-[WebView draggingEntered:]),
+        (-[WebView concludeDragOperation:]):
+	Updated for SPI change; also removed methods now in NSPasteboard.
+
+        * Misc.subproj/WebNSViewExtras.h:
+        * Misc.subproj/WebNSViewExtras.m:
+        (-[NSView _web_dragOperationForDraggingInfo:]):
+	Updated for SPI change.
+
+        * WebKit.pbproj/project.pbxproj: Updated for new files.
+
 === Alexander-24 ===
 
 2002-09-18  Darin Adler  <darin at apple.com>
diff --git a/WebKit/Misc.subproj/WebNSPasteboardExtras.h b/WebKit/Misc.subproj/WebNSPasteboardExtras.h
new file mode 100644
index 0000000..86009e5
--- /dev/null
+++ b/WebKit/Misc.subproj/WebNSPasteboardExtras.h
@@ -0,0 +1,23 @@
+//
+//  WebNSPasteboardExtras.h
+//  WebKit
+//
+//  Created by John Sullivan on Thu Sep 19 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+
+ at interface NSPasteboard (WebExtras)
+
+// Returns the array of drag types that _web_bestURL handles; note that the presence
+// of one or more of these drag types on the pasteboard is not a guarantee that
+// _web_bestURL will return a non-nil result.
++ (NSArray *)_web_dragTypesForURL;
+
+
+// Finds the best URL from the data on the pasteboard, giving priority to http and https URLs
+-(NSURL *)_web_bestURL;
+
+ at end
diff --git a/WebKit/Misc.subproj/WebNSPasteboardExtras.m b/WebKit/Misc.subproj/WebNSPasteboardExtras.m
new file mode 100644
index 0000000..21e2e28
--- /dev/null
+++ b/WebKit/Misc.subproj/WebNSPasteboardExtras.m
@@ -0,0 +1,64 @@
+//
+//  WebNSPasteboardExtras.m
+//  WebKit
+//
+//  Created by John Sullivan on Thu Sep 19 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import "WebNSPasteboardExtras.h"
+
+#import "WebController.h"
+
+#import <WebFoundation/WebNSStringExtras.h>
+#import <WebFoundation/WebNSURLExtras.h>
+
+ at implementation NSPasteboard (WebExtras)
+
++ (NSArray *)_web_dragTypesForURL
+{
+    return [NSArray arrayWithObjects:NSURLPboardType, NSStringPboardType, NSFilenamesPboardType, nil];
+}
+
+-(NSURL *)_web_bestURL
+{
+    NSArray *types = [self types];
+
+    if ([types containsObject:NSURLPboardType]) {
+        NSURL *URLFromPasteboard;
+        NSString *scheme;
+
+        URLFromPasteboard = [NSURL URLFromPasteboard:self];
+        scheme = [URLFromPasteboard scheme];
+        if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"]) {
+            return URLFromPasteboard;
+        }
+    }
+
+    if ([types containsObject:NSStringPboardType]) {
+        NSString *URLString;
+
+        URLString = [[self stringForType:NSStringPboardType] _web_stringByTrimmingWhitespace];
+        if ([URLString _web_looksLikeAbsoluteURL]) {
+            return [NSURL _web_URLWithString:URLString];
+        }
+    }
+
+    if ([types containsObject:NSFilenamesPboardType]) {
+        NSArray *files;
+
+        files = [self propertyListForType:NSFilenamesPboardType];
+        if ([files count] == 1) {
+            NSString *file;
+
+            file = [files objectAtIndex:0];
+            if ([WebController canShowFile:file]) {
+                return [NSURL fileURLWithPath:file];
+            }
+        }
+    }
+
+    return nil;
+}
+
+ at end
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.h b/WebKit/Misc.subproj/WebNSViewExtras.h
index b466162..505d3b0 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.h
+++ b/WebKit/Misc.subproj/WebNSViewExtras.h
@@ -17,16 +17,6 @@
 
 - (BOOL)_web_dragShouldBeginFromMouseDown: (NSEvent *)mouseDownEvent withExpiration:(NSDate *)expiration;
 
-// FIXME: The following can be class methods
-
-// Returns an array with NSURLPboardType, NSStringPboardType and NSFilenamesPboardType pasteboard types
-- (NSArray *)_web_acceptableDragTypes;
-
-// Finds the best URL from the NSURLPboardType, NSStringPboardType and NSFilenamesPboardType pasteboard types
-// and gives priority to http and https URLs
-// 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_bestURLFromPasteboard doesn't return nil.
 // Returns NSDragOperationNone otherwise.
 - (NSDragOperation)_web_dragOperationForDraggingInfo:(id <NSDraggingInfo>)sender;
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.m b/WebKit/Misc.subproj/WebNSViewExtras.m
index 213ce6d..50c129b 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.m
+++ b/WebKit/Misc.subproj/WebNSViewExtras.m
@@ -3,8 +3,9 @@
         Copyright (c) 2002, Apple, Inc. All rights reserved.
 */
 
-#import <WebKit/WebController.h>
 #import <WebKit/WebNSViewExtras.h>
+
+#import <WebKit/WebNSPasteboardExtras.h>
 #import <WebKit/WebView.h>
 
 #import <WebFoundation/WebNSStringExtras.h>
@@ -105,55 +106,9 @@
     return dragIt;
 }
 
-- (NSArray *)_web_acceptableDragTypes
-{
-    return [NSArray arrayWithObjects:NSURLPboardType, NSStringPboardType, NSFilenamesPboardType, nil];
-}
-
-+ (NSURL *)_web_bestURLFromPasteboard:(NSPasteboard *)pasteboard
-{
-    NSArray *types = [pasteboard types];
-
-    if ([types containsObject:NSURLPboardType]) {
-        NSURL *URLFromPasteboard;
-        NSString *scheme;
-
-        URLFromPasteboard = [NSURL URLFromPasteboard:pasteboard];
-        scheme = [URLFromPasteboard scheme];
-        if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"]) {
-            return URLFromPasteboard;
-        }
-    }
-
-    if ([types containsObject:NSStringPboardType]) {
-        NSString *URLString;
-
-        URLString = [[pasteboard stringForType:NSStringPboardType] _web_stringByTrimmingWhitespace];
-        if ([URLString _web_looksLikeAbsoluteURL]) {
-            return [NSURL _web_URLWithString:URLString];
-        }        
-    }
-
-    if ([types containsObject:NSFilenamesPboardType]) {
-        NSArray *files;
-
-        files = [pasteboard propertyListForType:NSFilenamesPboardType];
-        if ([files count] == 1) {
-            NSString *file;
-
-            file = [files objectAtIndex:0];
-            if ([WebController canShowFile:file]) {
-                return [NSURL fileURLWithPath:file];
-            }
-        }
-    }
-    
-    return nil;
-}
-
 - (NSDragOperation)_web_dragOperationForDraggingInfo:(id <NSDraggingInfo>)sender
 {
-    if([sender draggingSource] != self && [NSView _web_bestURLFromPasteboard:[sender draggingPasteboard]]) {
+    if([sender draggingSource] != self && [[sender draggingPasteboard] _web_bestURL]) {
         return NSDragOperationCopy;
     } else {
         return NSDragOperationNone;
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index fcc7885..6bbd1c5 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -275,6 +275,7 @@
 				5130FC36033940B400CA2ACD,
 				5130FC380339411F00CA2ACD,
 				5130FC3A033946E600CA2ACD,
+				ED2B2476033A2DA800C1A526,
 			);
 			isa = PBXHeadersBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -362,6 +363,7 @@
 				F528E3ED031E91AD01CA2ACA,
 				93AEB180032C1735008635CE,
 				6523FAD2032DA06B005EFCFF,
+				ED2B2477033A2DA800C1A526,
 			);
 			isa = PBXSourcesBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -436,6 +438,8 @@
 				2568C72C0174912D0ECA149E,
 				F5927D4E02D26C5E01CA2DBB,
 				F5C283730284676D018635CA,
+				ED2B2474033A2DA800C1A526,
+				ED2B2475033A2DA800C1A526,
 				F508946902B71D59018A9CD4,
 				F508946A02B71D59018A9CD4,
 				F560BEBC030DAF4401C1A526,
@@ -1393,6 +1397,43 @@
 //9C2
 //9C3
 //9C4
+//ED0
+//ED1
+//ED2
+//ED3
+//ED4
+		ED2B2474033A2DA800C1A526 = {
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = WebNSPasteboardExtras.h;
+			refType = 4;
+		};
+		ED2B2475033A2DA800C1A526 = {
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = WebNSPasteboardExtras.m;
+			refType = 4;
+		};
+		ED2B2476033A2DA800C1A526 = {
+			fileRef = ED2B2474033A2DA800C1A526;
+			isa = PBXBuildFile;
+			settings = {
+				ATTRIBUTES = (
+					Private,
+				);
+			};
+		};
+		ED2B2477033A2DA800C1A526 = {
+			fileRef = ED2B2475033A2DA800C1A526;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+//ED0
+//ED1
+//ED2
+//ED3
+//ED4
 //F50
 //F51
 //F52
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index ed9c811..30a2e8f 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -16,6 +16,7 @@
 #import <WebKit/WebImageView.h>
 #import <WebKit/WebKitErrors.h>
 #import <WebKit/WebKitStatisticsPrivate.h>
+#import <WebKit/WebNSPasteboardExtras.h>
 #import <WebKit/WebNSViewExtras.h>
 #import <WebKit/WebTextRendererFactory.h>
 #import <WebKit/WebTextView.h>
@@ -72,7 +73,7 @@ enum {
     [scrollView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
     [self addSubview: scrollView];
     
-    [self registerForDraggedTypes:[self _web_acceptableDragTypes]];
+    [self registerForDraggedTypes:[NSPasteboard _web_dragTypesForURL]];
     
     ++WebViewCount;
     
@@ -146,7 +147,7 @@ enum {
 
 - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
 {
-    if([sender draggingSource] != [self documentView] && [NSView _web_bestURLFromPasteboard:[sender draggingPasteboard]]) {
+    if([sender draggingSource] != [self documentView] && [[sender draggingPasteboard] _web_bestURL]) {
         return NSDragOperationCopy;
     } else {
         return NSDragOperationNone;
@@ -165,7 +166,7 @@ enum {
 
 - (void)concludeDragOperation:(id <NSDraggingInfo>)sender
 {
-    NSURL *URL = [NSView _web_bestURLFromPasteboard:[sender draggingPasteboard]];
+    NSURL *URL = [[sender draggingPasteboard] _web_bestURL];
 
     if(URL){
         WebDataSource *dataSource = [[WebDataSource alloc] initWithURL:URL];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list