[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 05:59:58 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 5bb5e6437f2a8d0d2a291a71dcfbf43336a815c1
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Apr 2 01:03:56 2002 +0000

    	Added method for updating url, title, and/or displayTitle
    	on existing entry.
    
    	* History.subproj/IFWebHistory.h:
    	* History.subproj/IFWebHistory.m:
    	(-[IFWebHistory	updateURL:title:displayTitle:forURL:]):
    	Calls through to IFWebHistoryPrivate.
    
    	* History.subproj/IFWebHistoryPrivate.h:
    	* History.subproj/IFWebHistoryPrivate.m:
    	(-[IFWebHistoryPrivate _entryForURLString:]): Broke this out
    	from containsURL.
    	(-[IFWebHistoryPrivate containsURL:]): Call broken-out method.
    	(-[IFWebHistoryPrivate updateURL:title:displayTitle:forURL:]):
    	Find existing entry (if any), change its attributes.
    
    	* BrowserDocument.m:
    	(-[BrowserDocument displayName]): removed obsolete comment
    	(-[BrowserDocument receivedPageTitle:forDataSource:]):
    	update existing history entry; also use [NSArray makeObjectsPerformSelector]
    	to simplify code.
    
    	* BrowserWindow.m:
    	(-[BrowserWindow updateTitle]): removed; unbeknownst to me, there
    	was already a synchronizeWindowTitleWithDocumentName that did this
    	same thing.
    	(-[BrowserWindow frameLoadCommitted:]):
    	use synchronizeWindowTitleWithDocumentName
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@926 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1312688..63ffd78 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,21 @@
+2002-04-01  John Sullivan  <sullivan at apple.com>
+
+	Added method for updating url, title, and/or displayTitle
+	on existing entry.
+
+	* History.subproj/IFWebHistory.h:
+	* History.subproj/IFWebHistory.m: 
+	(-[IFWebHistory	updateURL:title:displayTitle:forURL:]):
+	Calls through to IFWebHistoryPrivate.
+
+	* History.subproj/IFWebHistoryPrivate.h:
+	* History.subproj/IFWebHistoryPrivate.m: 
+	(-[IFWebHistoryPrivate _entryForURLString:]): Broke this out
+	from containsURL.
+	(-[IFWebHistoryPrivate containsURL:]): Call broken-out method.
+	(-[IFWebHistoryPrivate updateURL:title:displayTitle:forURL:]):
+	Find existing entry (if any), change its attributes.
+
 2002-04-01  Darin Adler  <darin at apple.com>
 
 	* Misc.subproj/IFError.h: Add the failing URL to IFError.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 1312688..63ffd78 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,21 @@
+2002-04-01  John Sullivan  <sullivan at apple.com>
+
+	Added method for updating url, title, and/or displayTitle
+	on existing entry.
+
+	* History.subproj/IFWebHistory.h:
+	* History.subproj/IFWebHistory.m: 
+	(-[IFWebHistory	updateURL:title:displayTitle:forURL:]):
+	Calls through to IFWebHistoryPrivate.
+
+	* History.subproj/IFWebHistoryPrivate.h:
+	* History.subproj/IFWebHistoryPrivate.m: 
+	(-[IFWebHistoryPrivate _entryForURLString:]): Broke this out
+	from containsURL.
+	(-[IFWebHistoryPrivate containsURL:]): Call broken-out method.
+	(-[IFWebHistoryPrivate updateURL:title:displayTitle:forURL:]):
+	Find existing entry (if any), change its attributes.
+
 2002-04-01  Darin Adler  <darin at apple.com>
 
 	* Misc.subproj/IFError.h: Add the failing URL to IFError.
diff --git a/WebKit/History.subproj/IFWebHistory.h b/WebKit/History.subproj/IFWebHistory.h
index 856358b..ca28490 100644
--- a/WebKit/History.subproj/IFWebHistory.h
+++ b/WebKit/History.subproj/IFWebHistory.h
@@ -28,6 +28,12 @@
 - (void)removeEntriesForDay: (NSCalendarDate *)calendarDate;
 - (void)removeAllEntries;
 
+// Update an entry in place. Any nil "new" parameters aren't updated.
+- (void)updateURL:(NSString *)newURLString
+            title:(NSString *)newTitle
+     displayTitle:(NSString *)newDisplayTitle
+           forURL:(NSString *)oldURLString;
+
 // retrieving contents for date-based presentation
 
 // get an array of NSCalendarDate, each one representing a unique day that contains one
diff --git a/WebKit/History.subproj/IFWebHistory.m b/WebKit/History.subproj/IFWebHistory.m
index 45b2826..d677c7c 100644
--- a/WebKit/History.subproj/IFWebHistory.m
+++ b/WebKit/History.subproj/IFWebHistory.m
@@ -67,6 +67,17 @@
     }
 }
 
