[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:25:34 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit ce7ced5cc7cb64c8eed228d8f4973fe6a3273419
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jul 19 19:58:25 2002 +0000
* History.subproj/WebHistoryItem.m:
(-[WebHistoryItem image]): call [WebIconLoader defaultIcon]
* Misc.subproj/WebIconLoader.m:
(+[WebIconLoader defaultIcon]): move bundle image loading code from [WebHistoryItem image] to here.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index fa36247..766e7a5 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,12 @@
2002-07-19 Chris Blumenberg <cblu at apple.com>
+ * History.subproj/WebHistoryItem.m:
+ (-[WebHistoryItem image]): call [WebIconLoader defaultIcon]
+ * Misc.subproj/WebIconLoader.m:
+ (+[WebIconLoader defaultIcon]): move bundle image loading code from [WebHistoryItem image] to here.
+
+2002-07-19 Chris Blumenberg <cblu at apple.com>
+
Added support favicons.
* Misc.subproj/WebIconLoader.h: Added.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index fa36247..766e7a5 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,12 @@
2002-07-19 Chris Blumenberg <cblu at apple.com>
+ * History.subproj/WebHistoryItem.m:
+ (-[WebHistoryItem image]): call [WebIconLoader defaultIcon]
+ * Misc.subproj/WebIconLoader.m:
+ (+[WebIconLoader defaultIcon]): move bundle image loading code from [WebHistoryItem image] to here.
+
+2002-07-19 Chris Blumenberg <cblu at apple.com>
+
Added support favicons.
* Misc.subproj/WebIconLoader.h: Added.
diff --git a/WebKit/History.subproj/WebHistoryItem.m b/WebKit/History.subproj/WebHistoryItem.m
index 5a52d4e..55c0962 100644
--- a/WebKit/History.subproj/WebHistoryItem.m
+++ b/WebKit/History.subproj/WebHistoryItem.m
@@ -6,8 +6,9 @@
// Copyright (c) 2001, 2002 Apple Computer, Inc. All rights reserved.
//
-#import "WebHistoryItem.h"
-#import "WebKitReallyPrivate.h"
+#import <WebKit/WebHistoryItem.h>
+#import <WebKit/WebIconLoader.h>
+#import <WebKit/WebKitReallyPrivate.h>
#import <WebFoundation/WebNSURLExtras.h>
@@ -65,26 +66,12 @@
}
-(NSImage *)image
-{
- static NSImage *defaultImage = nil;
- static BOOL loadedDefaultImage = NO;
-
+{
if (_image != nil) {
return _image;
}
- // Attempt to load default image only once, to avoid performance penalty of repeatedly
- // trying and failing to find it.
- if (!loadedDefaultImage) {
- NSString *pathForDefaultImage =
- [[NSBundle bundleForClass:[WebHistoryItem class]] pathForResource:@"url_icon" ofType:@"tiff"];
- if (pathForDefaultImage != nil) {
- defaultImage = [[NSImage alloc] initByReferencingFile: pathForDefaultImage];
- }
- loadedDefaultImage = YES;
- }
-
- return defaultImage;
+ return [WebIconLoader defaultIcon];
}
-(NSCalendarDate *)lastVisitedDate
diff --git a/WebKit/Misc.subproj/WebIconLoader.m b/WebKit/Misc.subproj/WebIconLoader.m
index 56523a2..4f6986e 100644
--- a/WebKit/Misc.subproj/WebIconLoader.m
+++ b/WebKit/Misc.subproj/WebIconLoader.m
@@ -36,7 +36,21 @@
+ (NSImage *)defaultIcon
{
- return [NSImage imageNamed:@"url_icon"];
+ static NSImage *defaultIcon = nil;
+ static BOOL loadedDefaultImage = NO;
+
+ // Attempt to load default image only once, to avoid performance penalty of repeatedly
+ // trying and failing to find it.
+ if (!loadedDefaultImage) {
+ NSString *pathForDefaultImage =
+ [[NSBundle bundleForClass:[self class]] pathForResource:@"url_icon" ofType:@"tiff"];
+ if (pathForDefaultImage != nil) {
+ defaultIcon = [[NSImage alloc] initByReferencingFile: pathForDefaultImage];
+ }
+ loadedDefaultImage = YES;
+ }
+
+ return defaultIcon;
}
- initWithURL:(NSURL *)iconURL
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list