[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 06:50:52 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 58673b19d0228512a766bc785d911dca0f9cddf9
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 17 20:14:27 2002 +0000

    WebKit:
    
    	- added support for bookmark identifiers, to be used for marking
    	bookmark proxies uniquely (independent of localized title). This
    	is not the old unique-identifier scheme; now identifiers are optional,
    	and initially nil, but the client can use them for its own purposes.
    
            * Bookmarks.subproj/WebBookmark.h:
            * Bookmarks.subproj/WebBookmark.m:
            (-[WebBookmark dealloc]): release identifier
            (-[WebBookmark identifier]): return identifier
            (-[WebBookmark setIdentifier:]): set identifier
            * Bookmarks.subproj/WebBookmarkLeaf.m:
            (-[WebBookmarkLeaf initFromDictionaryRepresentation:withGroup:]):
    	restore identifier
            (-[WebBookmarkLeaf dictionaryRepresentation]):
    	save identifier
            (-[WebBookmarkLeaf copyWithZone:]):
    	copy identifier
            * Bookmarks.subproj/WebBookmarkList.m:
            (-[WebBookmarkList initFromDictionaryRepresentation:withGroup:]):
    	restore identifier
            (-[WebBookmarkList dictionaryRepresentation]):
    	save identifier
            (-[WebBookmarkList copyWithZone:]):
    	copy identifier
            * Bookmarks.subproj/WebBookmarkPrivate.h:
            * Bookmarks.subproj/WebBookmarkProxy.m:
            (-[WebBookmarkProxy initFromDictionaryRepresentation:withGroup:]):
    	restore identifier
            (-[WebBookmarkProxy dictionaryRepresentation]):
    	save identifier
            (-[WebBookmarkProxy copyWithZone:]):
    	copy identifier
    
    WebBrowser:
    
    	- a bunch of work in the direction of getting the special
    	"bookmark sources" to work in the bookmarks view. The Address Book
    	contents now appear in the Bookmarks view, but Rendezvous and
    	History don't yet.
    
            * BookmarkSource.h: Added.
    	Defines protocol to be used by special bookmark sources.
    
            * BookmarksController.h: define identifier constants used for
    	special bookmark sources.
            * BookmarksController.m:
            (-[BookmarksController _blessOrCreateSpecialFolders]):
    	set identifiers on bookmark proxies representing special bookmark
    	sources
    
            * BookmarksViewController.m:
            (-[BookmarksViewController undoRemoveBookmarks:]):
            (-[BookmarksViewController selectedContentItems]):
            (-[BookmarksViewController deleteContentItems:]):
            (-[BookmarksViewController deleteSelectedContentItems]):
            (-[BookmarksViewController doubleClick:]):
            (-[BookmarksViewController newBookmarkFolder:]):
            (-[BookmarksViewController bookmarkSourceForProxyIdentifier:]):
            (-[BookmarksViewController refreshContents]):
            (-[BookmarksViewController bookmarksFromContentItems:]):
            (-[BookmarksViewController bookmarkFromContentItem:]):
            (-[BookmarksViewController canAddToBookmarkSource:]):
            (-[BookmarksViewController canAddToSelectedBookmarkSource]):
            (-[BookmarksViewController canDeleteFromSelectedBookmarkSource]):
            (-[BookmarksViewController child:ofContentItem:]):
            (-[BookmarksViewController isContentItemExpandable:]):
            (-[BookmarksViewController numberOfChildrenOfContentItem:]):
            (-[BookmarksViewController titleStringForContentItem:]):
            (-[BookmarksViewController addressStringForContentItem:]):
            (-[BookmarksViewController imageForContentItem:]):
            (-[BookmarksViewController shouldEditTableColumn:forContentItem:]):
            (-[BookmarksViewController tableView:draggingSourceOperationMaskForLocal:]):
            (-[BookmarksViewController cleanUpAfterDraggingBookmarksWithOperation:]):
            (-[BookmarksViewController prepareForDraggingBookmarks:fromSourceColumn:]):
            (-[BookmarksViewController tableView:validateDrop:proposedRow:proposedDropOperation:]):
            (-[BookmarksViewController handleKeyDown:inSourceColumn:]):
            (-[BookmarksViewController tableViewSelectionDidChange:]):
            (-[BookmarksViewController outlineView:child:ofItem:]):
            (-[BookmarksViewController outlineView:isItemExpandable:]):
            (-[BookmarksViewController outlineView:numberOfChildrenOfItem:]):
            (-[BookmarksViewController outlineView:objectValueForTableColumn:byItem:]):
            (-[BookmarksViewController outlineView:draggingSourceOperationMaskForLocal:]):
            (-[BookmarksViewController outlineView:writeItems:toPasteboard:]):
            (-[BookmarksViewController outlineView:willDisplayCell:forTableColumn:item:]):
            (-[BookmarksViewController outlineView:shouldEditTableColumn:item:]):
            (-[BookmarksViewController copy:]):
            (-[BookmarksViewController delete:]):
    	My brain gets sore thinking about writing individual comments here. Basically I
    	generalized methods that were dealing explicitly with bookmarks to deal with
    	opaque "content items" instead, then delegate to the appropriate BookmarkSource
    	in the bottleneck methods. Only Address Book is hooked up so far. This also fixed lots
    	of trouble you could get into if you played with the "not implemented yet" items
    	too much.
    
            * ABHomePagesController.h:
            * ABHomePagesController.m:
            (-[ABHomePagesController refreshContents]):
            (-[ABHomePagesController canDeleteContents]):
            (-[ABHomePagesController deleteContentItems:]):
            (-[ABHomePagesController isContentItemExpandable:]):
            (-[ABHomePagesController child:ofContentItem:]):
            (-[ABHomePagesController numberOfChildrenOfContentItem:]):
            (-[ABHomePagesController bookmarkFromContentItem:]):
            (-[ABHomePagesController bookmarksFromContentItems:]):
            (-[ABHomePagesController addressStringForContentItem:]):
            (-[ABHomePagesController titleStringForContentItem:]):
            (-[ABHomePagesController imageForContentItem:]):
    	Implement BookmarkSource protocol; I haven't deleted all the
    	similar code that drives the Address Book window yet.
    
            * English.lproj/MainMenu.nib: changed "Last Search Results" to
    	"SnapBack to Search" under protest.
    
            * WebBrowser.pbproj/project.pbxproj: updated for new file
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2359 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Bookmarks.subproj/WebBookmark.h b/WebKit/Bookmarks.subproj/WebBookmark.h
index e2bcda1..3fd5cdc 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.h
+++ b/WebKit/Bookmarks.subproj/WebBookmark.h
@@ -19,6 +19,7 @@ typedef enum {
 @interface WebBookmark : NSObject <NSCopying> {
     WebBookmark *_parent;
     WebBookmarkGroup *_group;
+    NSString *_identifier;
 }
 
 + (WebBookmark *)bookmarkFromDictionaryRepresentation:(NSDictionary *)dict withGroup:(WebBookmarkGroup *)group;
@@ -43,6 +44,13 @@ typedef enum {
 // a valid URL string. Does nothing if bookmarkType is not WebBookmarkTypeLeaf.
 - (void)setURLString:(NSString *)URLString;
 
+// String for client use; it is nil unless specified with setIdentifier
+- (NSString *)identifier;
+
+// Sets a string that can be retrieved later with -identifier. Not used internally
+// in any way; clients can use it as they see fit.
+- (void)setIdentifier:(NSString *)identifier;
+
 // Array of child WebBookmarks. Returns nil if bookmarkType is not WebBookmarkTypeList.
 - (NSArray *)children;
 
diff --git a/WebKit/Bookmarks.subproj/WebBookmark.m b/WebKit/Bookmarks.subproj/WebBookmark.m
index fb04067..2f99789 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.m
+++ b/WebKit/Bookmarks.subproj/WebBookmark.m
@@ -23,7 +23,8 @@
 - (void)dealloc
 {
     ASSERT(_group == nil);
-
+    [_identifier release];
+    
     [super dealloc];
 }
 
@@ -66,6 +67,21 @@
     NSRequestConcreteImplementation(self, _cmd, [self class]);
 }
 
+- (NSString *)identifier
+{
+    return [[_identifier copy] autorelease];
+}
+
+- (void)setIdentifier:(NSString *)identifier
+{
+    if (identifier == _identifier) {
+        return;
+    }
+
+    [_identifier release];
+    _identifier = [identifier copy];
+}
+
 - (NSArray *)children
 {
     return nil;
@@ -151,15 +167,15 @@
     }
     
     if (class) {
-        return [[[class alloc] initFromDictionaryRepresentation:dict
-                                                      withGroup:group] autorelease];
+        return  [[[class alloc] initFromDictionaryRepresentation:dict
+                                                       withGroup:group] autorelease];
     }
 
     return nil;
 }
 
 - (id)initFromDictionaryRepresentation:(NSDictionary *)dict withGroup:(WebBookmarkGroup *)group
-{
+{    
     NSRequestConcreteImplementation(self, _cmd, [self class]);
     return nil;
 }
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
index e5d6258..4f72553 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
@@ -60,6 +60,7 @@
     _entry = [[WebHistoryItem alloc] initFromDictionaryRepresentation:
         [dict objectForKey:URIDictionaryKey]];
     _URLString = [[dict objectForKey:URLStringKey] copy];
+    [self setIdentifier:[dict objectForKey:WebBookmarkIdentifierKey]];
 
     return self;
 }
@@ -75,6 +76,9 @@
     if (_URLString != nil) {
         [dict setObject:_URLString forKey:URLStringKey];
     }
+    if ([self identifier] != nil) {
+        [dict setObject:[self identifier] forKey:WebBookmarkIdentifierKey];
+    }
     
     return dict;
 }
