[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 07:25:51 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 1dea84d91bcd690c9d1061694221a9dfcbc1c771
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 25 19:47:52 2003 +0000
WebKit:
WebKit part of fix for 3181290 -- need call to reload all bookmarks from disk,
for synching's sake.
I ended up not adding a new call, but making the existing loadBookmarkGroup
work better when called after the initial load. It wasn't doing anything wrong
before; it just wasn't passing along enough information to clients to enable
them to do the right thing.
Reviewed by Trey
* Bookmarks.subproj/WebBookmarkGroup.h:
new extern NSStrings WebBookmarksWillBeReloadedNotification and
WebBookmarksWereReloadedNotification
* Bookmarks.subproj/WebBookmarkGroup.m:
(-[WebBookmarkGroup _sendNotification:forBookmark:children:]):
soften assert so it doesn't fire on the new cases.
(-[WebBookmarkGroup _bookmarksWillBeReloaded]):
send WebBookmarksWillBeReloadedNotification
(-[WebBookmarkGroup _bookmarksWereReloaded]):
send WebBookmarksWereReloadedNotification
(-[WebBookmarkGroup _loadBookmarkGroupGuts]):
bracket the load with the new notification-sending calls
* WebKit.exp:
add the two new extern NSStrings
WebBrowser:
WebBrowser part of fix for 3181290 -- need call to reload all
bookmarks from disk, for synching's sake
Reviewed by Trey
* BookmarksController.m:
(-[BookmarksController _receivedBookmarksWereReloadedNotification:]):
new method; parallel to _receivedBookmarksChangedNotification. Unlike
that method, this one does not trigger a save-bookmars-to-disk. (Also
this one updates the top-level data structures.)
(-[BookmarksController awakeFromNib]):
register for WebBookmarksWereReloadedNotifications from our group.
* BookmarksViewController.m:
(-[BookmarksViewController updateUIForChangeToBookmark:includingChildren:]):
Changed title from ...andChildren:. Used to take array of children, now just
takes a boolean. The array was being converted into a boolean immediately,
and rather than add yet another caller that created an array for the sole
purpose of passing it to this method, I changed the method to take the
boolean and updated all callers.
(-[BookmarksViewController bookmarksChanged:]):
handle reload case by getting top changed bookmark from bookmark group
that is the notification object
(-[BookmarksViewController awakeFromNib]):
register for WebBookmarksWereReloadedNotification from our bookmark group
(-[BookmarksViewController newSourceFolder]):
update for parameter change in updateUIForChangeToBookmark:includingChildren:
(-[BookmarksViewController undoNewBookmark:]):
ditto
(-[BookmarksViewController redoNewBookmark:]):
ditto
(-[BookmarksViewController newContentItemWithTitle:URLString:type:positionIgnoresSelection:]):
ditto
(-[BookmarksViewController changeTitleForBookmark:to:]):
ditto
(-[BookmarksViewController changeAddressForBookmark:to:]):
ditto
* URLCompletionController.m:
(+[URLCompletionController _loadDB]): removed false part of comment
(+[URLCompletionController _registerForNotifications]):
register for WebBookmarksWereReloadedNotification, call _reloadDB
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkGroup.h b/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
index c765a50..cad3766 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
+++ b/WebKit/Bookmarks.subproj/WebBookmarkGroup.h
@@ -14,6 +14,8 @@ extern NSString *WebBookmarksWereAddedNotification;
extern NSString *WebBookmarksWereRemovedNotification;
extern NSString *WebBookmarkWillChangeNotification;
extern NSString *WebBookmarkDidChangeNotification;
+extern NSString *WebBookmarksWillBeReloadedNotification;
+extern NSString *WebBookmarksWereReloadedNotification;
// keys for userInfo for the above notifications.
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
index b5ffc13..d4657d3 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
@@ -18,6 +18,8 @@ NSString *WebBookmarksWereAddedNotification = @"WebBookmarksWereAddedNotificatio
NSString *WebBookmarksWereRemovedNotification = @"WebBookmarksWereRemovedNotification";
NSString *WebBookmarkDidChangeNotification = @"WebBookmarkDidChangeNotification";
NSString *WebBookmarkWillChangeNotification = @"WebBookmarkWillChangeNotification";
+NSString *WebBookmarksWillBeReloadedNotification = @"WebBookmarksWillBeReloadedNotification";
+NSString *WebBookmarksWereReloadedNotification = @"WebBookmarksWereReloadedNotification";
NSString *WebModifiedBookmarkKey = @"WebModifiedBookmarkKey";
NSString *WebBookmarkChildrenKey = @"WebBookmarkChildrenKey";
NSString *TagKey = @"WebBookmarkGroupTag";
@@ -139,7 +141,9 @@ NSString *TagKey = @"WebBookmarkGroupTag";
{
NSDictionary *userInfo;
- ASSERT(bookmark != nil);
+ // Some notifications (e.g. WillBeReloaded/WereReloaded) have no bookmark parameter. But
+ // if there's a kids parameter, there must be a bookmark parameter also.
+ ASSERT(bookmark != nil || kids == nil);
if (_loading) {
return;
@@ -194,6 +198,16 @@ NSString *TagKey = @"WebBookmarkGroupTag";
[self _sendNotification:WebBookmarksWereRemovedNotification forBookmark:bookmark children:kids];
}
+- (void)_bookmarksWillBeReloaded
+{
+ [self _sendNotification:WebBookmarksWillBeReloadedNotification forBookmark:nil children:nil];
+}
+
+- (void)_bookmarksWereReloaded
+{
+ [self _sendNotification:WebBookmarksWereReloadedNotification forBookmark:nil children:nil];
+}
+
- (WebBookmark *)addNewBookmarkToBookmark:(WebBookmark *)parent
withTitle:(NSString *)newTitle
URLString:(NSString *)newURLString
@@ -271,12 +285,16 @@ NSString *TagKey = @"WebBookmarkGroupTag";
_tag = [tagFromFile retain];
}
+ [self _bookmarksWillBeReloaded];
+
_loading = YES;
newTopBookmark = [[WebBookmarkList alloc] initFromDictionaryRepresentation:dictionary withGroup:self];
[self _setTopBookmark:newTopBookmark];
[newTopBookmark release];
_loading = NO;
+ [self _bookmarksWereReloaded];
+
return YES;
}
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 51d5edc..6d8bf68 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,34 @@
+2003-02-25 John Sullivan <sullivan at apple.com>
+
+ WebKit part of fix for 3181290 -- need call to reload all bookmarks from disk,
+ for synching's sake.
+
+ I ended up not adding a new call, but making the existing loadBookmarkGroup
+ work better when called after the initial load. It wasn't doing anything wrong
+ before; it just wasn't passing along enough information to clients to enable
+ them to do the right thing.
+
+ Reviewed by Trey
+
+ * Bookmarks.subproj/WebBookmarkGroup.h:
+ new extern NSStrings WebBookmarksWillBeReloadedNotification and
+ WebBookmarksWereReloadedNotification
+
+ * Bookmarks.subproj/WebBookmarkGroup.m:
+ (-[WebBookmarkGroup _sendNotification:forBookmark:children:]):
+ soften assert so it doesn't fire on the new cases.
+
+ (-[WebBookmarkGroup _bookmarksWillBeReloaded]):
+ send WebBookmarksWillBeReloadedNotification
+ (-[WebBookmarkGroup _bookmarksWereReloaded]):
+ send WebBookmarksWereReloadedNotification
+
+ (-[WebBookmarkGroup _loadBookmarkGroupGuts]):
+ bracket the load with the new notification-sending calls
+
+ * WebKit.exp:
+ add the two new extern NSStrings
+
2003-02-25 Darin Adler <darin at apple.com>
Reviewed by John.
diff --git a/WebKit/WebKit.exp b/WebKit/WebKit.exp
index 0c27833..fd9124f 100644
--- a/WebKit/WebKit.exp
+++ b/WebKit/WebKit.exp
@@ -41,6 +41,8 @@ _WebBookmarkDidChangeNotification
_WebBookmarkWillChangeNotification
_WebBookmarksWereAddedNotification
_WebBookmarksWereRemovedNotification
+_WebBookmarksWereReloadedNotification
+_WebBookmarksWillBeReloadedNotification
_WebElementFrameKey
_WebElementImageKey
_WebElementImageRectKey
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list