[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:10:29 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 8d818a725fb0eec8a304089e06de499c9a77eeaf
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu May 2 19:53:22 2002 +0000

    	Some more implementation of bookmarks code, enough to support
    	adding bookmarks to the Bookmarks menu (but not yet enough to
    	support persistent bookmarks).
    
    	* Bookmarks.subproj/IFBookmark_Private.h:
    	* Bookmarks.subproj/IFBookmark.h:
    	* Bookmarks.subproj/IFBookmark.m:
    	(-[IFBookmark numberOfChildren]): New public method, stub implementation.
    	(-[IFBookmark _removeChild:]): New private method, stub implementation.
    
    	* Bookmarks.subproj/IFBookmarkGroup.h:
    	* Bookmarks.subproj/IFBookmarkGroup.m:
    	(-[IFBookmarkGroup _sendBookmarkGroupChangedNotification]):
    	(-[IFBookmarkGroup removeBookmark:]):
    	(-[IFBookmarkGroup addNewBookmarkToBookmark:withTitle:image:URLString:isLeaf:]):
    	(-[IFBookmarkGroup insertNewBookmarkAtIndex:ofBookmark:withTitle:image:URLString:isLeaf:]):
    	(-[IFBookmarkGroup updateBookmark:title:image:URLString:]):
    	Changed "URL" to "URLString" in several places, added a "with"
    	to some parameter names; added addNewBookmarkToBookmark public
    	method; added notification that's sent when bookmarks are added or removed.
    
    	* Bookmarks.subproj/IFBookmarkLeaf.h:
    	* Bookmarks.subproj/IFBookmarkLeaf.m:
    	(-[IFBookmarkLeaf initWithURLString:title:image:group:]):
    	Added image parameter.
    
    	* Bookmarks.subproj/IFBookmarkList.m:
    	(-[IFBookmarkList numberOfChildren]): New method.
    	(-[IFBookmarkList _removeChild:]): Implemented.
    
    	Fixed 2917086 (Add Bookmark is not yet implemented). You
    	can now add bookmarks to the Bookmarks menu, and they work.
    	However, they aren't yet persistent, and there's only a flat
    	list that you can't yet reorder.
    
    	* AppController.h: Added instance variables for bookmarks stuff;
    	added +standardBookmarks method.
    
    	* AppController.m:
    	(-[AppController awakeFromNib]): Move history notification setup from
    	here to -webHistory; added call to _updateBookmarksInMenu, and FIXME
    	about doing this lazily eventually.
    	(-[AppController dealloc]): release bookmarks.
    	(-[AppController webHistory]): Moved history notification setup to here.
    	(-[AppController menuTitleForURL:withTitle:]): Improved assert.
    
    	(-[AppController _setUpStringTruncator]):
    	(-[AppController _historyFilePath]):
    	(-[AppController _receivedHistoryChangedNotification:]):
    	(-[AppController _insertHistoryEntry:intoMenu:atIndex:]):
    	(-[AppController _insertItemsForDate:intoMenu:atIndex:withRunningTotal:limit:]):
    	(-[AppController _insertSubmenu:forDate:atIndex:]):
    	(-[AppController _takeLocationFromHistoryEntry:]):
    	(-[AppController _addHistoryToMenu]):
    	(-[AppController _updateHistoryInMenu]):
    	Added leading underscores to private methods, updated callers.
    
    	(-[AppController _standardBookmarksFilePath]):
    	(-[AppController _removeBookmarksFromMenu]):
    	(-[AppController _takeLocationFromBookmark:]):
    	(-[AppController _insertBookmark:intoMenu:atIndex:]):
    	(-[AppController _addBookmarksToMenu]):
    	(-[AppController _updateBookmarksInMenu]):
    	(-[AppController _receivedBookmarksChangedNotification:]):
    	(-[AppController standardBookmarks]): New methods.
    
    	* BrowserDocument.h:
    	* BrowserDocument.m:
    	(-[BrowserDocument addBookmark:]): New method; accessed from menu item.
    	(-[BrowserDocument validateUserInterfaceItem:]): Enable Add Bookmark
    	menu item only when there's a currentURL.
    
    	* English.lproj/MainMenu.nib: Wire up some bookmark-related stuff.
    
    	* WebBrowser.pbproj/project.pbxproj: Version wars?
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1088 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Bookmarks.subproj/IFBookmark.h b/WebKit/Bookmarks.subproj/IFBookmark.h
index d1f625c..84c69ed 100644
--- a/WebKit/Bookmarks.subproj/IFBookmark.h
+++ b/WebKit/Bookmarks.subproj/IFBookmark.h
@@ -28,6 +28,9 @@
 // Array of child IFBookmarks. This is nil if isLeaf returns YES.
 - (NSArray *)children;
 
+// Number of children. This is 0 if isLeaf returns YES.
+- (unsigned)numberOfChildren;
+
 // The list of bookmarks containing this one.
 - (IFBookmark *)parent;
 
diff --git a/WebKit/Bookmarks.subproj/IFBookmark.m b/WebKit/Bookmarks.subproj/IFBookmark.m
index e866da1..ab45200 100644
--- a/WebKit/Bookmarks.subproj/IFBookmark.m
+++ b/WebKit/Bookmarks.subproj/IFBookmark.m
@@ -70,6 +70,14 @@
     return nil;
 }
 
