[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 07:33:19 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 089726fb4cf303e94d8371842e185d847195f380
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Apr 2 03:25:51 2003 +0000
Reviewed by Richard.
- fixed 3214748 - REGRESSION: After using latest Safari for awhile, can't launch older Safaris (icon db problem)
* Misc.subproj/WebIconDatabase.m:
Changed icon cache path, since we are breaking compatibility and the old version
does not support versioning.
(-[WebIconDatabase _loadIconDictionaries]): Check version.
(-[WebIconDatabase _updateFileDatabase]): Save version.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b357f48..182b646 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2003-04-01 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Richard.
+
+ - fixed 3214748 - REGRESSION: After using latest Safari for awhile, can't launch older Safaris (icon db problem)
+
+ * Misc.subproj/WebIconDatabase.m:
+ Changed icon cache path, since we are breaking compatibility and the old version
+ does not support versioning.
+ (-[WebIconDatabase _loadIconDictionaries]): Check version.
+ (-[WebIconDatabase _updateFileDatabase]): Save version.
+
2003-04-01 Ken Kocienda <kocienda at apple.com>
Reviewed by Darin
@@ -132,8 +144,6 @@
2003-03-31 Richard Williamson <rjw at apple.com>
-2003-03-31 Richard Williamson <rjw at apple.com>
-
Fixed 3213637. We weren't calling the correct delegate method,
setStatus: instead of webView:setStatus:
diff --git a/WebKit/Misc.subproj/WebIconDatabase.m b/WebKit/Misc.subproj/WebIconDatabase.m
index 3cdb4c8..f684791 100644
--- a/WebKit/Misc.subproj/WebIconDatabase.m
+++ b/WebKit/Misc.subproj/WebIconDatabase.m
@@ -15,12 +15,15 @@
#import <WebFoundation/WebNSURLExtras.h>
#import <WebFoundation/WebFileDatabase.h>
-#define WebIconDatabaseDefaultDirectory ([NSString stringWithFormat:@"%@/%@", NSHomeDirectory(), @"Library/Caches/com.apple.WebKit/Icons"])
+#define WebIconDatabaseDefaultDirectory ([NSString stringWithFormat:@"%@/%@", NSHomeDirectory(), @"Library/Caches/WebKit/Icons"])
-#define WebIconsOnDiskKey @"WebIconsOnDisk"
-#define WebURLToIconURLKey @"WebSiteURLToIconURLKey"
-#define WebIconURLToURLsKey @"WebIconURLToSiteURLs"
-#define WebHostToURLsKey @"WebHostToSiteURLs"
+NSString * const WebIconDatabaseVersionKey = @"WebIconDatabaseVersion";
+NSString * const WebIconsOnDiskKey = @"WebIconsOnDisk";
+NSString * const WebURLToIconURLKey = @"WebSiteURLToIconURLKey";
+NSString * const WebIconURLToURLsKey = @"WebIconURLToSiteURLs";
+NSString * const WebHostToURLsKey = @"WebHostToSiteURLs";
+
+static const int WebIconDatabaseCurrentVersion = 1;
NSString *WebIconDatabaseDidAddIconNotification = @"WebIconDatabaseDidAddIconNotification";
NSString *WebIconNotificationUserInfoURLKey = @"WebIconNotificationUserInfoURLKey";
@@ -271,9 +274,12 @@ NSSize WebIconLargeSize = {128, 128};
{
WebFileDatabase *fileDB = _private->fileDatabase;
- _private->iconsOnDiskWithURLs = [fileDB objectForKey:WebIconsOnDiskKey];
- _private->URLToIconURL = [fileDB objectForKey:WebURLToIconURLKey];
- _private->iconURLToURLs = [fileDB objectForKey:WebIconURLToURLsKey];
+ NSNumber *version = [fileDB objectForKey:WebIconDatabaseVersionKey];
+ if (version != nil && [version isKindOfClass:[NSNumber class]] && [version intValue] == WebIconDatabaseCurrentVersion) {
+ _private->iconsOnDiskWithURLs = [fileDB objectForKey:WebIconsOnDiskKey];
+ _private->URLToIconURL = [fileDB objectForKey:WebURLToIconURLKey];
+ _private->iconURLToURLs = [fileDB objectForKey:WebIconURLToURLsKey];
+ }
if (![self _iconDictionariesAreGood]) {
_private->iconsOnDiskWithURLs = [NSMutableSet set];
@@ -295,6 +301,8 @@ NSSize WebIconLargeSize = {128, 128};
WebFileDatabase *fileDB = _private->fileDatabase;
+ [fileDB setObject:[NSNumber numberWithInt:WebIconDatabaseCurrentVersion] forKey:WebIconDatabaseVersionKey];
+
// Erase icons that have been released that are on disk.
// Must remove icons before writing them to disk or else we could potentially remove the newly written ones.
NSEnumerator *enumerator = [_private->iconsToEraseWithURLs objectEnumerator];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list