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


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

    	Implemented removing the root node bookmark (i.e.,
    	removing all bookmarks with one call).
    
    	* Bookmarks.subproj/IFBookmarkGroup.m:
    	(-[IFBookmarkGroup _resetTopBookmark]): New method, releases
    	old topBookmark and creates new one.
    	(-[IFBookmarkGroup initWithFile:]): Call _resetTopBookmark.
    	(-[IFBookmarkGroup removeBookmark:]): If the bookmark being
    	removed is the top one, call _resetTopBookmark.
    
    	Added "Erase All Bookmarks" menu item to Debug menu, which will be
    	handy in the interim between making bookmarks persistent and making
    	them organizable (they are neither yet).
    
    	Along the way, made DebugUtilities be a shared instance instead of
    	a collection of class methods, to make some innards easier to
    	implement.
    
    	* Debug/DebugUtilities.h: new class method sharedDebugUtilities;
    	changed other class methods to instance methods; made _debugMenu
    	an instance variable.
    
    	* Debug/DebugUtilities.m:
    	(-[DebugUtilities dealloc]): release _debugMenu.
    	(+[DebugUtilities sharedDebugUtilities]): New method.
    	(-[DebugUtilities addDebugBookmarkToMenu:forURL:keyEquivalent:]):
    	(-[DebugUtilities pathForDebugBookmarks]):
    	(-[DebugUtilities loadDebugBookmarks]):
    	(-[DebugUtilities conditionallyDisplayPageLoadTestWindow]):
    	Changed class methods to instance methods. Also updated private
    	AppController method name that had changed, causing the debug
    	bookmarks to become disabled with my last checkin.
    	(-[DebugUtilities eraseAllBookmarks:]): New method.
    	(-[DebugUtilities createDebugMenu]): Add "Erase All Bookmarks"
    	menu item, with -eraseAllBookmarks as callback.
    
    	* AppController.m:
    	(-[AppController awakeFromNib]): use sharedDebugUtilities where a
    	class method used to work.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1089 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Bookmarks.subproj/IFBookmarkGroup.m b/WebKit/Bookmarks.subproj/IFBookmarkGroup.m
index 1cb8d84..f510508 100644
--- a/WebKit/Bookmarks.subproj/IFBookmarkGroup.m
+++ b/WebKit/Bookmarks.subproj/IFBookmarkGroup.m
@@ -19,6 +19,13 @@
     return [[[IFBookmarkGroup alloc] initWithFile:file] autorelease];
 }
 
+- (void)_resetTopBookmark
+{
+    [_topBookmark _setGroup:nil];
+    [_topBookmark autorelease];
+    _topBookmark = [[[IFBookmarkList alloc] initWithTitle:nil image:nil group:self] retain];
+}
+
 - (id)initWithFile: (NSString *)file
 {
     if (![super init]) {
@@ -26,7 +33,7 @@
     }
 
     _file = [file retain];
-    _topBookmark = [[[IFBookmarkList alloc] initWithTitle:nil image:nil group:self] retain];
+    [self _resetTopBookmark];
 
     // read history from disk
     [self loadBookmarkGroup];
@@ -63,10 +70,14 @@
 - (void)removeBookmark:(IFBookmark *)bookmark
 {
     WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark group] == self);
-    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark parent] != nil);
+    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark parent] != nil || bookmark == _topBookmark);
 
-    [[bookmark parent] _removeChild:bookmark];
-    [bookmark _setGroup:nil];
+    if (bookmark == _topBookmark) {
+        [self _resetTopBookmark];
+    } else {
+        [[bookmark parent] _removeChild:bookmark];
+        [bookmark _setGroup:nil];
+    }
     
     [self _sendBookmarkGroupChangedNotification];
 }
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
index 1cb8d84..f510508 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
@@ -19,6 +19,13 @@
     return [[[IFBookmarkGroup alloc] initWithFile:file] autorelease];
 }
 
+- (void)_resetTopBookmark
+{
+    [_topBookmark _setGroup:nil];
+    [_topBookmark autorelease];
+    _topBookmark = [[[IFBookmarkList alloc] initWithTitle:nil image:nil group:self] retain];
+}
+
 - (id)initWithFile: (NSString *)file
 {
     if (![super init]) {
@@ -26,7 +33,7 @@
     }
 
     _file = [file retain];
-    _topBookmark = [[[IFBookmarkList alloc] initWithTitle:nil image:nil group:self] retain];
+    [self _resetTopBookmark];
 
     // read history from disk
     [self loadBookmarkGroup];
@@ -63,10 +70,14 @@
 - (void)removeBookmark:(IFBookmark *)bookmark
 {
     WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark group] == self);
-    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark parent] != nil);
+    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark parent] != nil || bookmark == _topBookmark);
 
-    [[bookmark parent] _removeChild:bookmark];
-    [bookmark _setGroup:nil];
+    if (bookmark == _topBookmark) {
+        [self _resetTopBookmark];
+    } else {
+        [[bookmark parent] _removeChild:bookmark];
+        [bookmark _setGroup:nil];
+    }
     
     [self _sendBookmarkGroupChangedNotification];
 }
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 74bcb9b..fb15480 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,17 @@
 2002-05-02  John Sullivan  <sullivan at apple.com>
 
+	Implemented removing the root node bookmark (i.e.,
+	removing all bookmarks with one call).
+
+	* Bookmarks.subproj/IFBookmarkGroup.m:
+	(-[IFBookmarkGroup _resetTopBookmark]): New method, releases
+	old topBookmark and creates new one.
+	(-[IFBookmarkGroup initWithFile:]): Call _resetTopBookmark.
+	(-[IFBookmarkGroup removeBookmark:]): If the bookmark being
+	removed is the top one, call _resetTopBookmark.
+
+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).
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 74bcb9b..fb15480 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,17 @@
 2002-05-02  John Sullivan  <sullivan at apple.com>
 
+	Implemented removing the root node bookmark (i.e.,
+	removing all bookmarks with one call).
+
+	* Bookmarks.subproj/IFBookmarkGroup.m:
+	(-[IFBookmarkGroup _resetTopBookmark]): New method, releases
+	old topBookmark and creates new one.
+	(-[IFBookmarkGroup initWithFile:]): Call _resetTopBookmark.
+	(-[IFBookmarkGroup removeBookmark:]): If the bookmark being
+	removed is the top one, call _resetTopBookmark.
+
+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).

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list