+- (unsigned)numberOfChildren
+{
+    if (![self isLeaf]) {
+        NSRequestConcreteImplementation(self, _cmd, [self class]);
+    }
+    return 0;
+}
+
 - (void)_insertChild:(IFBookmark *)bookmark atIndex:(unsigned)index
 {
     if (![self isLeaf]) {
@@ -77,6 +85,13 @@
     }
 }
 
+- (void)_removeChild:(IFBookmark *)bookmark
+{
+    if (![self isLeaf]) {
+        NSRequestConcreteImplementation(self, _cmd, [self class]);
+    }
+}
+
 - (IFBookmark *)parent
 {
     return _parent;
diff --git a/WebKit/Bookmarks.subproj/IFBookmarkGroup.h b/WebKit/Bookmarks.subproj/IFBookmarkGroup.h
index 2ae7deb..5c340d2 100644
--- a/WebKit/Bookmarks.subproj/IFBookmarkGroup.h
+++ b/WebKit/Bookmarks.subproj/IFBookmarkGroup.h
@@ -6,9 +6,12 @@
 //  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
 //
 
-#import <Foundation/Foundation.h>
+#import <Cocoa/Cocoa.h>
+#import <WebKit/IFBookmark.h>
+
+// notification sent when bookmarks are added/removed from group, or when bookmarks in group are modified
+#define IFBookmarkGroupChangedNotification		@"IFBookmarkGroupChangedNotification"
 
- at class IFBookmark;
 
 @interface IFBookmarkGroup : NSObject
 {
@@ -30,14 +33,19 @@
 
 - (void)insertNewBookmarkAtIndex:(unsigned)index
                       ofBookmark:(IFBookmark *)parent
-                           title:(NSString *)newTitle
-                           image:(NSString *)newImage
-                             URL:(NSString *)newURLString
+                       withTitle:(NSString *)newTitle
+                           image:(NSImage *)newImage
+                       URLString:(NSString *)newURLString
+                          isLeaf:(BOOL)flag;
+- (void)addNewBookmarkToBookmark:(IFBookmark *)parent
+                       withTitle:(NSString *)newTitle
+                           image:(NSImage *)newImage
+                       URLString:(NSString *)newURLString
                           isLeaf:(BOOL)flag;
 - (void)updateBookmark:(IFBookmark *)bookmark
                  title:(NSString *)newTitle
                  image:(NSString *)newImage
-                   URL:(NSString *)newURLString;
+             URLString:(NSString *)newURLString;
 
 // storing contents on disk
 
diff --git a/WebKit/Bookmarks.subproj/IFBookmarkGroup.m b/WebKit/Bookmarks.subproj/IFBookmarkGroup.m
index 2f68eac..1cb8d84 100644
--- a/WebKit/Bookmarks.subproj/IFBookmarkGroup.m
+++ b/WebKit/Bookmarks.subproj/IFBookmarkGroup.m
@@ -7,7 +7,7 @@
 //
 
 #import <WebKit/IFBookmarkGroup.h>
-#import <WebKit/IFBookmark.h>
+#import <WebKit/IFBookmark_Private.h>
 #import <WebKit/IFBookmarkList.h>
 #import <WebKit/IFBookmarkLeaf.h>
 #import <WebKit/WebKitDebug.h>
@@ -46,6 +46,13 @@
     return _topBookmark;
 }
 
+- (void)_sendBookmarkGroupChangedNotification
+{
+    [[NSNotificationCenter defaultCenter]
+        postNotificationName: IFBookmarkGroupChangedNotification
+                      object: self];
+}
+
 - (void)insertBookmark:(IFBookmark *)bookmark
                atIndex:(unsigned)index
             ofBookmark:(IFBookmark *)parent
@@ -55,23 +62,61 @@
 
 - (void)removeBookmark:(IFBookmark *)bookmark
 {
-    _logNotYetImplemented();
+    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark group] == self);
+    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark parent] != nil);
+
+    [[bookmark parent] _removeChild:bookmark];
+    [bookmark _setGroup:nil];
+    
+    [self _sendBookmarkGroupChangedNotification];
+}
+
+- (void)addNewBookmarkToBookmark:(IFBookmark *)parent
+                       withTitle:(NSString *)newTitle
+                           image:(NSImage *)newImage
+                       URLString:(NSString *)newURLString
+                          isLeaf:(BOOL)flag
+{
+    [self insertNewBookmarkAtIndex:[parent numberOfChildren]
+                        ofBookmark:parent
+                         withTitle:newTitle
+                             image:newImage
+                         URLString:newURLString
+                            isLeaf:flag];
 }
 
 - (void)insertNewBookmarkAtIndex:(unsigned)index
                       ofBookmark:(IFBookmark *)parent
