[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:59:30 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit f07e9c04d650df3563771bf4229a613fbae18c95
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 13 01:56:14 2002 +0000
- fixed 3099487 - REGRESSION: dragging an image always puts it in
the download directory
* WebView.subproj/WebControllerPrivate.h:
* WebView.subproj/WebControllerPrivate.m:
(-[WebController _downloadURL:]): Call _downloadURL:toPath: with nil path.
(-[WebController _downloadURL:toPath:]): New method that
predetermines the path to download to (needed for DnD).
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Use
_downloadURL:toPath:
* WebView.subproj/WebImageView.m:
(-[WebImageView namesOfPromisedFilesDroppedAtDestination:]): Use
_downloadURL:toPath:
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient handle:didReceiveResponse:]): Don't ask
delegate for download path if we already have one.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 3b19c79..28b2114 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,23 @@
+2002-11-12 Maciej Stachowiak <mjs at apple.com>
+
+ - fixed 3099487 - REGRESSION: dragging an image always puts it in
+ the download directory
+
+ * WebView.subproj/WebControllerPrivate.h:
+ * WebView.subproj/WebControllerPrivate.m:
+ (-[WebController _downloadURL:]): Call _downloadURL:toPath: with nil path.
+ (-[WebController _downloadURL:toPath:]): New method that
+ predetermines the path to download to (needed for DnD).
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Use
+ _downloadURL:toPath:
+ * WebView.subproj/WebImageView.m:
+ (-[WebImageView namesOfPromisedFilesDroppedAtDestination:]): Use
+ _downloadURL:toPath:
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient handle:didReceiveResponse:]): Don't ask
+ delegate for download path if we already have one.
+
2002-11-12 Richard Williamson <rjw at apple.com>
Fixed likely cause of 3099047 (and others). Width buffer could underrun in
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 3b19c79..28b2114 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,23 @@
+2002-11-12 Maciej Stachowiak <mjs at apple.com>
+
+ - fixed 3099487 - REGRESSION: dragging an image always puts it in
+ the download directory
+
+ * WebView.subproj/WebControllerPrivate.h:
+ * WebView.subproj/WebControllerPrivate.m:
+ (-[WebController _downloadURL:]): Call _downloadURL:toPath: with nil path.
+ (-[WebController _downloadURL:toPath:]): New method that
+ predetermines the path to download to (needed for DnD).
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Use
+ _downloadURL:toPath:
+ * WebView.subproj/WebImageView.m:
+ (-[WebImageView namesOfPromisedFilesDroppedAtDestination:]): Use
+ _downloadURL:toPath:
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient handle:didReceiveResponse:]): Don't ask
+ delegate for download path if we already have one.
+
2002-11-12 Richard Williamson <rjw at apple.com>
Fixed likely cause of 3099047 (and others). Width buffer could underrun in
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index 6bef8fd..cd064e8 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -52,6 +52,7 @@
- (void)_mainReceivedError:(WebError *)error fromDataSource:(WebDataSource *)dataSource;
+ (NSString *)_MIMETypeForFile:(NSString *)path;
- (void)_downloadURL:(NSURL *)URL;
+- (void)_downloadURL:(NSURL *)URL toPath:(NSString *)path;
- (BOOL)_defersCallbacks;
- (void)_setDefersCallbacks:(BOOL)defers;
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index c10e3ff..10fa3c6 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -187,10 +187,16 @@
- (void)_downloadURL:(NSURL *)URL
{
+ [self _downloadURL:URL toPath:nil];
+}
+
+- (void)_downloadURL:(NSURL *)URL toPath:(NSString *)path
+{
WebDataSource *dataSource = [[WebDataSource alloc] initWithURL:URL];
WebFrame *webFrame = [self mainFrame];
[dataSource _setIsDownloading:YES];
+ [dataSource _setDownloadPath:path];
if([webFrame setProvisionalDataSource:dataSource]){
[webFrame startLoading];
}
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 0354d1b..006a839 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -789,13 +789,9 @@
}
NSString *filename = [[imageURL path] lastPathComponent];
-
-
- // FIXME: need to respect the chosen path here
- [[self _controller] _downloadURL:imageURL];
-#if 0
NSString *path = [[dropDestination path] stringByAppendingPathComponent:filename];
-#endif
+
+ [[self _controller] _downloadURL:imageURL toPath:path];
return [NSArray arrayWithObject:filename];
}
diff --git a/WebKit/WebView.subproj/WebImageView.m b/WebKit/WebView.subproj/WebImageView.m
index 62571d7..f66a217 100644
--- a/WebKit/WebView.subproj/WebImageView.m
+++ b/WebKit/WebView.subproj/WebImageView.m
@@ -199,12 +199,9 @@
{
NSURL *URL = [representation URL];
NSString *filename = [[URL path] lastPathComponent];
-
- // FIXME: need to respect chosen path here
-#if 0
NSString *path = [[dropDestination path] stringByAppendingPathComponent:filename];
-#endif
- [[self controller] _downloadURL:URL];
+
+ [[self controller] _downloadURL:URL toPath:path];
return [NSArray arrayWithObject:filename];
}
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 4346d82..a056d85 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -157,8 +157,11 @@
case WebContentPolicySave:
{
[dataSource _setIsDownloading:YES];
- NSString *saveFilename = [[[dataSource controller] policyDelegate] saveFilenameForResponse:r andRequest:[dataSource request]];
- [dataSource _setDownloadPath:saveFilename];
+
+ if ([dataSource downloadPath] == nil) {
+ NSString *saveFilename = [[[dataSource controller] policyDelegate] saveFilenameForResponse:r andRequest:[dataSource request]];
+ [dataSource _setDownloadPath:saveFilename];
+ }
[[dataSource webFrame] _setProvisionalDataSource:nil];
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 4346d82..a056d85 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -157,8 +157,11 @@
case WebContentPolicySave:
{
[dataSource _setIsDownloading:YES];
- NSString *saveFilename = [[[dataSource controller] policyDelegate] saveFilenameForResponse:r andRequest:[dataSource request]];
- [dataSource _setDownloadPath:saveFilename];
+
+ if ([dataSource downloadPath] == nil) {
+ NSString *saveFilename = [[[dataSource controller] policyDelegate] saveFilenameForResponse:r andRequest:[dataSource request]];
+ [dataSource _setDownloadPath:saveFilename];
+ }
[[dataSource webFrame] _setProvisionalDataSource:nil];
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 6bef8fd..cd064e8 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -52,6 +52,7 @@
- (void)_mainReceivedError:(WebError *)error fromDataSource:(WebDataSource *)dataSource;
+ (NSString *)_MIMETypeForFile:(NSString *)path;
- (void)_downloadURL:(NSURL *)URL;
+- (void)_downloadURL:(NSURL *)URL toPath:(NSString *)path;
- (BOOL)_defersCallbacks;
- (void)_setDefersCallbacks:(BOOL)defers;
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index c10e3ff..10fa3c6 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -187,10 +187,16 @@
- (void)_downloadURL:(NSURL *)URL
{
+ [self _downloadURL:URL toPath:nil];
+}
+
+- (void)_downloadURL:(NSURL *)URL toPath:(NSString *)path
+{
WebDataSource *dataSource = [[WebDataSource alloc] initWithURL:URL];
WebFrame *webFrame = [self mainFrame];
[dataSource _setIsDownloading:YES];
+ [dataSource _setDownloadPath:path];
if([webFrame setProvisionalDataSource:dataSource]){
[webFrame startLoading];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list