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


The following commit has been merged in the debian/unstable branch:
commit 95621b7da13faa31664da4b1eb88c19b07b5834f
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 28 20:40:31 2002 +0000

    WebKit:
    
            * Bookmarks.subproj/WebBookmark.h:
            * Bookmarks.subproj/WebBookmark.m:
            (-[WebBookmark contentMatches:]): new method, returns YES if
    	two bookmarks are the same, ignoring group and parent.
    
    WebBrowser:
    
    	- fixed 3083274 -- Add preference for separating/consolidating
    	contents of Bookmarks Toolbar and Menu
    	- fixed 3083277 -- Add preferences for showing Address Book and
    	Rendezvous items in Bookmarks menu
    
    	Also made Bookmarks menu update only when it is about to be pulled
    	down (like History menu), rather than every time bookmarks change.
    
            * Defaults.plist,
            * PreferenceKeys.h:
    	Add new preference keys with default values:
    	BookmarksMenuAndToolbarAreSame, BookmarksMenuIncludesAddressBook, and
    	BookmarksMenuIncludesRendezvous. Also #defined BrowserPreferenceValueChangedNotification,
    	which is sent when certain preference values change.
    
            * Preferences.subproj/GeneralPreferences.h:
            * Preferences.subproj/GeneralPreferences.m:
            (-[GeneralPreferences sendChangeNotificationForPreferenceKey:]):
    	new method, sends BrowserPreferenceValueChangedNotification with a particular
    	preference key's name in the userInfo
            (-[GeneralPreferences toggleBookmarksMenuAndToolbarAreSame:]),
            (-[GeneralPreferences toggleBookmarksMenuIncludesRendezvous:]),
            (-[GeneralPreferences toggleBookmarksMenuIncludesAddressBook:]):
    	Set the appropriate preference, and call sendChangeNotificationForPreferenceKey
            (-[GeneralPreferences initializeFromDefaults]):
    	Set the initial state for the new checkboxes.
    
            * Preferences.subproj/English.lproj/GeneralPreferences.nib:
    	Added checkboxes for the three new preferences. With Ron Brannan's help, the
    	text is decent, but the General Preferences panel is now much taller than
    	the others; we'll probably need a reorganization soon.
    
            * BookmarkSource.h:
    	added bookmarkSourceImage, setBookmarkSourceMenu:, and bookmarkSourceMenuTitle
    	to the BookmarkSource protocol.
    
            * GlobalHistory.h: removed setHistoryMenu: and historyMenu
            * GlobalHistory.m:
            (-[GlobalHistory dealloc]): change setHistoryMenu to setBookmarkSourceMenu
            (-[GlobalHistory bookmarkSourceImage]): new method, returns little clock image
            (-[GlobalHistory setBookmarkSourceMenu:]): new name for setHistoryMenu
            (-[GlobalHistory bookmarkSourceMenuTitle]):
    	new method, returns nil here since history uses an existing top-level menu
    
            * AppController.m:
            (-[AppController applicationDidFinishLaunching:]):
    	use -[GlobalHistory setBookmarkSourceMenu:] instead of obsolete
    	-[GlobalHistory setHistoryMenu:]
    
            * ABHomePagesController.h:
            * ABHomePagesController.m:
            (-[ABHomePagesController dealloc]): call setBookmarkSourceMenu:nil
            (-[ABHomePagesController refreshContents]): set _menuGood to NO
            (-[ABHomePagesController updateMenu]):
    	new method, make menu contents match address book contents (if !_menuGood)
            (-[ABHomePagesController setBookmarkSourceMenu:]): new method, set up menuUpdater
            (-[ABHomePagesController bookmarkSourceMenuTitle]): new method, return "Address Book"
            (-[ABHomePagesController bookmarkSourceImage]):
    	new method, return little address book image
    
            * RendezvousController.h:
            * RendezvousController.m:
            (-[RendezvousController dealloc]): call setBookmarkSourceMenu:nil
            (-[RendezvousController sendContentsChangedNotification]): set _menuGood to NO
            (-[RendezvousController updateMenu]):
    	new method, make menu contents match Rendezvous list (if !_menuGood)
            (-[RendezvousController setBookmarkSourceMenu:]): new method, set up menuUpdater
            (-[RendezvousController bookmarkSourceMenuTitle]): new method, return "Rendezvous"
            (-[RendezvousController bookmarkSourceImage]):
    	new method, return little Rendezvous logo image
    
            * BookmarksController.h:
    	now implements MenuUpdaterDelegate protocol and updates the Bookmarks menu only
    	when it's about to be shown rather than when any bookmarks change.
            * BookmarksController.m:
            (-[BookmarksController imageForBookmark:]):
    	get bookmark source images using BookmarkSource protocol rather than hardwiring here
            (-[BookmarksController _removeAllBookmarksFromMenu]):
    	renamed from _removeBookmarksFromMenu for some nitpicky reason
            (-[BookmarksController bookmarkSource:setShouldIncludeSubmenu:]):
    	new method, creates submenu for bookmark source if appropriate
            (-[BookmarksController addSpecialBookmarkSourcesToMenu]):
    	new method, checks preferences and calls bookmarkSource:setShouldIncludeSubmenu:
    	for Rendezvous and AddressBook
            (-[BookmarksController updateMenu]):
    	renamed from _updateBookmarksInMenu (now it's the MenuUpdaterDelegate method);
    	do nothing if _menuGood, otherwise remove all bookmarks, then add them back in.
            (-[BookmarksController _receivedBookmarksChangedNotification:]):
    	set _menuGood to NO rather than updating bookmarks immediately
            (-[BookmarksController receivedBrowserPreferenceValueChangedNotification:]):
    	new method, do the appropriate updating based on which preference changed
            (-[BookmarksController addBookmarksMenuUpdater]):
    	new method, broken out only so it could be called after a delay, since
    	awakeFromNib is slightly too early
            (-[BookmarksController awakeFromNib]):
    	set up menu updater (after delay); observe BrowserPreferenceValueChangedNotification
            (-[BookmarksController dealloc]): remove menu updater
            (-[BookmarksController bookmarkSourceForProxyIdentifier:]):
    	new method, moved here from BookmarksViewController; converts a string
    	identifier into an object implementing <BookmarkSource>
            (-[BookmarksController addUniqueBookmarksFrom:to:]):
    	new method, used to consolidate toolbar and menu contents when the pref is
    	set that way.
            (-[BookmarksController updateBookmarkSources]):
    	renamed from _blessOrCreateSpecialFolders, now it is also called in response
    	to a change to BookmarksMenuAndToolbarAreSamePreferenceKey; handle making menu
    	initially be a copy of toolbar, or consolidating the two, depending on pref value.
    
            * BookmarksViewController.m:
            (-[BookmarksViewController bookmarkSourceContentsChanged:]),
            (-[BookmarksViewController refreshContents]),
            (-[BookmarksViewController bookmarksFromContentItems:]),
            (-[BookmarksViewController bookmarkFromContentItem:]),
            (-[BookmarksViewController canDeleteFromSelectedBookmarkSource]),
            (-[BookmarksViewController child:ofContentItem:]),
            (-[BookmarksViewController isContentItemExpandable:]),
            (-[BookmarksViewController numberOfChildrenOfContentItem:]),
            (-[BookmarksViewController titleStringForContentItem:]),
            (-[BookmarksViewController addressStringForContentItem:]),
            (-[BookmarksViewController imageForContentItem:]),
            (-[BookmarksViewController deleteContentItems:]):
    	Updated to call bookmarkSourceForProxyIdentifier on
    	[BookmarksController sharedController] rather than self.
    
            * FavoriteButton.m:
            (-[FavoriteButton determineDragOperation:]):
    	use -[WebBookmark contentMatches:] instead of (deleted) [FavoriteButton bookmarkMatches:]
    
            * English.lproj/Localizable.strings,
            * English.lproj/StringsNotToBeLocalized.txt: kept localizations up to date
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2491 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Bookmarks.subproj/WebBookmark.h b/WebKit/Bookmarks.subproj/WebBookmark.h
index 3fd5cdc..c41c5c2 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.h
+++ b/WebKit/Bookmarks.subproj/WebBookmark.h
@@ -69,5 +69,7 @@ typedef enum {
 // The group that this bookmark belongs to.
 - (WebBookmarkGroup *)group;
 
+// Compare the content (all information other than parent/group) to another bookmark
+- (BOOL)contentMatches:(WebBookmark *)otherBookmark;
 
 @end
diff --git a/WebKit/Bookmarks.subproj/WebBookmark.m b/WebKit/Bookmarks.subproj/WebBookmark.m
index 2f99789..23b3a97 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.m
+++ b/WebKit/Bookmarks.subproj/WebBookmark.m
@@ -186,4 +186,47 @@
     return nil;
 }
 
+- (BOOL)contentMatches:(WebBookmark *)otherBookmark
+{
+    WebBookmarkType bookmarkType = [self bookmarkType];
+    if (bookmarkType != [otherBookmark bookmarkType]) {
+        return NO;
+    }
+
+    if (![[self title] isEqualToString:[otherBookmark title]]) {
+        return NO;
+    }
+
+    NSString *thisURLString = [self URLString];
+    NSString *thatURLString = [otherBookmark URLString];
+    // handle case where both are nil
+    if (thisURLString != thatURLString && ![thisURLString isEqualToString:thatURLString]) {
+        return NO;
+    }
+
+    NSString *thisIdentifier = [self identifier];
+    NSString *thatIdentifier = [otherBookmark identifier];
+    // handle case where both are nil
+    if (thisIdentifier != thatIdentifier && ![thisIdentifier isEqualToString:thatIdentifier]) {
+        return NO;
+    }
+
+    unsigned thisCount = [self numberOfChildren];
+    if (thisCount != [otherBookmark numberOfChildren]) {
+        return NO;
+    }
+
+    unsigned childIndex;
+    for (childIndex = 0; childIndex < thisCount; ++childIndex) {
+        NSArray *theseChildren = [self children];
+        NSArray *thoseChildren = [otherBookmark children];
+        if (![[theseChildren objectAtIndex:childIndex] contentMatches:[thoseChildren objectAtIndex:childIndex]]) {
+            return NO;
+        }
+    }
+
+    return YES;
+}
+
+
 @end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 269817e..a84c9bb 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,10 @@
+2002-10-28  John Sullivan  <sullivan at apple.com>
+
+        * Bookmarks.subproj/WebBookmark.h:
+        * Bookmarks.subproj/WebBookmark.m:
+        (-[WebBookmark contentMatches:]): new method, returns YES if
+	two bookmarks are the same, ignoring group and parent.
+
 2002-10-28  Trey Matteson  <trey at apple.com>
 
 	Finished 2998200 - access to most-recent in submenu of back & forward buttons
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 269817e..a84c9bb 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,10 @@
+2002-10-28  John Sullivan  <sullivan at apple.com>
+
+        * Bookmarks.subproj/WebBookmark.h:
+        * Bookmarks.subproj/WebBookmark.m:
+        (-[WebBookmark contentMatches:]): new method, returns YES if
+	two bookmarks are the same, ignoring group and parent.
+
 2002-10-28  Trey Matteson  <trey at apple.com>
 
 	Finished 2998200 - access to most-recent in submenu of back & forward buttons

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list