-                           title:(NSString *)newTitle
-                           image:(NSString *)newImage
-                             URL:(NSString *)newURLString
+                       withTitle:(NSString *)newTitle
+                           image:(NSImage *)newImage
+                       URLString:(NSString *)newURLString
                           isLeaf:(BOOL)flag
 {
-    _logNotYetImplemented();
+    IFBookmark *bookmark;
+
+    WEBKIT_ASSERT_VALID_ARG (parent, [parent group] == self);
+    WEBKIT_ASSERT_VALID_ARG (parent, ![parent isLeaf]);
+    WEBKIT_ASSERT_VALID_ARG (newURLString, flag ? (newURLString != nil) : (newURLString == nil));
+
+    if (flag) {
+        bookmark = [[[IFBookmarkLeaf alloc] initWithURLString:newURLString
+                                                        title:newTitle
+                                                        image:newImage
+                                                        group:self] autorelease];
+    } else {
+        bookmark = [[[IFBookmarkList alloc] initWithTitle:newTitle
+                                                    image:newImage
+                                                    group:self] autorelease];
+    }
+
+    [parent _insertChild:bookmark atIndex:index];
+    [self _sendBookmarkGroupChangedNotification];
 }
 
 - (void)updateBookmark:(IFBookmark *)bookmark
                  title:(NSString *)newTitle
                  image:(NSString *)newImage
-                   URL:(NSString *)newURLString
+             URLString:(NSString *)newURLString
 {
     _logNotYetImplemented();
 }
diff --git a/WebKit/Bookmarks.subproj/IFBookmarkLeaf.h b/WebKit/Bookmarks.subproj/IFBookmarkLeaf.h
index 82ae440..26d2ede 100644
--- a/WebKit/Bookmarks.subproj/IFBookmarkLeaf.h
+++ b/WebKit/Bookmarks.subproj/IFBookmarkLeaf.h
@@ -15,6 +15,9 @@
     NSString *_URLString;
 }
 
