[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 07:30:49 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 1efc6d38945f6f2bc0fa34938512dd01099ce943
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 21 00:15:22 2003 +0000
WebKit:
Properly handle file URL directory errors.
Reviewed by trey.
* Misc.subproj/WebIconDatabase.m:
(-[WebIconDatabase _iconForFileURL:withSize:]): when file URL has no path, return generic file icon
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient interruptForPolicyChangeError]): set the URL, don't set it to nil!
WebBrowser:
Fixed: 3204064 - REGRESSION: PDF URL is left in location for after download
Properly handle file URL directory errors.
Reviewed by darin.
* BrowserWebController.m:
(-[BrowserWebController expectedOrCurrentURL]): don't use the URL of the provisional data source if it is not loading.
* LocationChangeHandler.m:
(-[LocationChangeHandler webView:locationChangeDone:forDataSource:]): tweak, use [NSWorkspace isFilePackageAtPath:] instead of LaunchServices because it is easier.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 73accef..07e0ba6 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2003-03-20 Chris Blumenberg <cblu at apple.com>
+
+ Properly handle file URL directory errors.
+
+ Reviewed by trey.
+
+ * Misc.subproj/WebIconDatabase.m:
+ (-[WebIconDatabase _iconForFileURL:withSize:]): when file URL has no path, return generic file icon
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient interruptForPolicyChangeError]): set the URL, don't set it to nil!
+
2003-03-20 Vicki Murley <vicki at apple.com>
don't include WebFoundation.h
diff --git a/WebKit/Misc.subproj/WebIconDatabase.m b/WebKit/Misc.subproj/WebIconDatabase.m
index 401946d..2553bfa 100644
--- a/WebKit/Misc.subproj/WebIconDatabase.m
+++ b/WebKit/Misc.subproj/WebIconDatabase.m
@@ -379,29 +379,29 @@ NSSize WebIconLargeSize = {128, 128};
{
ASSERT(size.width);
ASSERT(size.height);
-
- NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
- NSImage *icon;
- NSURL *URL = [NSURL _web_URLWithString:file];
- if (!URL) {
- return nil;
- }
- NSString *path = [URL path];
+ NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
+ NSString *path = [[NSURL _web_URLWithString:file] path];
NSString *suffix = [path pathExtension];
- if([suffix _web_isCaseInsensitiveEqualToString:@"htm"]
- || [suffix _web_isCaseInsensitiveEqualToString:@"html"])
- {
- if(!_private->htmlIcons){
+ NSImage *icon = nil;
+
+ if ([suffix _web_isCaseInsensitiveEqualToString:@"htm"] || [suffix _web_isCaseInsensitiveEqualToString:@"html"]) {
+ if (!_private->htmlIcons) {
icon = [workspace iconForFileType:@"html"];
_private->htmlIcons = [[self _iconsBySplittingRepresentationsOfIcon:icon] retain];
}
- return [self _iconFromDictionary:_private->htmlIcons forSize:size cache:YES];
- }else{
- icon = [workspace iconForFile:path];
+ icon = [self _iconFromDictionary:_private->htmlIcons forSize:size cache:YES];
+ } else {
+ if (!path || ![path isAbsolutePath]) {
+ // Return the generic icon when there is no path.
+ icon = [workspace iconForFileType:@"????"];
+ } else {
+ icon = [workspace iconForFile:path];
+ }
[self _scaleIcon:icon toSize:size];
- return icon;
}
+
+ return icon;
}
- (void)_setIcon:(NSImage *)icon forIconURL:(NSString *)iconURL
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index bc13556..91ce691 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -83,7 +83,7 @@
{
return [WebError errorWithCode:WebKitErrorLocationChangeInterruptedByPolicyChange
inDomain:WebErrorDomainWebKit
- failingURL:nil];
+ failingURL:[[request URL] absoluteString]];
}
-(void)stopLoadingForPolicyChange
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index bc13556..91ce691 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -83,7 +83,7 @@
{
return [WebError errorWithCode:WebKitErrorLocationChangeInterruptedByPolicyChange
inDomain:WebErrorDomainWebKit
- failingURL:nil];
+ failingURL:[[request URL] absoluteString]];
}
-(void)stopLoadingForPolicyChange
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list