+- (void)updateURL:(NSString *)newURLString
+            title:(NSString *)newTitle
+     displayTitle:(NSString *)newDisplayTitle
+           forURL:(NSString *)oldURLString
+{
+    if ([_historyPrivate updateURL:newURLString title:newTitle displayTitle:newDisplayTitle forURL:oldURLString] != nil) {
+        // Consider passing changed entry as parameter to notification
+        [self sendEntriesChangedNotification];
+    }
+}
+
 
 #pragma mark DATE-BASED RETRIEVAL
 
diff --git a/WebKit/History.subproj/IFWebHistoryPrivate.h b/WebKit/History.subproj/IFWebHistoryPrivate.h
index a5cd751..309bdd9 100644
--- a/WebKit/History.subproj/IFWebHistoryPrivate.h
+++ b/WebKit/History.subproj/IFWebHistoryPrivate.h
@@ -23,6 +23,10 @@
 - (BOOL)removeEntry: (IFURIEntry *)entry;
 - (BOOL)removeEntriesForDay: (NSCalendarDate *)calendarDate;
 - (BOOL)removeAllEntries;
+- (IFURIEntry *)updateURL:(NSString *)newURLString
+                    title:(NSString *)newTitle
+             displayTitle:(NSString *)newDisplayTitle
+                   forURL:(NSString *)oldURLString;
 
 - (NSArray *)orderedLastVisitedDays;
 - (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)calendarDate;
diff --git a/WebKit/History.subproj/IFWebHistoryPrivate.m b/WebKit/History.subproj/IFWebHistoryPrivate.m
index a145105..65a6997 100644
--- a/WebKit/History.subproj/IFWebHistoryPrivate.m
+++ b/WebKit/History.subproj/IFWebHistoryPrivate.m
@@ -12,7 +12,7 @@
 #import <WebKit/WebKitDebug.h>
 
 @interface IFWebHistoryPrivate (Private)
-- (void)loadHistory;
+-(IFURIEntry *)_entryForURLString:(NSString *)urlString;
 @end
 
 @implementation IFWebHistoryPrivate
@@ -208,6 +208,34 @@
     return YES;
 }
 
+- (IFURIEntry *)updateURL:(NSString *)newURLString
+                    title:(NSString *)newTitle
+             displayTitle:(NSString *)newDisplayTitle
+                   forURL:(NSString *)oldURLString
+{
+    IFURIEntry *entry;
+
+    WEBKIT_ASSERT (oldURLString != nil);
+
+    entry = [self _entryForURLString:oldURLString];
+    if (entry == nil) {
+        return nil;
+    }
+
+    if (newURLString != nil) {
+        [entry setURL:[NSURL URLWithString:newURLString]];
+    }
+
+    if (newTitle != nil) {
+        [entry setTitle:newTitle];
+    }
+
+    if (newDisplayTitle != nil) {
+        [entry setDisplayTitle:newDisplayTitle];
+    }
+
+    return entry;
+}
 
 #pragma mark DATE-BASED RETRIEVAL
 
@@ -243,9 +271,14 @@
 
 #pragma mark URL MATCHING
 
+-(IFURIEntry *)_entryForURLString:(NSString *)urlString
+{
+    return [_urlDictionary objectForKey: urlString];
+}
+
 - (BOOL)containsURL: (NSURL *)url
 {
-    return [_urlDictionary objectForKey: [url absoluteString]] != nil;
+    return [self _entryForURLString:[url absoluteString]] != nil;
 }
 
 #pragma mark ARCHIVING/UNARCHIVING
diff --git a/WebKit/History.subproj/WebHistory.h b/WebKit/History.subproj/WebHistory.h
index 856358b..ca28490 100644
--- a/WebKit/History.subproj/WebHistory.h
+++ b/WebKit/History.subproj/WebHistory.h
@@ -28,6 +28,12 @@
 - (void)removeEntriesForDay: (NSCalendarDate *)calendarDate;
 - (void)removeAllEntries;
 