-- (id)initWithURLString:(NSString *)URLString title:(NSString *)title group:(IFBookmarkGroup *)group;
+- (id)initWithURLString:(NSString *)URLString
+                  title:(NSString *)title
+                  image:(NSImage *)image
+                  group:(IFBookmarkGroup *)group;
 
 @end
diff --git a/WebKit/Bookmarks.subproj/IFBookmarkLeaf.m b/WebKit/Bookmarks.subproj/IFBookmarkLeaf.m
index f6d96e8..1a4328d 100644
--- a/WebKit/Bookmarks.subproj/IFBookmarkLeaf.m
+++ b/WebKit/Bookmarks.subproj/IFBookmarkLeaf.m
@@ -14,7 +14,10 @@
 
 @implementation IFBookmarkLeaf
 
-- (id)initWithURLString:(NSString *)URLString title:(NSString *)title group:(IFBookmarkGroup *)group;
+- (id)initWithURLString:(NSString *)URLString
+                  title:(NSString *)title
+                  image:(NSImage *)image
+                  group:(IFBookmarkGroup *)group;
 {
     WEBKIT_ASSERT_VALID_ARG (group, group != nil);
     
@@ -23,7 +26,7 @@
     // Since our URLString may not be valid for creating an NSURL object,
     // just hang onto the string separately and don't bother creating
     // an NSURL object for the IFURIEntry.
-    _entry = [[IFURIEntry alloc] initWithURL:nil title:title];
+    _entry = [[IFURIEntry alloc] initWithURL:nil title:title image:image];
     _URLString = [URLString retain];
     [self _setGroup:group];
 
diff --git a/WebKit/Bookmarks.subproj/IFBookmarkList.m b/WebKit/Bookmarks.subproj/IFBookmarkList.m
index e484afc..250dbf1 100644
--- a/WebKit/Bookmarks.subproj/IFBookmarkList.m
+++ b/WebKit/Bookmarks.subproj/IFBookmarkList.m
@@ -72,6 +72,19 @@
     return [NSArray arrayWithArray:_list];
 }
 
+- (unsigned)numberOfChildren
+{
+    return [_list count];
+}
+
+- (void)_removeChild:(IFBookmark *)bookmark
+{
+    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark parent] == self);
+    [_list removeObject:bookmark];
+    [bookmark _setParent:nil];
+}
+
+
 - (void)_insertChild:(IFBookmark *)bookmark atIndex:(unsigned)index
 {
     [_list insertObject:bookmark atIndex:index];
diff --git a/WebKit/Bookmarks.subproj/IFBookmark_Private.h b/WebKit/Bookmarks.subproj/IFBookmark_Private.h
index ca73921..29e5c67 100644
--- a/WebKit/Bookmarks.subproj/IFBookmark_Private.h
+++ b/WebKit/Bookmarks.subproj/IFBookmark_Private.h
@@ -17,6 +17,7 @@
 - (void)_setParent:(IFBookmark *)parent;
 - (void)_setGroup:(IFBookmarkGroup *)group;
 - (void)_insertChild:(IFBookmark *)bookmark atIndex:(unsigned)index;
+- (void)_removeChild:(IFBookmark *)bookmark;
 
 @end
 
diff --git a/WebKit/Bookmarks.subproj/WebBookmark.h b/WebKit/Bookmarks.subproj/WebBookmark.h
index d1f625c..84c69ed 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.h
+++ b/WebKit/Bookmarks.subproj/WebBookmark.h
@@ -28,6 +28,9 @@
 // Array of child IFBookmarks. This is nil if isLeaf returns YES.
 - (NSArray *)children;
 
+// Number of children. This is 0 if isLeaf returns YES.
+- (unsigned)numberOfChildren;
+
 // The list of bookmarks containing this one.
 - (IFBookmark *)parent;
 
diff --git a/WebKit/Bookmarks.subproj/WebBookmark.m b/WebKit/Bookmarks.subproj/WebBookmark.m
index e866da1..ab45200 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.m
+++ b/WebKit/Bookmarks.subproj/WebBookmark.m
@@ -70,6 +70,14 @@
     return nil;
 }
 
