[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:39:31 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 5c1568a2fe5b32abc8f6dcc45fc5c3a7ff6e62f4
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Apr 30 22:20:26 2003 +0000

    WebKit:
    
            FIXED: Clients of WebKit should have separate icon DB's
    
            Reviewed by rjw.
    
            * English.lproj/StringsNotToBeLocalized.txt:
            * Misc.subproj/WebIconDatabase.h:
            * Misc.subproj/WebIconDatabase.m:
            (-[WebIconDatabase _createFileDatabase]): If the icon db hasn't been set using the defaults, create o directory using the bundle id.
            * WebKit.exp:
    
    WebBrowser:
    
    	FIXED: Clients of WebKit should have separate icon DB's
    
            Reviewed by rjw.
    
            * AppController.m:
            (+[AppController initialize]): Moved the icon DB rename code here from WebKit. Set the icon DB path.
            * Defaults.plist: Removed unused "safe MIME types" defaults
            * English.lproj/StringsNotToBeLocalized.txt:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4223 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 55f02e3..c9ac989 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2003-04-30  Chris Blumenberg  <cblu at apple.com>
+
+        FIXED: Clients of WebKit should have separate icon DB's
+
+        Reviewed by rjw.
+
+        * English.lproj/StringsNotToBeLocalized.txt:
+        * Misc.subproj/WebIconDatabase.h:
+        * Misc.subproj/WebIconDatabase.m:
+        (-[WebIconDatabase _createFileDatabase]): If the icon db hasn't been set using the defaults, create o directory using the bundle id. 
+        * WebKit.exp:
+
 2003-04-30  Richard Williamson   <rjw at apple.com>
 
         API changes from final review meeting.
diff --git a/WebKit/English.lproj/StringsNotToBeLocalized.txt b/WebKit/English.lproj/StringsNotToBeLocalized.txt
index 0bd6d28..d17f803 100644
--- a/WebKit/English.lproj/StringsNotToBeLocalized.txt
+++ b/WebKit/English.lproj/StringsNotToBeLocalized.txt
@@ -5,7 +5,7 @@
 "%.1lf"
 "%2d) "
 "%@ %@"
-"%@/%@"
+"%@/Library/Caches/WebKitIcons/%@"
 "%@/Library/Preferences/%@"
 "%@:%u"
 "%@://%p"
@@ -63,9 +63,6 @@
 "JoiningOther"
 "JoiningRight"
 "Joy!peff"
-"Library/Caches/WebKit"
-"Library/Caches/WebKit/Icons"
-"Library/Caches/com.apple.WebKit"
 "Library/Internet Plug-Ins"
 "MP4 Audio"
 "MP4 Video"
@@ -131,7 +128,7 @@
 "WebHistoryLoadedNotification"
 "WebHostToSiteURLs"
 "WebIconDatabaseDidAddIconNotification"
-"WebIconDatabaseDirectory"
+"WebIconDatabaseDirectoryDefaultsKey"
 "WebIconDatabaseVersion"
 "WebIconNotificationUserInfoURLKey"
 "WebIconURLToSiteURLs"
diff --git a/WebKit/Misc.subproj/WebIconDatabase.h b/WebKit/Misc.subproj/WebIconDatabase.h
index a239608..b7441e0 100644
--- a/WebKit/Misc.subproj/WebIconDatabase.h
+++ b/WebKit/Misc.subproj/WebIconDatabase.h
@@ -14,6 +14,8 @@ extern NSString *WebIconDatabaseDidAddIconNotification;
 
 extern NSString *WebIconNotificationUserInfoURLKey;
 
+extern NSString *WebIconDatabaseDirectoryDefaultsKey;
+
 extern NSSize WebIconSmallSize;  // 16 x 16
 extern NSSize WebIconMediumSize; // 32 x 32
 extern NSSize WebIconLargeSize;  // 128 x 128
diff --git a/WebKit/Misc.subproj/WebIconDatabase.m b/WebKit/Misc.subproj/WebIconDatabase.m
index 540c5b7..cc3be6d 100644
--- a/WebKit/Misc.subproj/WebIconDatabase.m
+++ b/WebKit/Misc.subproj/WebIconDatabase.m
@@ -15,21 +15,18 @@
 #import <WebFoundation/WebNSURLExtras.h>
 #import <WebFoundation/WebFileDatabase.h>
 
-#define WebIconDatabaseOldContainingDirectory ([NSString stringWithFormat:@"%@/%@", NSHomeDirectory(), @"Library/Caches/com.apple.WebKit"])
-#define WebIconDatabaseNewContainingDirectory ([NSString stringWithFormat:@"%@/%@", NSHomeDirectory(), @"Library/Caches/WebKit"])
-
-#define WebIconDatabaseDefaultDirectory ([NSString stringWithFormat:@"%@/%@", NSHomeDirectory(), @"Library/Caches/WebKit/Icons"])
-
-NSString * const WebIconDatabaseVersionKey = @"WebIconDatabaseVersion";
-NSString * const WebIconsOnDiskKey = @"WebIconsOnDisk";
-NSString * const WebURLToIconURLKey = @"WebSiteURLToIconURLKey";
-NSString * const WebIconURLToURLsKey = @"WebIconURLToSiteURLs";
-NSString * const 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";
+NSString *WebIconNotificationUserInfoURLKey =     @"WebIconNotificationUserInfoURLKey";
+
+NSString *WebIconDatabaseDirectoryDefaultsKey =   @"WebIconDatabaseDirectoryDefaultsKey";
 
 NSSize WebIconSmallSize = {16, 16};
 NSSize WebIconMediumSize = {32, 32};
@@ -220,16 +217,12 @@ NSSize WebIconLargeSize = {128, 128};
 
 - (void)_createFileDatabase
 {
-    // Move over the old database, if we have one. If the new database
-    // already exists, this call will fail with ENOTEMPTY, so we don't
-    // need to worry about overwriting it.
-    rename([WebIconDatabaseOldContainingDirectory fileSystemRepresentation], [WebIconDatabaseNewContainingDirectory fileSystemRepresentation]);
-
     // FIXME: Make defaults key public somehow
-    NSString *databaseDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebIconDatabaseDirectory"];
+    NSString *databaseDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebIconDatabaseDirectoryDefaultsKey];
 
     if (!databaseDirectory) {
-        databaseDirectory = WebIconDatabaseDefaultDirectory;
+        NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
+        databaseDirectory = [NSString stringWithFormat:@"%@/Library/Caches/WebKitIcons/%@", NSHomeDirectory(), bundleIdentifier];
     }
 
     _private->fileDatabase = [[WebFileDatabase alloc] initWithPath:databaseDirectory];
diff --git a/WebKit/WebKit.exp b/WebKit/WebKit.exp
index ac16414..1debc0c 100644
--- a/WebKit/WebKit.exp
+++ b/WebKit/WebKit.exp
@@ -48,6 +48,7 @@ _WebHistoryItemsRemovedNotification
 _WebHistoryLoadedNotification
 _WebHistorySavedNotification
 _WebIconDatabaseDidAddIconNotification
+_WebIconDatabaseDirectoryDefaultsKey
 _WebIconLargeSize
 _WebIconMediumSize
 _WebIconNotificationUserInfoURLKey

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list