@@ -88,9 +92,11 @@
 
 - (id)copyWithZone:(NSZone *)zone
 {
-    return [[WebBookmarkLeaf allocWithZone:zone] initWithURLString:_URLString
-                                                            title:[self title]
-                                                            group:[self group]];
+    id copy = [[WebBookmarkLeaf allocWithZone:zone] initWithURLString:_URLString
+                                                                title:[self title]
+                                                                group:[self group]];
+    [copy setIdentifier:[self identifier]];
+    return copy;
 }
 
 - (NSString *)title
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkList.m b/WebKit/Bookmarks.subproj/WebBookmarkList.m
index d7074f4..36d302a 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkList.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkList.m
@@ -63,6 +63,7 @@
             [self insertChild:child atIndex:indexWritten++];
         }
     }
+    [self setIdentifier:[dict objectForKey:WebBookmarkIdentifierKey]];
 
     return self;
 }
@@ -94,7 +95,11 @@
 
         [dict setObject:childrenAsDictionaries forKey:ChildrenKey];
     }
-    
+
+    if ([self identifier] != nil) {
+        [dict setObject:[self identifier] forKey:WebBookmarkIdentifierKey];
+    }
+
     return dict;
 }
 
@@ -112,6 +117,7 @@
     
     copy = [[WebBookmarkList alloc] initWithTitle:[self title]
                                             group:[self group]];