+- (unsigned)numberOfChildren
+{
+    if (![self isLeaf]) {
+        NSRequestConcreteImplementation(self, _cmd, [self class]);
+    }
+    return 0;
+}
+
 - (void)_insertChild:(IFBookmark *)bookmark atIndex:(unsigned)index
 {
     if (![self isLeaf]) {
@@ -77,6 +85,13 @@
     }
 }
 
+- (void)_removeChild:(IFBookmark *)bookmark
+{
+    if (![self isLeaf]) {
+        NSRequestConcreteImplementation(self, _cmd, [self class]);
+    }
+}
+
 - (IFBookmark *)parent
 {
     return _parent;
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkGroup.h b/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
index 2ae7deb..5c340d2 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
+++ b/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
@@ -6,9 +6,12 @@
 //  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
 //
 
-#import <Foundation/Foundation.h>
+#import <Cocoa/Cocoa.h>
+#import <WebKit/IFBookmark.h>
+
+// notification sent when bookmarks are added/removed from group, or when bookmarks in group are modified
+#define IFBookmarkGroupChangedNotification		@"IFBookmarkGroupChangedNotification"
 
- at class IFBookmark;
 
 @interface IFBookmarkGroup : NSObject
 {
@@ -30,14 +33,19 @@
 
 - (void)insertNewBookmarkAtIndex:(unsigned)index
                       ofBookmark:(IFBookmark *)parent
-                           title:(NSString *)newTitle
-                           image:(NSString *)newImage
-                             URL:(NSString *)newURLString
+                       withTitle:(NSString *)newTitle
+                           image:(NSImage *)newImage
+                       URLString:(NSString *)newURLString
+                          isLeaf:(BOOL)flag;
+- (void)addNewBookmarkToBookmark:(IFBookmark *)parent
+                       withTitle:(NSString *)newTitle
+                           image:(NSImage *)newImage
+                       URLString:(NSString *)newURLString
                           isLeaf:(BOOL)flag;
 - (void)updateBookmark:(IFBookmark *)bookmark
                  title:(NSString *)newTitle
                  image:(NSString *)newImage
-                   URL:(NSString *)newURLString;
+             URLString:(NSString *)newURLString;
 
 // storing contents on disk
 
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
index 2f68eac..1cb8d84 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
@@ -7,7 +7,7 @@
 //
 
 #import <WebKit/IFBookmarkGroup.h>
-#import <WebKit/IFBookmark.h>
+#import <WebKit/IFBookmark_Private.h>
 #import <WebKit/IFBookmarkList.h>
 #import <WebKit/IFBookmarkLeaf.h>
 #import <WebKit/WebKitDebug.h>
@@ -46,6 +46,13 @@
     return _topBookmark;
 }
 
+- (void)_sendBookmarkGroupChangedNotification
+{
+    [[NSNotificationCenter defaultCenter]
+        postNotificationName: IFBookmarkGroupChangedNotification
+                      object: self];
+}
+
 - (void)insertBookmark:(IFBookmark *)bookmark
                atIndex:(unsigned)index
             ofBookmark:(IFBookmark *)parent
@@ -55,23 +62,61 @@
 
 - (void)removeBookmark:(IFBookmark *)bookmark
 {
-    _logNotYetImplemented();
+    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark group] == self);
+    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark parent] != nil);
+
+    [[bookmark parent] _removeChild:bookmark];
+    [bookmark _setGroup:nil];
+    
+    [self _sendBookmarkGroupChangedNotification];
+}
+
+- (void)addNewBookmarkToBookmark:(IFBookmark *)parent
+                       withTitle:(NSString *)newTitle
+                           image:(NSImage *)newImage
+                       URLString:(NSString *)newURLString
+                          isLeaf:(BOOL)flag
+{
+    [self insertNewBookmarkAtIndex:[parent numberOfChildren]
+                        ofBookmark:parent
+                         withTitle:newTitle
+                             image:newImage
+                         URLString:newURLString
+                            isLeaf:flag];
 }
 
 - (void)insertNewBookmarkAtIndex:(unsigned)index
                       ofBookmark:(IFBookmark *)parent
