[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:12:52 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 287e232d42213c17d923a96e53ce1ae934870012
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed May 15 03:35:00 2002 +0000
Work to support copying bookmarks, needed for drag & drop
in Bookmarks window.
* Bookmarks.subproj/IFBookmark.h: Make IFBookmark conform to NSCopying.
* Bookmarks.subproj/IFBookmark.m:
(-[IFBookmark copyWithZone:]): insist that subclasses implement this.
* Bookmarks.subproj/IFBookmarkGroup.h:
* Bookmarks.subproj/IFBookmarkGroup.m:
(-[IFBookmarkGroup insertBookmark:atIndex:ofBookmark:]):
Removed this unnecessary method.
* Bookmarks.subproj/IFBookmarkLeaf.m:
(-[IFBookmarkLeaf copyWithZone:]): New method.
* Bookmarks.subproj/IFBookmarkList.m:
(-[IFBookmarkList copyWithZone:]): New method.
Fixed 2921730 -- Can't rearrange bookmarks in Bookmarks window
You can now drag and drop willy-nilly in the Bookmarks window to
rearrange items. It's currently using a private pasteboard type,
so you can't drop items from elsewhere or drag the bookmarks out
of the list. I know of one bug (dropping an item inside itself
makes it poof into nothingness) which I'll write up in a moment.
* BookmarksController.m:
(-[BookmarksController windowDidLoad]): register for our dragged type.
(-[BookmarksController _anyAncestorOfRow:inArray:]): New helper method,
used to avoid copying a folder deep and some of its children at the
same time.
(-[BookmarksController outlineView:writeItems:toPasteboard:]):
Write list of rows to pasteboard, after eliminating items whose ancestors are
also in set.
(-[BookmarksController outlineView:validateDrop:proposedItem:proposedChildIndex:]):
Move a drop on a leaf bookmark to be after the leaf bookmark.
(-[BookmarksController outlineView:acceptDrop:item:childIndex:]):
Do the move, by inserting copies of the moved items and then removing
the originals.
* OutlineViewPlus.m:
(-[OutlineViewPlus setAcceptsFirstMouse:]):
(-[OutlineViewPlus acceptsFirstMouse:]):
Removed debugging messages I accidentally left in here.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/Bookmarks.subproj/IFBookmark.h b/WebKit/Bookmarks.subproj/IFBookmark.h
index 8c2864d..aebb158 100644
--- a/WebKit/Bookmarks.subproj/IFBookmark.h
+++ b/WebKit/Bookmarks.subproj/IFBookmark.h
@@ -10,7 +10,7 @@
@class IFBookmarkGroup;
- at interface IFBookmark : NSObject {
+ at interface IFBookmark : NSObject <NSCopying> {
IFBookmark *_parent;
IFBookmarkGroup *_group;
}
diff --git a/WebKit/Bookmarks.subproj/IFBookmark.m b/WebKit/Bookmarks.subproj/IFBookmark.m
index 0c902c8..52bf2d9 100644
--- a/WebKit/Bookmarks.subproj/IFBookmark.m
+++ b/WebKit/Bookmarks.subproj/IFBookmark.m
@@ -22,6 +22,12 @@
[super dealloc];
}
+- (id)copyWithZone:(NSZone *)zone
+{
+ NSRequestConcreteImplementation(self, _cmd, [self class]);
+ return nil;
+}
+
- (NSString *)title
{
NSRequestConcreteImplementation(self, _cmd, [self class]);
diff --git a/WebKit/Bookmarks.subproj/IFBookmarkGroup.h b/WebKit/Bookmarks.subproj/IFBookmarkGroup.h
index c631ea4..f9c6b3b 100644
--- a/WebKit/Bookmarks.subproj/IFBookmarkGroup.h
+++ b/WebKit/Bookmarks.subproj/IFBookmarkGroup.h
@@ -35,9 +35,6 @@
- (IFBookmark *)topBookmark;
// modifying contents
-- (void)insertBookmark:(IFBookmark *)bookmark
- atIndex:(unsigned)index
- ofBookmark:(IFBookmark *)parent;
- (void)removeBookmark:(IFBookmark *)bookmark;
- (IFBookmark *)insertNewBookmarkAtIndex:(unsigned)index
diff --git a/WebKit/Bookmarks.subproj/IFBookmarkGroup.m b/WebKit/Bookmarks.subproj/IFBookmarkGroup.m
index 4b041fd..1a7ea2f 100644
--- a/WebKit/Bookmarks.subproj/IFBookmarkGroup.m
+++ b/WebKit/Bookmarks.subproj/IFBookmarkGroup.m
@@ -113,13 +113,6 @@
[self _sendChangeNotificationForBookmark:bookmark childrenChanged:YES];
}
-- (void)insertBookmark:(IFBookmark *)bookmark
- atIndex:(unsigned)index
- ofBookmark:(IFBookmark *)parent
-{
- _logNotYetImplemented();
-}
-
- (void)removeBookmark:(IFBookmark *)bookmark
{
WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark _group] == self);
@@ -172,7 +165,6 @@
}
[parent insertChild:bookmark atIndex:index];
-
return bookmark;
}
diff --git a/WebKit/Bookmarks.subproj/IFBookmarkLeaf.m b/WebKit/Bookmarks.subproj/IFBookmarkLeaf.m
index 6415961..50792f3 100644
--- a/WebKit/Bookmarks.subproj/IFBookmarkLeaf.m
+++ b/WebKit/Bookmarks.subproj/IFBookmarkLeaf.m
@@ -71,6 +71,14 @@
[super dealloc];
}
+- (id)copyWithZone:(NSZone *)zone
+{
+ return [[IFBookmarkLeaf alloc] initWithURLString:_URLString
+ title:[self title]
+ image:[self image]
+ group:[self _group]];
+}
+
- (NSString *)title
{
return [_entry title];
diff --git a/WebKit/Bookmarks.subproj/IFBookmarkList.m b/WebKit/Bookmarks.subproj/IFBookmarkList.m
index 9cb5718..9e7c6d5 100644
--- a/WebKit/Bookmarks.subproj/IFBookmarkList.m
+++ b/WebKit/Bookmarks.subproj/IFBookmarkList.m
@@ -115,6 +115,26 @@
[super dealloc];
}
+- (id)copyWithZone:(NSZone *)zone
+{
+ IFBookmarkList *copy;
+ unsigned index, count;
+
+ copy = [[IFBookmarkList alloc] initWithTitle:[self title]
+ image:[self image]
+ group:[self _group]];
+
+ count = [self numberOfChildren];
+ for (index = 0; index < count; ++index) {
+ IFBookmark *childCopy;
+
+ childCopy = [[[_list objectAtIndex:index] copyWithZone:zone] autorelease];
+ [copy insertChild:childCopy atIndex:index];
+ }
+
+ return copy;
+}
+
- (NSString *)title
{
return _title;
diff --git a/WebKit/Bookmarks.subproj/WebBookmark.h b/WebKit/Bookmarks.subproj/WebBookmark.h
index 8c2864d..aebb158 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.h
+++ b/WebKit/Bookmarks.subproj/WebBookmark.h
@@ -10,7 +10,7 @@
@class IFBookmarkGroup;
- at interface IFBookmark : NSObject {
+ at interface IFBookmark : NSObject <NSCopying> {
IFBookmark *_parent;
IFBookmarkGroup *_group;
}
diff --git a/WebKit/Bookmarks.subproj/WebBookmark.m b/WebKit/Bookmarks.subproj/WebBookmark.m
index 0c902c8..52bf2d9 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.m
+++ b/WebKit/Bookmarks.subproj/WebBookmark.m
@@ -22,6 +22,12 @@
[super dealloc];
}
+- (id)copyWithZone:(NSZone *)zone
+{
+ NSRequestConcreteImplementation(self, _cmd, [self class]);
+ return nil;
+}
+
- (NSString *)title
{
NSRequestConcreteImplementation(self, _cmd, [self class]);
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkGroup.h b/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
index c631ea4..f9c6b3b 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
+++ b/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
@@ -35,9 +35,6 @@
- (IFBookmark *)topBookmark;
// modifying contents
-- (void)insertBookmark:(IFBookmark *)bookmark
- atIndex:(unsigned)index
- ofBookmark:(IFBookmark *)parent;
- (void)removeBookmark:(IFBookmark *)bookmark;
- (IFBookmark *)insertNewBookmarkAtIndex:(unsigned)index
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
index 4b041fd..1a7ea2f 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
@@ -113,13 +113,6 @@
[self _sendChangeNotificationForBookmark:bookmark childrenChanged:YES];
}
-- (void)insertBookmark:(IFBookmark *)bookmark
- atIndex:(unsigned)index
- ofBookmark:(IFBookmark *)parent
-{
- _logNotYetImplemented();
-}
-
- (void)removeBookmark:(IFBookmark *)bookmark
{
WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark _group] == self);
@@ -172,7 +165,6 @@
}
[parent insertChild:bookmark atIndex:index];
-
return bookmark;
}
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
index 6415961..50792f3 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
@@ -71,6 +71,14 @@
[super dealloc];
}
+- (id)copyWithZone:(NSZone *)zone
+{
+ return [[IFBookmarkLeaf alloc] initWithURLString:_URLString
+ title:[self title]
+ image:[self image]
+ group:[self _group]];
+}
+
- (NSString *)title
{
return [_entry title];
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkList.m b/WebKit/Bookmarks.subproj/WebBookmarkList.m
index 9cb5718..9e7c6d5 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkList.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkList.m
@@ -115,6 +115,26 @@
[super dealloc];
}
+- (id)copyWithZone:(NSZone *)zone
+{
+ IFBookmarkList *copy;
+ unsigned index, count;
+
+ copy = [[IFBookmarkList alloc] initWithTitle:[self title]
+ image:[self image]
+ group:[self _group]];
+
+ count = [self numberOfChildren];
+ for (index = 0; index < count; ++index) {
+ IFBookmark *childCopy;
+
+ childCopy = [[[_list objectAtIndex:index] copyWithZone:zone] autorelease];
+ [copy insertChild:childCopy atIndex:index];
+ }
+
+ return copy;
+}
+
- (NSString *)title
{
return _title;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index f8d71a4..ad8653b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,24 @@
+2002-05-14 John Sullivan <sullivan at apple.com>
+
+ Work to support copying bookmarks, needed for drag & drop
+ in Bookmarks window.
+
+ * Bookmarks.subproj/IFBookmark.h: Make IFBookmark conform to NSCopying.
+
+ * Bookmarks.subproj/IFBookmark.m:
+ (-[IFBookmark copyWithZone:]): insist that subclasses implement this.
+
+ * Bookmarks.subproj/IFBookmarkGroup.h:
+ * Bookmarks.subproj/IFBookmarkGroup.m:
+ (-[IFBookmarkGroup insertBookmark:atIndex:ofBookmark:]):
+ Removed this unnecessary method.
+
+ * Bookmarks.subproj/IFBookmarkLeaf.m:
+ (-[IFBookmarkLeaf copyWithZone:]): New method.
+
+ * Bookmarks.subproj/IFBookmarkList.m:
+ (-[IFBookmarkList copyWithZone:]): New method.
+
2002-05-14 Richard J. Williamson <rjw at apple.com>
Fixed exception in log code.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index f8d71a4..ad8653b 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,24 @@
+2002-05-14 John Sullivan <sullivan at apple.com>
+
+ Work to support copying bookmarks, needed for drag & drop
+ in Bookmarks window.
+
+ * Bookmarks.subproj/IFBookmark.h: Make IFBookmark conform to NSCopying.
+
+ * Bookmarks.subproj/IFBookmark.m:
+ (-[IFBookmark copyWithZone:]): insist that subclasses implement this.
+
+ * Bookmarks.subproj/IFBookmarkGroup.h:
+ * Bookmarks.subproj/IFBookmarkGroup.m:
+ (-[IFBookmarkGroup insertBookmark:atIndex:ofBookmark:]):
+ Removed this unnecessary method.
+
+ * Bookmarks.subproj/IFBookmarkLeaf.m:
+ (-[IFBookmarkLeaf copyWithZone:]): New method.
+
+ * Bookmarks.subproj/IFBookmarkList.m:
+ (-[IFBookmarkList copyWithZone:]): New method.
+
2002-05-14 Richard J. Williamson <rjw at apple.com>
Fixed exception in log code.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list