+// Update an entry in place. Any nil "new" parameters aren't updated.
+- (void)updateURL:(NSString *)newURLString
+            title:(NSString *)newTitle
+     displayTitle:(NSString *)newDisplayTitle
+           forURL:(NSString *)oldURLString;
+
 // retrieving contents for date-based presentation
 
 // get an array of NSCalendarDate, each one representing a unique day that contains one
diff --git a/WebKit/History.subproj/WebHistory.m b/WebKit/History.subproj/WebHistory.m
index 45b2826..d677c7c 100644
--- a/WebKit/History.subproj/WebHistory.m
+++ b/WebKit/History.subproj/WebHistory.m
@@ -67,6 +67,17 @@
     }
 }
 
+- (void)updateURL:(NSString *)newURLString
+            title:(NSString *)newTitle
+     displayTitle:(NSString *)newDisplayTitle
+           forURL:(NSString *)oldURLString
+{
+    if ([_historyPrivate updateURL:newURLString title:newTitle displayTitle:newDisplayTitle forURL:oldURLString] != nil) {
+        // Consider passing changed entry as parameter to notification
+        [self sendEntriesChangedNotification];
+    }
+}
+
 
 #pragma mark DATE-BASED RETRIEVAL
 
diff --git a/WebKit/History.subproj/WebHistoryPrivate.h b/WebKit/History.subproj/WebHistoryPrivate.h
index a5cd751..309bdd9 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.h
+++ b/WebKit/History.subproj/WebHistoryPrivate.h
@@ -23,6 +23,10 @@
 - (BOOL)removeEntry: (IFURIEntry *)entry;
 - (BOOL)removeEntriesForDay: (NSCalendarDate *)calendarDate;
 - (BOOL)removeAllEntries;
+- (IFURIEntry *)updateURL:(NSString *)newURLString
+                    title:(NSString *)newTitle
+             displayTitle:(NSString *)newDisplayTitle
+                   forURL:(NSString *)oldURLString;
 
 - (NSArray *)orderedLastVisitedDays;
 - (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)calendarDate;
diff --git a/WebKit/History.subproj/WebHistoryPrivate.m b/WebKit/History.subproj/WebHistoryPrivate.m
index a145105..65a6997 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.m
+++ b/WebKit/History.subproj/WebHistoryPrivate.m
@@ -12,7 +12,7 @@
 #import <WebKit/WebKitDebug.h>
 
 @interface IFWebHistoryPrivate (Private)
-- (void)loadHistory;
+-(IFURIEntry *)_entryForURLString:(NSString *)urlString;
 @end
 
 @implementation IFWebHistoryPrivate
@@ -208,6 +208,34 @@
     return YES;
 }
 
+- (IFURIEntry *)updateURL:(NSString *)newURLString
+                    title:(NSString *)newTitle
+             displayTitle:(NSString *)newDisplayTitle
+                   forURL:(NSString *)oldURLString
+{
+    IFURIEntry *entry;
+
+    WEBKIT_ASSERT (oldURLString != nil);
+
+    entry = [self _entryForURLString:oldURLString];
+    if (entry == nil) {
+        return nil;
+    }
+
+    if (newURLString != nil) {
+        [entry setURL:[NSURL URLWithString:newURLString]];
+    }
+
+    if (newTitle != nil) {
+        [entry setTitle:newTitle];
+    }
+
+    if (newDisplayTitle != nil) {
+        [entry setDisplayTitle:newDisplayTitle];
+    }
+
+    return entry;
+}
 
 #pragma mark DATE-BASED RETRIEVAL
 
@@ -243,9 +271,14 @@
 
 #pragma mark URL MATCHING
 
+-(IFURIEntry *)_entryForURLString:(NSString *)urlString
+{
+    return [_urlDictionary objectForKey: urlString];
+}
+
 - (BOOL)containsURL: (NSURL *)url
 {
-    return [_urlDictionary objectForKey: [url absoluteString]] != nil;
+    return [self _entryForURLString:[url absoluteString]] != nil;
 }
 
 #pragma mark ARCHIVING/UNARCHIVING

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list