-                           title:(NSString *)newTitle
-                           image:(NSString *)newImage
-                             URL:(NSString *)newURLString
+                       withTitle:(NSString *)newTitle
+                           image:(NSImage *)newImage
+                       URLString:(NSString *)newURLString
                           isLeaf:(BOOL)flag
 {
-    _logNotYetImplemented();
+    IFBookmark *bookmark;
+
+    WEBKIT_ASSERT_VALID_ARG (parent, [parent group] == self);
+    WEBKIT_ASSERT_VALID_ARG (parent, ![parent isLeaf]);
+    WEBKIT_ASSERT_VALID_ARG (newURLString, flag ? (newURLString != nil) : (newURLString == nil));
+
+    if (flag) {
+        bookmark = [[[IFBookmarkLeaf alloc] initWithURLString:newURLString
+                                                        title:newTitle
+                                                        image:newImage
+                                                        group:self] autorelease];
+    } else {
+        bookmark = [[[IFBookmarkList alloc] initWithTitle:newTitle
+                                                    image:newImage
+                                                    group:self] autorelease];
+    }
+
+    [parent _insertChild:bookmark atIndex:index];
+    [self _sendBookmarkGroupChangedNotification];
 }
 
 - (void)updateBookmark:(IFBookmark *)bookmark
                  title:(NSString *)newTitle
                  image:(NSString *)newImage
-                   URL:(NSString *)newURLString
+             URLString:(NSString *)newURLString
 {
     _logNotYetImplemented();
 }
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.h b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.h
index 82ae440..26d2ede 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.h
+++ b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.h
@@ -15,6 +15,9 @@
     NSString *_URLString;
 }
 
-- (id)initWithURLString:(NSString *)URLString title:(NSString *)title group:(IFBookmarkGroup *)group;
+- (id)initWithURLString:(NSString *)URLString
+                  title:(NSString *)title
+                  image:(NSImage *)image
+                  group:(IFBookmarkGroup *)group;
 
 @end
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
index f6d96e8..1a4328d 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
@@ -14,7 +14,10 @@
 
 @implementation IFBookmarkLeaf
 
-- (id)initWithURLString:(NSString *)URLString title:(NSString *)title group:(IFBookmarkGroup *)group;
+- (id)initWithURLString:(NSString *)URLString
+                  title:(NSString *)title
+                  image:(NSImage *)image
+                  group:(IFBookmarkGroup *)group;
 {
     WEBKIT_ASSERT_VALID_ARG (group, group != nil);
     
@@ -23,7 +26,7 @@
     // Since our URLString may not be valid for creating an NSURL object,
     // just hang onto the string separately and don't bother creating
     // an NSURL object for the IFURIEntry.
-    _entry = [[IFURIEntry alloc] initWithURL:nil title:title];
+    _entry = [[IFURIEntry alloc] initWithURL:nil title:title image:image];
     _URLString = [URLString retain];
     [self _setGroup:group];
 
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkList.m b/WebKit/Bookmarks.subproj/WebBookmarkList.m
index e484afc..250dbf1 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkList.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkList.m
@@ -72,6 +72,19 @@
     return [NSArray arrayWithArray:_list];
 }
 
