[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

sullivan sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:16:39 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 68d6d24db3cd36645b1de38ae4bb01a191357c32
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 20 04:48:11 2002 +0000

    WebKit:
    
    	- WebKit part of fix for 3124949 -- Alexander recreates the
    	default set of bookmarks every time a separate app copy is launched
    
            Reviewed by Darin
    
            * Bookmarks.subproj/WebBookmarkGroup.h:
    	new _tag ivar and -tag method.
    
            * Bookmarks.subproj/WebBookmarkGroup.m:
            (-[WebBookmarkGroup dealloc]):
    	release _tag
            (-[WebBookmarkGroup tag]):
    	return _tag
            (-[WebBookmarkGroup _loadBookmarkGroupGuts]):
    	read _tag from the dictionary in the file (or leave it at
    	nil if there's no value in the file).
    
            * English.lproj/StringsNotToBeLocalized.txt:
    	kept this file up to date
    
    WebBrowser:
    
    	- WebBrowser part of fix for 3124949 -- Alexander recreates the
    	default set of bookmarks every time a separate app copy is launched
    
            Reviewed by Darin
    
            * BookmarksController.m:
            (-[BookmarksController mergeBuiltInBookmarksIfNecessary]):
    	if the mod date has changed since the last time this was
    	checked, check the tag in the bookmarks	group (loaded from the
    	file) to see if it has changed. If the tag hasn't changed, then
    	don't merge the built-in bookmarks.
    
            * PreferenceKeys.h:
    	new #define BuiltInBookmarksTagPreferenceKey
    
            * English.lproj/BuiltInBookmarks.plist:
    	Added tag (happens to be string that looks like a date) to
    	this file. We'll update this whenever we update the contents.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3144 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Bookmarks.subproj/WebBookmarkGroup.h b/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
index 3f84e8c..26a93b9 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
+++ b/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
@@ -25,6 +25,7 @@ extern NSString *WebBookmarkChildrenKey;
 
 @interface WebBookmarkGroup : NSObject
 {
+    NSString *_tag;
     NSString *_file;
     WebBookmark *_topBookmark;
     BOOL _loading;
@@ -55,6 +56,11 @@ extern NSString *WebBookmarkChildrenKey;
 // Load bookmark group from file. This happens automatically at init time, and need not normally be called.
 - (BOOL)loadBookmarkGroup;
 
+// Marker for bookmark group, read from file. This cannot be changed in the current implementation.
+// It can be used to see whether one file represents the same WebBookmarkGroup as another. If no
+// tag is stored in the file, returns nil.
+- (NSString *)tag;
+
 // Save bookmark group to file. It is the client's responsibility to call this at appropriate times.
 - (BOOL)saveBookmarkGroup;
 
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
index c62c78a..108a8c7 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
@@ -20,6 +20,7 @@ NSString *WebBookmarkDidChangeNotification = @"WebBookmarkDidChangeNotification"
 NSString *WebBookmarkWillChangeNotification = @"WebBookmarkWillChangeNotification";
 NSString *WebModifiedBookmarkKey = @"WebModifiedBookmarkKey";
 NSString *WebBookmarkChildrenKey = @"WebBookmarkChildrenKey";
+NSString *TagKey = @"WebBookmarkGroupTag";
 
 @interface WebBookmarkGroup (WebForwardDeclarations)
 - (void)_setTopBookmark:(WebBookmark *)newTopBookmark;
@@ -50,10 +51,16 @@ NSString *WebBookmarkChildrenKey = @"WebBookmarkChildrenKey";
 - (void)dealloc
 {
     [_file release];
+    [_tag release];
     [_topBookmark release];
     [super dealloc];
 }
 
+- (NSString *)tag
+{
+    return _tag;
+}
+
 - (WebBookmark *)topBookmark
 {
     return _topBookmark;
@@ -186,6 +193,13 @@ NSString *WebBookmarkChildrenKey = @"WebBookmarkChildrenKey";
         return NO;
     }
 
+    // If the bookmark group has a tag, it's in the root-level dictionary.
+    NSString *tagFromFile = [dictionary objectForKey:TagKey];
+    // we don't trust data read from disk, so double-check
+    if ([tagFromFile isKindOfClass:[NSString class]]) {
+        _tag = [tagFromFile retain];
+    }
+
     _loading = YES;
     newTopBookmark = [[WebBookmarkList alloc] initFromDictionaryRepresentation:dictionary withGroup:self];
     [self _setTopBookmark:newTopBookmark];
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 2043219..267db2d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,25 @@
+2002-12-19  John Sullivan  <sullivan at apple.com>
+
+	- WebKit part of fix for 3124949 -- Alexander recreates the 
+	default set of bookmarks every time a separate app copy is launched
+
+        Reviewed by Darin
+
+        * Bookmarks.subproj/WebBookmarkGroup.h:
+	new _tag ivar and -tag method.
+
+        * Bookmarks.subproj/WebBookmarkGroup.m:
+        (-[WebBookmarkGroup dealloc]):
+	release _tag
+        (-[WebBookmarkGroup tag]):
+	return _tag
+        (-[WebBookmarkGroup _loadBookmarkGroupGuts]):
+	read _tag from the dictionary in the file (or leave it at
+	nil if there's no value in the file).
+
+        * English.lproj/StringsNotToBeLocalized.txt:
+	kept this file up to date
+
 2002-12-19  Darin Adler  <darin at apple.com>
 
         Reviewed by John.
diff --git a/WebKit/English.lproj/StringsNotToBeLocalized.txt b/WebKit/English.lproj/StringsNotToBeLocalized.txt
index 882b780..c05ffa6 100644
--- a/WebKit/English.lproj/StringsNotToBeLocalized.txt
+++ b/WebKit/English.lproj/StringsNotToBeLocalized.txt
@@ -94,6 +94,7 @@
 "WebBackForwardList:\n"
 "WebBookmarkChildrenKey"
 "WebBookmarkDidChangeNotification"
+"WebBookmarkGroupTag"
 "WebBookmarkIdentifier"
 "WebBookmarkType"
 "WebBookmarkTypeLeaf"

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list