+    [copy setIdentifier:[self identifier]];
 
     count = [self numberOfChildren];
     for (index = 0; index < count; ++index) {
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h b/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h
index b666656..458d3cd 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h
+++ b/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h
@@ -14,6 +14,8 @@
 #define WebBookmarkTypeListValue	@"WebBookmarkTypeList"
 #define WebBookmarkTypeProxyValue	@"WebBookmarkTypeProxy"
 
+#define WebBookmarkIdentifierKey	@"WebBookmarkIdentifier"
+
 @interface WebBookmark(WebPrivate)
 
 - (void)_setParent:(WebBookmark *)parent;
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkProxy.m b/WebKit/Bookmarks.subproj/WebBookmarkProxy.m
index 49213a8..22962e0 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkProxy.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkProxy.m
@@ -36,7 +36,9 @@
         return nil;
     }
 
-    return [self initWithTitle:[dict objectForKey:TitleKey] group:group];
+    WebBookmark *result = [self initWithTitle:[dict objectForKey:TitleKey] group:group];
+    [result setIdentifier:[dict objectForKey:WebBookmarkIdentifierKey]];
+    return result;
 }
 
 - (NSDictionary *)dictionaryRepresentation
@@ -46,6 +48,9 @@
     if (_title != nil) {
         [dict setObject:_title forKey:TitleKey];
     }
+    if ([self identifier] != nil) {
+        [dict setObject:[self identifier] forKey:WebBookmarkIdentifierKey];
+    }
 
     return dict;
 }