+- (unsigned)numberOfChildren
+{
+    return [_list count];
+}
+
+- (void)_removeChild:(IFBookmark *)bookmark
+{
+    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark parent] == self);
+    [_list removeObject:bookmark];
+    [bookmark _setParent:nil];
+}
+
+
 - (void)_insertChild:(IFBookmark *)bookmark atIndex:(unsigned)index
 {
     [_list insertObject:bookmark atIndex:index];
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h b/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h
index ca73921..29e5c67 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h
+++ b/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h
@@ -17,6 +17,7 @@
 - (void)_setParent:(IFBookmark *)parent;
 - (void)_setGroup:(IFBookmarkGroup *)group;
 - (void)_insertChild:(IFBookmark *)bookmark atIndex:(unsigned)index;
+- (void)_removeChild:(IFBookmark *)bookmark;
 
 @end
 
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index fb1e3ee..74bcb9b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,35 @@
+2002-05-02  John Sullivan  <sullivan at apple.com>
+
+	Some more implementation of bookmarks code, enough to support
+	adding bookmarks to the Bookmarks menu (but not yet enough to
+	support persistent bookmarks).
+
+	* Bookmarks.subproj/IFBookmark_Private.h:
+	* Bookmarks.subproj/IFBookmark.h:
+	* Bookmarks.subproj/IFBookmark.m:
+	(-[IFBookmark numberOfChildren]): New public method, stub implementation.
+	(-[IFBookmark _removeChild:]): New private method, stub implementation.
+
+	* Bookmarks.subproj/IFBookmarkGroup.h:
+	* Bookmarks.subproj/IFBookmarkGroup.m:
+	(-[IFBookmarkGroup _sendBookmarkGroupChangedNotification]):
+	(-[IFBookmarkGroup removeBookmark:]):
+	(-[IFBookmarkGroup addNewBookmarkToBookmark:withTitle:image:URLString:isLeaf:]):
+	(-[IFBookmarkGroup insertNewBookmarkAtIndex:ofBookmark:withTitle:image:URLString:isLeaf:]):
+	(-[IFBookmarkGroup updateBookmark:title:image:URLString:]):
+	Changed "URL" to "URLString" in several places, added a "with"
+	to some parameter names; added addNewBookmarkToBookmark public 
+	method; added notification that's sent when bookmarks are added or removed.
+
+	* Bookmarks.subproj/IFBookmarkLeaf.h:
+	* Bookmarks.subproj/IFBookmarkLeaf.m:
+	(-[IFBookmarkLeaf initWithURLString:title:image:group:]):
+	Added image parameter.
+
+	* Bookmarks.subproj/IFBookmarkList.m:
+	(-[IFBookmarkList numberOfChildren]): New method.
+	(-[IFBookmarkList _removeChild:]): Implemented.
+
 2002-04-30  John Sullivan  <sullivan at apple.com>
 
 	Added initial set of files/API and some of the code for
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index fb1e3ee..74bcb9b 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,35 @@
+2002-05-02  John Sullivan  <sullivan at apple.com>
+
+	Some more implementation of bookmarks code, enough to support
+	adding bookmarks to the Bookmarks menu (but not yet enough to
+	support persistent bookmarks).
+
+	* Bookmarks.subproj/IFBookmark_Private.h:
+	* Bookmarks.subproj/IFBookmark.h:
+	* Bookmarks.subproj/IFBookmark.m:
+	(-[IFBookmark numberOfChildren]): New public method, stub implementation.
+	(-[IFBookmark _removeChild:]): New private method, stub implementation.
+
+	* Bookmarks.subproj/IFBookmarkGroup.h:
+	* Bookmarks.subproj/IFBookmarkGroup.m:
+	(-[IFBookmarkGroup _sendBookmarkGroupChangedNotification]):
+	(-[IFBookmarkGroup removeBookmark:]):
+	(-[IFBookmarkGroup addNewBookmarkToBookmark:withTitle:image:URLString:isLeaf:]):
+	(-[IFBookmarkGroup insertNewBookmarkAtIndex:ofBookmark:withTitle:image:URLString:isLeaf:]):
+	(-[IFBookmarkGroup updateBookmark:title:image:URLString:]):
+	Changed "URL" to "URLString" in several places, added a "with"
+	to some parameter names; added addNewBookmarkToBookmark public 
+	method; added notification that's sent when bookmarks are added or removed.
+
+	* Bookmarks.subproj/IFBookmarkLeaf.h:
+	* Bookmarks.subproj/IFBookmarkLeaf.m:
+	(-[IFBookmarkLeaf initWithURLString:title:image:group:]):
+	Added image parameter.
+
+	* Bookmarks.subproj/IFBookmarkList.m:
+	(-[IFBookmarkList numberOfChildren]): New method.
+	(-[IFBookmarkList _removeChild:]): Implemented.
+
 2002-04-30  John Sullivan  <sullivan at apple.com>
 
 	Added initial set of files/API and some of the code for

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list