[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:43:38 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 610471039403cccb9d23725d18c1d29cfee21e8e
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 24 04:28:23 2002 +0000
WebKit:
Factored URL pasteboard initialization to 1 place.
Fixed: 3048924 - regression: drag & drop broken for initial empty page
Fixed: 3045997 - Dragging a link from one Alex window to another one doesn't work
* Misc.subproj/WebNSPasteboardExtras.h:
* Misc.subproj/WebNSPasteboardExtras.m:
(-[NSPasteboard _web_writeURL:andTitle:withOwner:]): new
* WebView.subproj/WebDefaultContextMenuDelegate.m:
(-[WebDefaultContextMenuDelegate copyLinkToClipboard:]): call -[NSPasteboard _web_writeURL:andTitle:withOwner:]
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView mouseDragged:]): call -[NSPasteboard _web_writeURL:andTitle:withOwner:]
* WebView.subproj/WebView.m:
(-[WebView draggingEntered:]): handle nil cases
WebBrowser:
* main.m:
(main): Fixed comment
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b31d3c5..b97f106 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2002-09-23 Chris Blumenberg <cblu at apple.com>
+
+ Factored URL pasteboard initialization to 1 place.
+ Fixed: 3048924 - regression: drag & drop broken for initial empty page
+ Fixed: 3045997 - Dragging a link from one Alex window to another one doesn't work
+
+ * Misc.subproj/WebNSPasteboardExtras.h:
+ * Misc.subproj/WebNSPasteboardExtras.m:
+ (-[NSPasteboard _web_writeURL:andTitle:withOwner:]): new
+ * WebView.subproj/WebDefaultContextMenuDelegate.m:
+ (-[WebDefaultContextMenuDelegate copyLinkToClipboard:]): call -[NSPasteboard _web_writeURL:andTitle:withOwner:]
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView mouseDragged:]): call -[NSPasteboard _web_writeURL:andTitle:withOwner:]
+ * WebView.subproj/WebView.m:
+ (-[WebView draggingEntered:]): handle nil cases
+
2002-09-23 Maciej Stachowiak <mjs at apple.com>
Added documentation for these two delegate protocols.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index b31d3c5..b97f106 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,19 @@
+2002-09-23 Chris Blumenberg <cblu at apple.com>
+
+ Factored URL pasteboard initialization to 1 place.
+ Fixed: 3048924 - regression: drag & drop broken for initial empty page
+ Fixed: 3045997 - Dragging a link from one Alex window to another one doesn't work
+
+ * Misc.subproj/WebNSPasteboardExtras.h:
+ * Misc.subproj/WebNSPasteboardExtras.m:
+ (-[NSPasteboard _web_writeURL:andTitle:withOwner:]): new
+ * WebView.subproj/WebDefaultContextMenuDelegate.m:
+ (-[WebDefaultContextMenuDelegate copyLinkToClipboard:]): call -[NSPasteboard _web_writeURL:andTitle:withOwner:]
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView mouseDragged:]): call -[NSPasteboard _web_writeURL:andTitle:withOwner:]
+ * WebView.subproj/WebView.m:
+ (-[WebView draggingEntered:]): handle nil cases
+
2002-09-23 Maciej Stachowiak <mjs at apple.com>
Added documentation for these two delegate protocols.
diff --git a/WebKit/Misc.subproj/WebNSPasteboardExtras.h b/WebKit/Misc.subproj/WebNSPasteboardExtras.h
index 86009e5..5fb68fa 100644
--- a/WebKit/Misc.subproj/WebNSPasteboardExtras.h
+++ b/WebKit/Misc.subproj/WebNSPasteboardExtras.h
@@ -20,4 +20,6 @@
// Finds the best URL from the data on the pasteboard, giving priority to http and https URLs
-(NSURL *)_web_bestURL;
+- (void)_web_writeURL:(NSURL *)URL andTitle:(NSString *)title withOwner:(id)owner;
+
@end
diff --git a/WebKit/Misc.subproj/WebNSPasteboardExtras.m b/WebKit/Misc.subproj/WebNSPasteboardExtras.m
index 21e2e28..03676ca 100644
--- a/WebKit/Misc.subproj/WebNSPasteboardExtras.m
+++ b/WebKit/Misc.subproj/WebNSPasteboardExtras.m
@@ -6,9 +6,9 @@
// Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
//
-#import "WebNSPasteboardExtras.h"
-
-#import "WebController.h"
+#import <WebKit/WebController.h>
+#import <WebKit/WebNSPasteboardExtras.h>
+#import <WebKit/WebURLsWithTitles.h>
#import <WebFoundation/WebNSStringExtras.h>
#import <WebFoundation/WebNSURLExtras.h>
@@ -61,4 +61,14 @@
return nil;
}
+- (void)_web_writeURL:(NSURL *)URL andTitle:(NSString *)title withOwner:(id)owner
+{
+ NSArray *types = [NSArray arrayWithObjects:WebURLsWithTitlesPboardType, NSURLPboardType, NSStringPboardType, nil];
+ [self declareTypes:types owner:owner];
+
+ [URL writeToPasteboard:self];
+ [self setString:[URL absoluteString] forType:NSStringPboardType];
+ [WebURLsWithTitles writeURLs:[NSArray arrayWithObject:URL] andTitles:[NSArray arrayWithObject:title] toPasteboard:self];
+}
+
@end
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
index 05071fd..439371b 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
@@ -11,6 +11,7 @@
#import <WebKit/WebDataSourcePrivate.h>
#import <WebKit/WebDefaultContextMenuDelegate.h>
#import <WebKit/WebFrame.h>
+#import <WebKit/WebNSPasteboardExtras.h>
#import <WebKit/WebWindowOperationsDelegate.h>
@implementation WebDefaultContextMenuDelegate
@@ -118,11 +119,9 @@
- (void)copyLinkToClipboard:(id)sender
{
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
- NSURL *URL = [element objectForKey:WebContextMenuElementLinkURLKey];
-
- [pasteboard declareTypes:[NSArray arrayWithObjects:NSURLPboardType, NSStringPboardType, nil] owner:nil];
- [pasteboard setString:[URL absoluteString] forType:NSStringPboardType];
- [URL writeToPasteboard:pasteboard];
+ [pasteboard _web_writeURL:[element objectForKey:WebContextMenuElementLinkURLKey]
+ andTitle:[element objectForKey:WebContextMenuElementLinkLabelKey]
+ withOwner:self];
}
- (void)openImageInNewWindow:(id)sender
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index f418d62..40e8d04 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -147,7 +147,8 @@ enum {
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
- if([sender draggingSource] != [self documentView] && [[sender draggingPasteboard] _web_bestURL]) {
+ if((![self documentView] || ([sender draggingSource] != [self documentView])) &&
+ [[sender draggingPasteboard] _web_bestURL]) {
return NSDragOperationCopy;
} else {
return NSDragOperationNone;
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 54a69d4..6751766 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -17,12 +17,12 @@
#import <WebKit/WebIconDatabase.h>
#import <WebKit/WebIconLoader.h>
#import <WebKit/WebKitLogging.h>
+#import <WebKit/WebNSPasteboardExtras.h>
#import <WebKit/WebNSViewExtras.h>
#import <WebKit/WebPreferences.h>
#import <WebKit/WebStringTruncator.h>
#import <WebKit/WebTextRenderer.h>
#import <WebKit/WebTextRendererFactory.h>
-#import <WebKit/WebURLsWithTitles.h>
#import <WebKit/WebViewPrivate.h>
// Needed for the mouse moved notification.
@@ -520,8 +520,7 @@
[dragImage unlockFocus];
NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard];
- [pasteboard declareTypes:[NSArray arrayWithObjects:NSURLPboardType, WebURLsWithTitlesPboardType, nil] owner:nil];
- [WebURLsWithTitles writeURLs:[NSArray arrayWithObject:linkURL] andTitles:[NSArray arrayWithObject:label] toPasteboard:pasteboard];
+ [pasteboard _web_writeURL:linkURL andTitle:label withOwner:self];
NSPoint mousePoint = [self convertPoint:[event locationInWindow] fromView:nil];
NSSize centerOffset = NSMakeSize(imageSize.width / 2, -DRAG_LABEL_BORDER_Y);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list