@@ -57,7 +62,9 @@
 
 - (id)copyWithZone:(NSZone *)zone
 {
-    return [[WebBookmarkProxy alloc] initWithTitle:_title group:[self group]];
+    id copy = [[WebBookmarkProxy alloc] initWithTitle:_title group:[self group]];
+    [copy setIdentifier:[self identifier]];
+    return copy;
 }
 
 - (NSString *)title
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 82f2d57..e371325 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,38 @@
+2002-10-17  John Sullivan  <sullivan at apple.com>
+
+	- added support for bookmark identifiers, to be used for marking
+	bookmark proxies uniquely (independent of localized title). This
+	is not the old unique-identifier scheme; now identifiers are optional,
+	and initially nil, but the client can use them for its own purposes.
+
+        * Bookmarks.subproj/WebBookmark.h:
+        * Bookmarks.subproj/WebBookmark.m:
+        (-[WebBookmark dealloc]): release identifier
+        (-[WebBookmark identifier]): return identifier
+        (-[WebBookmark setIdentifier:]): set identifier
+        * Bookmarks.subproj/WebBookmarkLeaf.m:
+        (-[WebBookmarkLeaf initFromDictionaryRepresentation:withGroup:]):
+	restore identifier
+        (-[WebBookmarkLeaf dictionaryRepresentation]):
+	save identifier
+        (-[WebBookmarkLeaf copyWithZone:]):
+	copy identifier
+        * Bookmarks.subproj/WebBookmarkList.m:
+        (-[WebBookmarkList initFromDictionaryRepresentation:withGroup:]):
+	restore identifier
+        (-[WebBookmarkList dictionaryRepresentation]):
+	save identifier
+        (-[WebBookmarkList copyWithZone:]):
+	copy identifier
+        * Bookmarks.subproj/WebBookmarkPrivate.h:
+        * Bookmarks.subproj/WebBookmarkProxy.m:
+        (-[WebBookmarkProxy initFromDictionaryRepresentation:withGroup:]):
+	restore identifier
+        (-[WebBookmarkProxy dictionaryRepresentation]):
+	save identifier
+        (-[WebBookmarkProxy copyWithZone:]):
+	copy identifier
+
 === Alexander-28 ===
 
 2002-10-17  Darin Adler  <darin at apple.com>
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 82f2d57..e371325 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,38 @@
+2002-10-17  John Sullivan  <sullivan at apple.com>
+
+	- added support for bookmark identifiers, to be used for marking
+	bookmark proxies uniquely (independent of localized title). This
+	is not the old unique-identifier scheme; now identifiers are optional,
+	and initially nil, but the client can use them for its own purposes.
+
+        * Bookmarks.subproj/WebBookmark.h:
+        * Bookmarks.subproj/WebBookmark.m:
+        (-[WebBookmark dealloc]): release identifier
+        (-[WebBookmark identifier]): return identifier
+        (-[WebBookmark setIdentifier:]): set identifier
+        * Bookmarks.subproj/WebBookmarkLeaf.m:
+        (-[WebBookmarkLeaf initFromDictionaryRepresentation:withGroup:]):
+	restore identifier
+        (-[WebBookmarkLeaf dictionaryRepresentation]):
+	save identifier
+        (-[WebBookmarkLeaf copyWithZone:]):
+	copy identifier
+        * Bookmarks.subproj/WebBookmarkList.m:
+        (-[WebBookmarkList initFromDictionaryRepresentation:withGroup:]):
+	restore identifier
+        (-[WebBookmarkList dictionaryRepresentation]):
+	save identifier
+        (-[WebBookmarkList copyWithZone:]):
+	copy identifier
+        * Bookmarks.subproj/WebBookmarkPrivate.h:
+        * Bookmarks.subproj/WebBookmarkProxy.m:
+        (-[WebBookmarkProxy initFromDictionaryRepresentation:withGroup:]):
+	restore identifier
+        (-[WebBookmarkProxy dictionaryRepresentation]):
+	save identifier
+        (-[WebBookmarkProxy copyWithZone:]):
+	copy identifier
+
 === Alexander-28 ===
 
 2002-10-17  Darin Adler  <darin at apple.com>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list