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


The following commit has been merged in the debian/unstable branch:
commit 664ec5c58c58770ef28ba48111423895946ccee1
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 11 21:56:21 2002 +0000

    WebKit:
    
    	Added the concept of bookmark proxies; items that can be
    	stored and displayed with other bookmarks but represent
    	a source of bookmark-like items (e.g. Rendezvous, History)
    
            * Bookmarks.subproj/WebBookmarkProxy.h: Added.
            * Bookmarks.subproj/WebBookmarkProxy.m: Added.
            (-[WebBookmarkProxy initFromDictionaryRepresentation:withGroup:]):
            (-[WebBookmarkProxy dictionaryRepresentation]):
            (-[WebBookmarkProxy bookmarkType]):
            (-[WebBookmarkProxy copyWithZone:]):
            (-[WebBookmarkProxy title]):
            (-[WebBookmarkProxy setTitle:]):
            (-[WebBookmarkProxy icon]):
    	New class, has a title and that's about it
    
            * Bookmarks.subproj/WebBookmark.h:
            * Bookmarks.subproj/WebBookmark.m:
            (+[WebBookmark bookmarkFromDictionaryRepresentation:withGroup:]):
    	Handle proxy case
    
            * Bookmarks.subproj/WebBookmarkGroup.m:
            (-[WebBookmarkGroup insertNewBookmarkAtIndex:ofBookmark:withTitle:URLString:type:]):
    	Handle proxy case
    
            * Bookmarks.subproj/WebBookmarkList.m:
            (-[WebBookmarkList initFromDictionaryRepresentation:withGroup:]),
            (-[WebBookmarkList dictionaryRepresentation]):
    	Handle proxy case
    
            * Bookmarks.subproj/WebBookmarkPrivate.h:
    	Add #define for proxy
    
            * WebKit.pbproj/project.pbxproj: updated for new files
    
    WebBrowser:
    
    	- started work on moving Address Book, Rendezvous, and History
    	out of their own windows and into the Library view.
    
    	The titles Rendezvous/Address Book/History now appear in the
    	Library view, but they don't do anything. They have no content,
    	you can't drag them, and if you try to drop something on one
    	you get a mysterious console message but nothing else happens.
    
            * BookmarksController.m:
            (+[BookmarksController _favoritesTitle]),
            (+[BookmarksController _menuRootTitle]): just moved in file
            (+[BookmarksController historyProxyTitle]),
            (+[BookmarksController addressBookProxyTitle]),
            (+[BookmarksController rendezvousProxyTitle]): new methods to
    	retrieve localizable titles for these bookmark proxies.
            (-[BookmarksController imageForBookmark:]): supply the right
    	images for the proxies we know about
            (-[BookmarksController addMenuItemForBookmark:toMenu:]):
    	handle proxy case (but there isn't yet a way to get one in a menu)
            (-[BookmarksController _blessOrCreateSpecialFolders]):
    	make sure the right set of proxies are in there where they belong.
    
            * BookmarksViewController.m:
            (-[BookmarksViewController bookmarkForSourceRow:]):
            (-[BookmarksViewController sourceRowForBookmark:]):
            (-[BookmarksViewController numberOfRowsInTableView:]):
            (-[BookmarksViewController canRemoveBookmarkSource:]):
            (-[BookmarksViewController tableView:shouldEditTableColumn:row:]):
            * English.lproj/Localizable.strings:
            * English.lproj/StringsNotToBeLocalized.txt:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2308 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Bookmarks.subproj/WebBookmark.h b/WebKit/Bookmarks.subproj/WebBookmark.h
index eb58b4e..e2bcda1 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.h
+++ b/WebKit/Bookmarks.subproj/WebBookmark.h
@@ -13,6 +13,7 @@
 typedef enum {
     WebBookmarkTypeLeaf,
     WebBookmarkTypeList,
+    WebBookmarkTypeProxy,
 } WebBookmarkType;
 
 @interface WebBookmark : NSObject <NSCopying> {
diff --git a/WebKit/Bookmarks.subproj/WebBookmark.m b/WebKit/Bookmarks.subproj/WebBookmark.m
index 11e98e7..1925366 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.m
+++ b/WebKit/Bookmarks.subproj/WebBookmark.m
@@ -12,6 +12,7 @@
 #import <WebKit/WebBookmarkGroupPrivate.h>
 #import <WebKit/WebBookmarkLeaf.h>
 #import <WebKit/WebBookmarkList.h>
+#import <WebKit/WebBookmarkProxy.h>
 #import <WebFoundation/WebAssertions.h>
 
 // to get NSRequestConcreteImplementation
@@ -141,6 +142,8 @@
         class = [WebBookmarkList class];
     } else if ([typeString isEqualToString:WebBookmarkTypeLeafValue]) {
         class = [WebBookmarkLeaf class];
+    } else if ([typeString isEqualToString:WebBookmarkTypeProxyValue]) {
+        class = [WebBookmarkProxy class];
     }
     
     if (class) {
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
index 7e3e7d1..9070ca2 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
@@ -11,6 +11,7 @@
 #import <WebKit/WebBookmarkPrivate.h>
 #import <WebKit/WebBookmarkList.h>
 #import <WebKit/WebBookmarkLeaf.h>
+#import <WebKit/WebBookmarkProxy.h>
 #import <WebKit/WebKitLogging.h>
 
 @interface WebBookmarkGroup (WebForwardDeclarations)
@@ -143,15 +144,21 @@
     ASSERT_ARG(parent, [parent group] == self);
     ASSERT_ARG(parent, [parent bookmarkType] == WebBookmarkTypeList);
     ASSERT_ARG(newURLString, bookmarkType == WebBookmarkTypeLeaf || (newURLString == nil));
-    
-    if (bookmarkType == WebBookmarkTypeLeaf) {
-        bookmark = [[WebBookmarkLeaf alloc] initWithURLString:newURLString
-                                                        title:newTitle
+
+    switch (bookmarkType) {
+        case WebBookmarkTypeLeaf:
+            bookmark = [[WebBookmarkLeaf alloc] initWithURLString:newURLString
+                                                            title:newTitle
+                                                            group:self];
+            break;
+        case WebBookmarkTypeList:
+            bookmark = [[WebBookmarkList alloc] initWithTitle:newTitle
                                                         group:self];
-    } else {
-        ASSERT(bookmarkType == WebBookmarkTypeList);
-        bookmark = [[WebBookmarkList alloc] initWithTitle:newTitle
-                                                    group:self];
+            break;
+        case WebBookmarkTypeProxy:
+            bookmark = [[WebBookmarkProxy alloc] initWithTitle:newTitle
+                                                         group:self];
+            break;
     }
 
     [parent insertChild:bookmark atIndex:index];
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkList.m b/WebKit/Bookmarks.subproj/WebBookmarkList.m
index e825497..044d18a 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkList.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkList.m
@@ -32,7 +32,11 @@
 - (id)initFromDictionaryRepresentation:(NSDictionary *)dict withGroup:(WebBookmarkGroup *)group
 {
     ASSERT_ARG(dict, dict != nil);
-
+    if (![[dict objectForKey:WebBookmarkTypeKey] isEqualToString:WebBookmarkTypeListValue]) {
+        ERROR("Can't initialize Bookmark list from non-list type");
+        return nil;
+    }
+    
     [super init];
 
     [self _setGroup:group];
@@ -66,7 +70,6 @@
 
     dict = [NSMutableDictionary dictionaryWithCapacity: 3];
 
-    // FIXME: doesn't save images
     if (_title != nil) {
         [dict setObject:_title forKey:TitleKey];
     }
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h b/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h
index 66145dd..b666656 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h
+++ b/WebKit/Bookmarks.subproj/WebBookmarkPrivate.h
@@ -12,6 +12,7 @@
 #define WebBookmarkTypeKey		@"WebBookmarkType"
 #define WebBookmarkTypeLeafValue	@"WebBookmarkTypeLeaf"
 #define WebBookmarkTypeListValue	@"WebBookmarkTypeList"
+#define WebBookmarkTypeProxyValue	@"WebBookmarkTypeProxy"
 
 @interface WebBookmark(WebPrivate)
 
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkList.h b/WebKit/Bookmarks.subproj/WebBookmarkProxy.h
similarity index 60%
copy from WebKit/Bookmarks.subproj/WebBookmarkList.h
copy to WebKit/Bookmarks.subproj/WebBookmarkProxy.h
index 77f09cb..341c9dd 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkList.h
+++ b/WebKit/Bookmarks.subproj/WebBookmarkProxy.h
@@ -1,16 +1,16 @@
 //
-//  WebBookmarkList.h
+//  WebBookmarkProxy.h
 //  WebKit
 //
-//  Created by John Sullivan on Tue Apr 30 2002.
+//  Created by John Sullivan on Fri Oct 11 2002.
 //  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
 //
 
 #import <WebKit/WebBookmark.h>
 
- at interface WebBookmarkList : WebBookmark {
+
+ at interface WebBookmarkProxy : WebBookmark {
     NSString *_title;
-    NSMutableArray *_list;
 }
 
 - (id)initWithTitle:(NSString *)title group:(WebBookmarkGroup *)group;
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkProxy.m b/WebKit/Bookmarks.subproj/WebBookmarkProxy.m
new file mode 100644
index 0000000..616c208
--- /dev/null
+++ b/WebKit/Bookmarks.subproj/WebBookmarkProxy.m
@@ -0,0 +1,80 @@
+//
+//  WebBookmarkProxy.m
+//  WebKit
+//
+//  Created by John Sullivan on Fri Oct 11 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import "WebBookmarkProxy.h"
+
+#import "WebBookmarkPrivate.h"
+#import "WebBookmarkGroupPrivate.h"
+#import <WebFoundation/WebAssertions.h>
+
+#define TitleKey		@"Title"
+
+ at implementation WebBookmarkProxy
+
+- (id)initWithTitle:(NSString *)title group:(WebBookmarkGroup *)group;
+{
+    [super init];
+    [self _setGroup:group];
+    [self setTitle:title];
+
+    return self;    
+}
+
+- (id)initFromDictionaryRepresentation:(NSDictionary *)dict withGroup:(WebBookmarkGroup *)group
+{
+    if (![[dict objectForKey:WebBookmarkTypeKey] isEqualToString:WebBookmarkTypeProxyValue]) {
+        ERROR("Can't initialize Bookmark proxy from non-proxy type");
+        return nil;
+    }
+
+    return [self initWithTitle:[dict objectForKey:TitleKey] group:group];
+}
+
+- (NSDictionary *)dictionaryRepresentation
+{
+    NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:2];
+    [dict setObject:WebBookmarkTypeProxyValue forKey:WebBookmarkTypeKey];
+    if (_title != nil) {
+        [dict setObject:_title forKey:TitleKey];
+    }
+
+    return dict;
+}
+
+- (WebBookmarkType)bookmarkType
+{
+    return WebBookmarkTypeProxy;
+}
+
+- (id)copyWithZone:(NSZone *)zone
+{
+    return [[WebBookmarkProxy alloc] initWithTitle:_title group:[self group]];
+}
+
+- (NSString *)title
+{
+    return _title;
+}
+
+- (void)setTitle:(NSString *)newTitle
+{
+    if (_title == newTitle) {
+        return;
+    }
+
+    [_title release];
+    _title = [newTitle copy];
+    [[self group] _bookmarkDidChange:self]; 
+}
+
+- (NSImage *)icon
+{
+    return nil;
+}
+
+ at end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0cbffda..94b2784 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,39 @@
+2002-10-11  John Sullivan  <sullivan at apple.com>
+
+	Added the concept of bookmark proxies; items that can be
+	stored and displayed with other bookmarks but represent
+	a source of bookmark-like items (e.g. Rendezvous, History)
+
+        * Bookmarks.subproj/WebBookmarkProxy.h: Added.
+        * Bookmarks.subproj/WebBookmarkProxy.m: Added.
+        (-[WebBookmarkProxy initFromDictionaryRepresentation:withGroup:]):
+        (-[WebBookmarkProxy dictionaryRepresentation]):
+        (-[WebBookmarkProxy bookmarkType]):
+        (-[WebBookmarkProxy copyWithZone:]):
+        (-[WebBookmarkProxy title]):
+        (-[WebBookmarkProxy setTitle:]):
+        (-[WebBookmarkProxy icon]):
+	New class, has a title and that's about it
+
+        * Bookmarks.subproj/WebBookmark.h:
+        * Bookmarks.subproj/WebBookmark.m:
+        (+[WebBookmark bookmarkFromDictionaryRepresentation:withGroup:]):
+	Handle proxy case
+
+        * Bookmarks.subproj/WebBookmarkGroup.m:
+        (-[WebBookmarkGroup insertNewBookmarkAtIndex:ofBookmark:withTitle:URLString:type:]):
+	Handle proxy case
+
+        * Bookmarks.subproj/WebBookmarkList.m:
+        (-[WebBookmarkList initFromDictionaryRepresentation:withGroup:]),
+        (-[WebBookmarkList dictionaryRepresentation]):
+	Handle proxy case
+
+        * Bookmarks.subproj/WebBookmarkPrivate.h:
+	Add #define for proxy
+
+        * WebKit.pbproj/project.pbxproj: updated for new files
+
 2002-10-11  Chris Blumenberg  <cblu at apple.com>
 
 	Thought I has checking for nil enough, but not enough as I raised an exception on Avie's machine.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 0cbffda..94b2784 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,39 @@
+2002-10-11  John Sullivan  <sullivan at apple.com>
+
+	Added the concept of bookmark proxies; items that can be
+	stored and displayed with other bookmarks but represent
+	a source of bookmark-like items (e.g. Rendezvous, History)
+
+        * Bookmarks.subproj/WebBookmarkProxy.h: Added.
+        * Bookmarks.subproj/WebBookmarkProxy.m: Added.
+        (-[WebBookmarkProxy initFromDictionaryRepresentation:withGroup:]):
+        (-[WebBookmarkProxy dictionaryRepresentation]):
+        (-[WebBookmarkProxy bookmarkType]):
+        (-[WebBookmarkProxy copyWithZone:]):
+        (-[WebBookmarkProxy title]):
+        (-[WebBookmarkProxy setTitle:]):
+        (-[WebBookmarkProxy icon]):
+	New class, has a title and that's about it
+
+        * Bookmarks.subproj/WebBookmark.h:
+        * Bookmarks.subproj/WebBookmark.m:
+        (+[WebBookmark bookmarkFromDictionaryRepresentation:withGroup:]):
+	Handle proxy case
+
+        * Bookmarks.subproj/WebBookmarkGroup.m:
+        (-[WebBookmarkGroup insertNewBookmarkAtIndex:ofBookmark:withTitle:URLString:type:]):
+	Handle proxy case
+
+        * Bookmarks.subproj/WebBookmarkList.m:
+        (-[WebBookmarkList initFromDictionaryRepresentation:withGroup:]),
+        (-[WebBookmarkList dictionaryRepresentation]):
+	Handle proxy case
+
+        * Bookmarks.subproj/WebBookmarkPrivate.h:
+	Add #define for proxy
+
+        * WebKit.pbproj/project.pbxproj: updated for new files
+
 2002-10-11  Chris Blumenberg  <cblu at apple.com>
 
 	Thought I has checking for nil enough, but not enough as I raised an exception on Avie's machine.
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index a57a731..46062c1 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -282,6 +282,7 @@
 				F57D1953034E734901A80180,
 				F57D1955034E734901A80180,
 				F57D1959034E734901A80180,
+				EDD9133E03576ADA00C1A526,
 			);
 			isa = PBXHeadersBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -376,6 +377,7 @@
 				F57D1956034E734901A80180,
 				F57D195A034E734901A80180,
 				9367C637034E9F00008635C5,
+				EDD9134003576AFF00C1A526,
 			);
 			isa = PBXSourcesBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1669,6 +1671,30 @@
 			settings = {
 			};
 		};
+		EDD9133D03576ADA00C1A526 = {
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			path = WebBookmarkProxy.h;
+			refType = 4;
+		};
+		EDD9133E03576ADA00C1A526 = {
+			fileRef = EDD9133D03576ADA00C1A526;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		EDD9133F03576AFF00C1A526 = {
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			path = WebBookmarkProxy.m;
+			refType = 4;
+		};
+		EDD9134003576AFF00C1A526 = {
+			fileRef = EDD9133F03576AFF00C1A526;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 //ED0
 //ED1
 //ED2
@@ -1718,6 +1744,8 @@
 				F506521E027F557E01C1A526,
 				F506521F027F557E01C1A526,
 				F5065220027F557E01C1A526,
+				EDD9133D03576ADA00C1A526,
+				EDD9133F03576AFF00C1A526,
 			);
 			isa = PBXGroup;
 			name = Bookmarks;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list