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


The following commit has been merged in the debian/unstable branch:
commit 168bf470cb838d21453d8f8c85c27fd52d0bc94e
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 20 01:14:05 2002 +0000

    	Finished first cut at IFWebHistory implementation. All methods are implemented
    	except the string-matching ones.
    
    	* History.subproj/IFURIEntry.h:
    	* History.subproj/IFURIEntry.m: (-[IFURIEntry initWithURL:title:image:comment:]),
    	(-[IFURIEntry lastVisitedDate]), (-[IFURIEntry setModificationDate:]),
    	(-[IFURIEntry setLastVisitedDate:]):
    	Changed all NSDates to be NSCalendarDates.
    
    	* History.subproj/IFWebHistory.h:
    	* History.subproj/IFWebHistory.m: (-[IFWebHistory init]), (-[IFWebHistory
    	dealloc]), (-[IFWebHistory sendEntriesChangedNotification]), (-[IFWebHistory
    	addEntry:]), (-[IFWebHistory removeEntry:]), (-[IFWebHistory
    	removeEntriesForDay:]), (-[IFWebHistory removeAllEntries]), (-[IFWebHistory
    	orderedLastVisitedDays]), (-[IFWebHistory orderedEntriesLastVisitedOnDay:]),
    	(-[IFWebHistory entriesWithAddressContainingString:]), (-[IFWebHistory
    	entriesWithTitleOrAddressContainingString:]), (-[IFWebHistory containsURL:]):
    	Implemented all IFWebHistory methods by calling through to IFWebHistoryPrivate object.
    	Send a change notification each time the actual data changes. Removed all
    	canned-data mechanisms.
    
    	* History.subproj/IFWebHistoryPrivate.h:
    	* History.subproj/IFWebHistoryPrivate.m: (-[IFWebHistoryPrivate init]),
    	(-[IFWebHistoryPrivate dealloc]), (-[IFWebHistoryPrivate findIndex:forDay:]),
    	(-[IFWebHistoryPrivate insertEntry:atDateIndex:]), (-[IFWebHistoryPrivate
    	removeEntryForURLString:]), (-[IFWebHistoryPrivate addEntry:]),
    	(-[IFWebHistoryPrivate removeEntry:]), (-[IFWebHistoryPrivate
    	removeEntriesForDay:]), (-[IFWebHistoryPrivate removeAllEntries]),
    	(-[IFWebHistoryPrivate orderedLastVisitedDays]), (-[IFWebHistoryPrivate
    	orderedEntriesLastVisitedOnDay:]), (-[IFWebHistoryPrivate
    	entriesWithAddressContainingString:]), (-[IFWebHistoryPrivate
    	entriesWithTitleOrAddressContainingString:]), (-[IFWebHistoryPrivate
    	containsURL:]):
    	Implemented guts of history mechanism using a dictionary for URL lookup and
    	a sorted array of dates with entries and a sorted array of sorted arrays of
    	entries per date.
    
    	* WebKit.pbproj/project.pbxproj: Updated for new files
    
    
        Made History window work.
    
    	* BrowserDocument.h: whitespace changes only
    
    	* BrowserDocument.m:
    	(-[BrowserDocument addHistoryEntryForCurrentPage]): New method.
    	(-[BrowserDocument locationChangeDone:forFrame:]): Call new method.
    	(-[BrowserDocument locationChangeStartedForFrame:initiatedByUserEvent:]):
    	Changed postNotification to use simpler userinfo-free version.
    
    	* GlobalHistory.m:
    	(+[GlobalHistory sharedGlobalHistory]): Register for changed notifications
    	from IFWebHistory
    
    	(-[GlobalHistory outlineView:objectValueForTableColumn:byItem:]): Use "today"
    	for current date; "unknown title" for nil titles.
    	(-[GlobalHistory historyIsEmpty]): New private convenience method.
    	(-[GlobalHistory expandToday]): New method, expands the triangle for today's
    	history entries if the first triangle is for today.
    	(-[GlobalHistory updateButtons]),
    	(-[GlobalHistory validateUserInterfaceItem:]): Use historyIsEmpty
    	(-[GlobalHistory receivedEntriesChangedNotification:]): New method, react to
    	change notification by reloading data and updating buttons.
    	(-[GlobalHistory removeSelectedItems:]),
    	(-[GlobalHistory removeAll:]):
    	Implemented by calling IFWebHistory methods.
    	(-[GlobalHistory showWindow:]): expand today's triangle
    
        * English.lproj/History.nib: Removed "completely fake" from History window title.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@645 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 472cf32..88855d5 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,44 @@
+2002-02-19  John Sullivan  <sullivan at apple.com>
+
+	Finished first cut at IFWebHistory implementation. All methods are implemented
+	except the string-matching ones.
+
+	* History.subproj/IFURIEntry.h:
+	* History.subproj/IFURIEntry.m: (-[IFURIEntry initWithURL:title:image:comment:]),
+	(-[IFURIEntry lastVisitedDate]), (-[IFURIEntry setModificationDate:]),
+	(-[IFURIEntry setLastVisitedDate:]):
+	Changed all NSDates to be NSCalendarDates.
+
+	* History.subproj/IFWebHistory.h:
+	* History.subproj/IFWebHistory.m: (-[IFWebHistory init]), (-[IFWebHistory
+	dealloc]), (-[IFWebHistory sendEntriesChangedNotification]), (-[IFWebHistory
+	addEntry:]), (-[IFWebHistory removeEntry:]), (-[IFWebHistory
+	removeEntriesForDay:]), (-[IFWebHistory removeAllEntries]), (-[IFWebHistory
+	orderedLastVisitedDays]), (-[IFWebHistory orderedEntriesLastVisitedOnDay:]),
+	(-[IFWebHistory entriesWithAddressContainingString:]), (-[IFWebHistory
+	entriesWithTitleOrAddressContainingString:]), (-[IFWebHistory containsURL:]):
+	Implemented all IFWebHistory methods by calling through to IFWebHistoryPrivate object.
+	Send a change notification each time the actual data changes. Removed all
+	canned-data mechanisms.
+
+	* History.subproj/IFWebHistoryPrivate.h:
+	* History.subproj/IFWebHistoryPrivate.m: (-[IFWebHistoryPrivate init]),
+	(-[IFWebHistoryPrivate dealloc]), (-[IFWebHistoryPrivate findIndex:forDay:]),
+	(-[IFWebHistoryPrivate insertEntry:atDateIndex:]), (-[IFWebHistoryPrivate
+	removeEntryForURLString:]), (-[IFWebHistoryPrivate addEntry:]),
+	(-[IFWebHistoryPrivate removeEntry:]), (-[IFWebHistoryPrivate
+	removeEntriesForDay:]), (-[IFWebHistoryPrivate removeAllEntries]),
+	(-[IFWebHistoryPrivate orderedLastVisitedDays]), (-[IFWebHistoryPrivate
+	orderedEntriesLastVisitedOnDay:]), (-[IFWebHistoryPrivate
+	entriesWithAddressContainingString:]), (-[IFWebHistoryPrivate
+	entriesWithTitleOrAddressContainingString:]), (-[IFWebHistoryPrivate
+	containsURL:]):
+	Implemented guts of history mechanism using a dictionary for URL lookup and
+	a sorted array of dates with entries and a sorted array of sorted arrays of 
+	entries per date.
+
+	* WebKit.pbproj/project.pbxproj: Updated for new files
+
 2002-02-18  John Sullivan  <sullivan at apple.com>
 
 	First piece of implementing IFWebHistory. None of the mutators do anything,
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 472cf32..88855d5 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,44 @@
+2002-02-19  John Sullivan  <sullivan at apple.com>
+
+	Finished first cut at IFWebHistory implementation. All methods are implemented
+	except the string-matching ones.
+
+	* History.subproj/IFURIEntry.h:
+	* History.subproj/IFURIEntry.m: (-[IFURIEntry initWithURL:title:image:comment:]),
+	(-[IFURIEntry lastVisitedDate]), (-[IFURIEntry setModificationDate:]),
+	(-[IFURIEntry setLastVisitedDate:]):
+	Changed all NSDates to be NSCalendarDates.
+
+	* History.subproj/IFWebHistory.h:
+	* History.subproj/IFWebHistory.m: (-[IFWebHistory init]), (-[IFWebHistory
+	dealloc]), (-[IFWebHistory sendEntriesChangedNotification]), (-[IFWebHistory
+	addEntry:]), (-[IFWebHistory removeEntry:]), (-[IFWebHistory
+	removeEntriesForDay:]), (-[IFWebHistory removeAllEntries]), (-[IFWebHistory
+	orderedLastVisitedDays]), (-[IFWebHistory orderedEntriesLastVisitedOnDay:]),
+	(-[IFWebHistory entriesWithAddressContainingString:]), (-[IFWebHistory
+	entriesWithTitleOrAddressContainingString:]), (-[IFWebHistory containsURL:]):
+	Implemented all IFWebHistory methods by calling through to IFWebHistoryPrivate object.
+	Send a change notification each time the actual data changes. Removed all
+	canned-data mechanisms.
+
+	* History.subproj/IFWebHistoryPrivate.h:
+	* History.subproj/IFWebHistoryPrivate.m: (-[IFWebHistoryPrivate init]),
+	(-[IFWebHistoryPrivate dealloc]), (-[IFWebHistoryPrivate findIndex:forDay:]),
+	(-[IFWebHistoryPrivate insertEntry:atDateIndex:]), (-[IFWebHistoryPrivate
+	removeEntryForURLString:]), (-[IFWebHistoryPrivate addEntry:]),
+	(-[IFWebHistoryPrivate removeEntry:]), (-[IFWebHistoryPrivate
+	removeEntriesForDay:]), (-[IFWebHistoryPrivate removeAllEntries]),
+	(-[IFWebHistoryPrivate orderedLastVisitedDays]), (-[IFWebHistoryPrivate
+	orderedEntriesLastVisitedOnDay:]), (-[IFWebHistoryPrivate
+	entriesWithAddressContainingString:]), (-[IFWebHistoryPrivate
+	entriesWithTitleOrAddressContainingString:]), (-[IFWebHistoryPrivate
+	containsURL:]):
+	Implemented guts of history mechanism using a dictionary for URL lookup and
+	a sorted array of dates with entries and a sorted array of sorted arrays of 
+	entries per date.
+
+	* WebKit.pbproj/project.pbxproj: Updated for new files
+
 2002-02-18  John Sullivan  <sullivan at apple.com>
 
 	First piece of implementing IFWebHistory. None of the mutators do anything,
diff --git a/WebKit/History.subproj/IFURIEntry.h b/WebKit/History.subproj/IFURIEntry.h
index 2453cf7..8a8ccb1 100644
--- a/WebKit/History.subproj/IFURIEntry.h
+++ b/WebKit/History.subproj/IFURIEntry.h
@@ -17,9 +17,9 @@
     NSString *_title;
     NSImage *_image;
     NSString *_comment;
-    NSDate *_creationDate;
-    NSDate *_modificationDate;
-    NSDate *_lastVisitedDate;
+    NSCalendarDate *_creationDate;
+    NSCalendarDate *_modificationDate;
+    NSCalendarDate *_lastVisitedDate;
 }
 
 -(id)init;
@@ -31,16 +31,16 @@
 -(NSString *)title;
 -(NSImage *)image;
 -(NSString *)comment;
--(NSDate *)creationDate;
--(NSDate *)modificationDate;
--(NSDate *)lastVisitedDate;
+-(NSCalendarDate *)creationDate;
+-(NSCalendarDate *)modificationDate;
+-(NSCalendarDate *)lastVisitedDate;
 
 -(void)setURL:(NSURL *)url;
 -(void)setTitle:(NSString *)title;
 -(void)setImage:(NSImage *)image;
 -(void)setComment:(NSString *)comment;
--(void)setModificationDate:(NSDate *)date;
--(void)setLastVisitedDate:(NSDate *)date;
+-(void)setModificationDate:(NSCalendarDate *)date;
+-(void)setLastVisitedDate:(NSCalendarDate *)date;
 
 -(unsigned)hash;
 -(BOOL)isEqual:(id)anObject;
diff --git a/WebKit/History.subproj/IFURIEntry.m b/WebKit/History.subproj/IFURIEntry.m
index a46993a..e6472b6 100644
--- a/WebKit/History.subproj/IFURIEntry.m
+++ b/WebKit/History.subproj/IFURIEntry.m
@@ -48,9 +48,9 @@ id <WCURIEntry> WCCreateURIEntry(void)
     _title = [title retain];
     _image = [image retain];
     _comment = [comment retain];
-    _creationDate = [[NSDate alloc] init];
-    _modificationDate = [[NSDate alloc] init];
-    _lastVisitedDate = [[NSDate alloc] init];
+    _creationDate = [[NSCalendarDate alloc] init];
+    _modificationDate = [[NSCalendarDate alloc] init];
+    _lastVisitedDate = [[NSCalendarDate alloc] init];
     
     return self;
 }
@@ -75,17 +75,17 @@ id <WCURIEntry> WCCreateURIEntry(void)
     return _comment;
 }
 
--(NSDate *)creationDate;
+-(NSCalendarDate *)creationDate;
 {
     return _creationDate;
 }
 
--(NSDate *)modificationDate;
+-(NSCalendarDate *)modificationDate;
 {
     return _modificationDate;
 }
 
--(NSDate *)lastVisitedDate
+-(NSCalendarDate *)lastVisitedDate
 {
     return _lastVisitedDate;
 }
@@ -122,7 +122,7 @@ id <WCURIEntry> WCCreateURIEntry(void)
     }
 }
 
--(void)setModificationDate:(NSDate *)date
+-(void)setModificationDate:(NSCalendarDate *)date
 {
     if (date != _modificationDate) {
         [_modificationDate release];
@@ -130,7 +130,7 @@ id <WCURIEntry> WCCreateURIEntry(void)
     }
 }
 
--(void)setLastVisitedDate:(NSDate *)date
+-(void)setLastVisitedDate:(NSCalendarDate *)date
 {
     if (date != _lastVisitedDate) {
         [_lastVisitedDate release];
diff --git a/WebKit/History.subproj/IFWebHistory.h b/WebKit/History.subproj/IFWebHistory.h
index a519d69..67fbb14 100644
--- a/WebKit/History.subproj/IFWebHistory.h
+++ b/WebKit/History.subproj/IFWebHistory.h
@@ -9,9 +9,14 @@
 #import <Foundation/Foundation.h>
 #import <WebKit/IFURIEntry.h>
 
+ at class IFWebHistoryPrivate;
+
+// notification sent when history is modified
+#define IFWebHistoryEntriesChangedNotification		@"IFWebHistoryEntriesChangedNotification"
+
 @interface IFWebHistory : NSObject {
 @private
-    id _historyPrivate;
+    IFWebHistoryPrivate *_historyPrivate;
 }
 
 + (IFWebHistory *)sharedWebHistory;
@@ -19,6 +24,7 @@
 // modifying contents
 - (void)addEntry: (IFURIEntry *)entry;
 - (void)removeEntry: (IFURIEntry *)entry;
+- (void)removeEntriesForDay: (NSCalendarDate *)calendarDate;
 - (void)removeAllEntries;
 
 // retrieving contents for date-based presentation
diff --git a/WebKit/History.subproj/IFWebHistory.m b/WebKit/History.subproj/IFWebHistory.m
index 2fbb449..69b2fb2 100644
--- a/WebKit/History.subproj/IFWebHistory.m
+++ b/WebKit/History.subproj/IFWebHistory.m
@@ -7,13 +7,10 @@
 //
 
 #import "IFWebHistory.h"
+#import "IFWebHistoryPrivate.h"
 
 static IFWebHistory *sharedWebHistory = nil;
 
- at interface NSCalendarDate (IFExtensions)
-- (int)daysSinceDate: (NSCalendarDate *)date;
- at end
-
 @implementation IFWebHistory
 
 + (IFWebHistory *)sharedWebHistory
@@ -25,73 +22,55 @@ static IFWebHistory *sharedWebHistory = nil;
     return sharedWebHistory;
 }
 
-- (IFURIEntry *)createTestEntryWithURLString: (NSString *)urlString
-                                       title: (NSString *)title
-                                        date: (NSDate *)date
+- (id)init
 {
-    IFURIEntry *entry = [[[IFURIEntry alloc] initWithURL: [NSURL URLWithString: urlString]
-                                                  title: title] autorelease];
-    [entry setLastVisitedDate: date];
-    return entry;
-    
-}
-
-- (NSArray *)testDataDates
-{
-    static NSArray *testDataDates;
-    
-    if (testDataDates == nil) {
-        NSCalendarDate *today, *yesterday;
-        
-        today = [NSCalendarDate calendarDate];
-        yesterday = [today dateByAddingYears:0 months:0 days:-1 hours:0 minutes:0 seconds:0];
-
-        testDataDates = [NSArray arrayWithObjects: today, yesterday, nil];
-        [testDataDates retain];
+    if ((self = [super init]) != nil) {
+        _historyPrivate = [[IFWebHistoryPrivate alloc] init];
     }
 
-    return testDataDates;
+    return self;
 }
 
-- (NSArray *)testData
+- (void)dealloc
 {
-    static NSArray *testData = nil;
-
-    if (testData == nil) {
-        NSCalendarDate *date1 = [[self testDataDates] objectAtIndex: 0];
-        NSCalendarDate *date2 = [[self testDataDates] objectAtIndex: 1];
-
-        testData = [NSArray arrayWithObjects:
-            [NSArray arrayWithObjects:
-                [self createTestEntryWithURLString: @"http://www.apple.com" title: @"Apple" date: date1],
-                [self createTestEntryWithURLString: @"http://www.google.com" title: @"Google" date: date1],
-                nil],
-            [NSArray arrayWithObjects:
-                [self createTestEntryWithURLString: @"http://www.amazon.com" title: @"Amazon" date: date2],
-                [self createTestEntryWithURLString: @"http://www.salon.com" title: @"Salon" date: date2],
-                nil],
-            nil];
-        [testData retain];
-    }
-
-    return testData;
+    [_historyPrivate release];
+    [super dealloc];
 }
 
 #pragma mark MODIFYING CONTENTS
 
+- (void)sendEntriesChangedNotification
+{
+    [[NSNotificationCenter defaultCenter]
+        postNotificationName: IFWebHistoryEntriesChangedNotification
+                      object: self];
+}
+
 - (void)addEntry: (IFURIEntry *)entry
 {
-    //FIXME: not yet implemented
+    [_historyPrivate addEntry: entry];
+    [self sendEntriesChangedNotification];
 }
 
 - (void)removeEntry: (IFURIEntry *)entry
 {
-    //FIXME: not yet implemented
+    if ([_historyPrivate removeEntry: entry]) {
+        [self sendEntriesChangedNotification];
+    }
+}
+
+- (void)removeEntriesForDay: (NSCalendarDate *)calendarDate
+{
+    if ([_historyPrivate removeEntriesForDay: calendarDate]) {
+        [self sendEntriesChangedNotification];
+    }
 }
 
 - (void)removeAllEntries
 {
-    //FIXME: not yet implemented
+    if ([_historyPrivate removeAllEntries]) {
+        [self sendEntriesChangedNotification];
+    }
 }
 
 
@@ -99,65 +78,31 @@ static IFWebHistory *sharedWebHistory = nil;
 
 - (NSArray *)orderedLastVisitedDays
 {
-    //FIXME: not yet implemented
-    return [self testDataDates];
+    return [_historyPrivate orderedLastVisitedDays];
 }
 
 - (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)date
 {
-    //FIXME: not yet implemented
-    int index, count;
-    NSArray *dataDates;
-
-    dataDates = [self testDataDates];
-    count = [dataDates count];
-    for (index = 0; index < count; ++index) {
-        if ([date daysSinceDate: [dataDates objectAtIndex: index]] == 0) {
-            return [[self testData] objectAtIndex: index];
-        }
-    }
-    
-    return nil;
+    return [_historyPrivate orderedEntriesLastVisitedOnDay: date];
 }
 
 #pragma mark STRING-BASED RETRIEVAL
 
 - (NSArray *)entriesWithAddressContainingString: (NSString *)string
 {
-    // FIXME: not yet implemented
-    return nil;
+    return [_historyPrivate entriesWithAddressContainingString: string];
 }
 
 - (NSArray *)entriesWithTitleOrAddressContainingString: (NSString *)string
 {
-    // FIXME: not yet implemented
-    return nil;
+    return [_historyPrivate entriesWithTitleOrAddressContainingString: string];
 }
 
 #pragma mark URL MATCHING
 
 - (BOOL)containsURL: (NSURL *)url
 {
-    // FIXME: not yet implemented
-    return NO;
-}
-
- at end
-
- at implementation NSCalendarDate (IFExtensions)
-
-- (int)daysSinceDate: (NSCalendarDate *)date
-{
-    int deltaDays;
-
-    if (self == date) {
-        deltaDays = 0;
-    } else {
-        [self years:NULL months:NULL days:&deltaDays
-            hours:NULL minutes:NULL seconds:NULL sinceDate: date];
-    }
-
-    return deltaDays;
+    return [_historyPrivate containsURL: url];
 }
 
 @end
diff --git a/WebKit/History.subproj/IFWebHistoryPrivate.h b/WebKit/History.subproj/IFWebHistoryPrivate.h
new file mode 100644
index 0000000..e618084
--- /dev/null
+++ b/WebKit/History.subproj/IFWebHistoryPrivate.h
@@ -0,0 +1,31 @@
+//
+//  IFWebHistoryPrivate.h
+//  WebKit
+//
+//  Created by John Sullivan on Tue Feb 19 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <WebKit/IFURIEntry.h>
+
+ at interface IFWebHistoryPrivate : NSObject {
+ at private
+    NSMutableDictionary *_urlDictionary;
+    NSMutableArray *_datesWithEntries;
+    NSMutableArray *_entriesByDate;
+}
+
+- (void)addEntry: (IFURIEntry *)entry;
+- (BOOL)removeEntry: (IFURIEntry *)entry;
+- (BOOL)removeEntriesForDay: (NSCalendarDate *)calendarDate;
+- (BOOL)removeAllEntries;
+
+- (NSArray *)orderedLastVisitedDays;
+- (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)calendarDate;
+- (NSArray *)entriesWithAddressContainingString: (NSString *)string;
+- (NSArray *)entriesWithTitleOrAddressContainingString: (NSString *)string;
+- (BOOL)containsURL: (NSURL *)url;
+
+
+ at end
diff --git a/WebKit/History.subproj/IFWebHistoryPrivate.m b/WebKit/History.subproj/IFWebHistoryPrivate.m
new file mode 100644
index 0000000..6d2de6a
--- /dev/null
+++ b/WebKit/History.subproj/IFWebHistoryPrivate.m
@@ -0,0 +1,231 @@
+//
+//  IFWebHistoryPrivate.m
+//  WebKit
+//
+//  Created by John Sullivan on Tue Feb 19 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import "IFWebHistoryPrivate.h"
+
+#import <WebFoundation/IFNSCalendarDateExtensions.h>
+#import <WebKit/WebKitDebug.h>
+
+ at implementation IFWebHistoryPrivate
+
+#pragma mark OBJECT FRAMEWORK
+
+- (id)init
+{
+    if ((self = [super init]) != nil) {
+        _urlDictionary = [[NSMutableDictionary alloc] init];
+        _datesWithEntries = [[NSMutableArray alloc] init];
+        _entriesByDate = [[NSMutableArray alloc] init];
+    }
+    
+    return self;
+}
+
+- (void)dealloc
+{
+    [_urlDictionary release];
+    [_datesWithEntries release];
+    [_entriesByDate release];
+    
+    [super dealloc];
+}
+
+#pragma mark MODIFYING CONTENTS
+
+// Returns whether the day is already in the list of days,
+// and fills in *index with the found or proposed index.
+- (BOOL)findIndex: (int *)index forDay: (NSCalendarDate *)date
+{
+    int count;
+
+    WEBKIT_ASSERT_VALID_ARG (index, index != nil);
+
+    //FIXME: just does linear search through days; inefficient if many days
+    count = [_datesWithEntries count];
+    for (*index = 0; *index < count; ++*index) {
+        int deltaDays = [date daysSinceDate: [_datesWithEntries objectAtIndex: *index]];
+        if (deltaDays == 0) {
+            return YES;
+        }
+        if (deltaDays > 0) {
+            return NO;
+        }
+    }
+
+    return NO;
+}
+
+- (void)insertEntry: (IFURIEntry *)entry atDateIndex: (int)dateIndex
+{
+    int index, count;
+    NSMutableArray *entriesForDate;
+    NSCalendarDate *entryDate;
+
+    WEBKIT_ASSERT_VALID_ARG (entry, entry != nil);
+    WEBKIT_ASSERT_VALID_ARG (dateIndex, dateIndex >= 0 && (uint)dateIndex < [_entriesByDate count]);
+
+    //FIXME: just does linear search through entries; inefficient if many entries for this date
+    entryDate = [entry lastVisitedDate];
+    entriesForDate = [_entriesByDate objectAtIndex: dateIndex];
+    count = [entriesForDate count];
+    for (index = 0; index < count; ++index) {
+        if ([entryDate compare: [[entriesForDate objectAtIndex: index] lastVisitedDate]] != NSOrderedAscending) {
+            break;
+        }
+    }
+
+    [entriesForDate insertObject: entry atIndex: index];
+}
+
+- (BOOL)removeEntryForURLString: (NSString *)urlString
+{
+    IFURIEntry *entry;
+    int dateIndex;
+
+    entry = [_urlDictionary objectForKey: urlString];
+    if (entry == nil) {
+        return NO;
+    }
+
+    [_urlDictionary removeObjectForKey: urlString];
+
+    if ([self findIndex: &dateIndex forDay: [entry lastVisitedDate]]) {
+        NSMutableArray *entriesForDate = [_entriesByDate objectAtIndex: dateIndex];
+        [entriesForDate removeObject: entry];
+
+        // remove this date entirely if there are no other entries on it
+        if ([entriesForDate count] == 0) {
+            [_entriesByDate removeObjectAtIndex: dateIndex];
+            [_datesWithEntries removeObjectAtIndex: dateIndex];
+        }
+    } else {
+        NSLog(@"'%@' was in url dictionary but its date %@ was not in date index",
+              [entry url], [entry lastVisitedDate]);
+    }
+
+    return YES;
+}
+
+
+- (void)addEntry: (IFURIEntry *)entry
+{
+    int dateIndex;
+    NSString *urlString;
+
+    WEBKIT_ASSERT_VALID_ARG (entry, [entry lastVisitedDate] != nil);
+
+    urlString = [[entry url] absoluteString];
+    [self removeEntryForURLString: urlString];
+
+    if ([self findIndex: &dateIndex forDay: [entry lastVisitedDate]]) {
+        // other entries already exist for this date
+        [self insertEntry: entry atDateIndex: dateIndex];
+    } else {
+        // no other entries exist for this date
+        [_datesWithEntries insertObject: [entry lastVisitedDate] atIndex: dateIndex];
+        [_entriesByDate insertObject: [[NSMutableArray alloc] initWithObjects: entry, nil] atIndex: dateIndex];
+    }
+
+    [_urlDictionary setObject: entry forKey: urlString];
+}
+
+- (BOOL)removeEntry: (IFURIEntry *)entry
+{
+    IFURIEntry *matchingEntry;
+    NSString *urlString;
+
+    urlString = [[entry url] absoluteString];
+
+    // If this exact object isn't stored, then make no change.
+    // FIXME: Is this the right behavior if this entry isn't present, but another entry for the same URL is?
+    // Maybe need to change the API to make something like removeEntryForURLString public instead.
+    matchingEntry = [_urlDictionary objectForKey: urlString];
+    if (matchingEntry != entry) {
+        return NO;
+    }
+
+    [self removeEntryForURLString: urlString];
+
+    return YES;
+}
+
+- (BOOL)removeEntriesForDay: (NSCalendarDate *)calendarDate
+{
+    int index;
+    NSEnumerator *entriesForDay;
+    IFURIEntry *entry;
+
+    if (![self findIndex: &index forDay: calendarDate]) {
+        return NO;
+    }
+
+    entriesForDay = [[_entriesByDate objectAtIndex: index] objectEnumerator];
+    while ((entry = [entriesForDay nextObject]) != nil) {
+        [_urlDictionary removeObjectForKey: [[entry url] absoluteString]];
+    }
+
+    [_datesWithEntries removeObjectAtIndex: index];
+    [_entriesByDate removeObjectAtIndex: index];
+
+    return YES;
+}
+
+- (BOOL)removeAllEntries
+{
+    if ([_urlDictionary count] == 0) {
+        return NO;
+    }
+
+    [_entriesByDate removeAllObjects];
+    [_datesWithEntries removeAllObjects];
+    [_urlDictionary removeAllObjects];
+
+    return YES;
+}
+
+
+#pragma mark DATE-BASED RETRIEVAL
+
+- (NSArray *)orderedLastVisitedDays
+{
+    return _datesWithEntries;
+}
+
+- (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)date
+{
+    int index;
+
+    if ([self findIndex: &index forDay: date]) {
+        return [_entriesByDate objectAtIndex: index];
+    }
+
+    return nil;
+}
+
+#pragma mark STRING-BASED RETRIEVAL
+
+- (NSArray *)entriesWithAddressContainingString: (NSString *)string
+{
+    // FIXME: not yet implemented
+    return nil;
+}
+
+- (NSArray *)entriesWithTitleOrAddressContainingString: (NSString *)string
+{
+    // FIXME: not yet implemented
+    return nil;
+}
+
+#pragma mark URL MATCHING
+
+- (BOOL)containsURL: (NSURL *)url
+{
+    return [_urlDictionary objectForKey: [url absoluteString]] != nil;
+}
+
+ at end
diff --git a/WebKit/History.subproj/WebHistory.h b/WebKit/History.subproj/WebHistory.h
index a519d69..67fbb14 100644
--- a/WebKit/History.subproj/WebHistory.h
+++ b/WebKit/History.subproj/WebHistory.h
@@ -9,9 +9,14 @@
 #import <Foundation/Foundation.h>
 #import <WebKit/IFURIEntry.h>
 
+ at class IFWebHistoryPrivate;
+
+// notification sent when history is modified
+#define IFWebHistoryEntriesChangedNotification		@"IFWebHistoryEntriesChangedNotification"
+
 @interface IFWebHistory : NSObject {
 @private
-    id _historyPrivate;
+    IFWebHistoryPrivate *_historyPrivate;
 }
 
 + (IFWebHistory *)sharedWebHistory;
@@ -19,6 +24,7 @@
 // modifying contents
 - (void)addEntry: (IFURIEntry *)entry;
 - (void)removeEntry: (IFURIEntry *)entry;
+- (void)removeEntriesForDay: (NSCalendarDate *)calendarDate;
 - (void)removeAllEntries;
 
 // retrieving contents for date-based presentation
diff --git a/WebKit/History.subproj/WebHistory.m b/WebKit/History.subproj/WebHistory.m
index 2fbb449..69b2fb2 100644
--- a/WebKit/History.subproj/WebHistory.m
+++ b/WebKit/History.subproj/WebHistory.m
@@ -7,13 +7,10 @@
 //
 
 #import "IFWebHistory.h"
+#import "IFWebHistoryPrivate.h"
 
 static IFWebHistory *sharedWebHistory = nil;
 
- at interface NSCalendarDate (IFExtensions)
-- (int)daysSinceDate: (NSCalendarDate *)date;
- at end
-
 @implementation IFWebHistory
 
 + (IFWebHistory *)sharedWebHistory
@@ -25,73 +22,55 @@ static IFWebHistory *sharedWebHistory = nil;
     return sharedWebHistory;
 }
 
-- (IFURIEntry *)createTestEntryWithURLString: (NSString *)urlString
-                                       title: (NSString *)title
-                                        date: (NSDate *)date
+- (id)init
 {
-    IFURIEntry *entry = [[[IFURIEntry alloc] initWithURL: [NSURL URLWithString: urlString]
-                                                  title: title] autorelease];
-    [entry setLastVisitedDate: date];
-    return entry;
-    
-}
-
-- (NSArray *)testDataDates
-{
-    static NSArray *testDataDates;
-    
-    if (testDataDates == nil) {
-        NSCalendarDate *today, *yesterday;
-        
-        today = [NSCalendarDate calendarDate];
-        yesterday = [today dateByAddingYears:0 months:0 days:-1 hours:0 minutes:0 seconds:0];
-
-        testDataDates = [NSArray arrayWithObjects: today, yesterday, nil];
-        [testDataDates retain];
+    if ((self = [super init]) != nil) {
+        _historyPrivate = [[IFWebHistoryPrivate alloc] init];
     }
 
-    return testDataDates;
+    return self;
 }
 
-- (NSArray *)testData
+- (void)dealloc
 {
-    static NSArray *testData = nil;
-
-    if (testData == nil) {
-        NSCalendarDate *date1 = [[self testDataDates] objectAtIndex: 0];
-        NSCalendarDate *date2 = [[self testDataDates] objectAtIndex: 1];
-
-        testData = [NSArray arrayWithObjects:
-            [NSArray arrayWithObjects:
-                [self createTestEntryWithURLString: @"http://www.apple.com" title: @"Apple" date: date1],
-                [self createTestEntryWithURLString: @"http://www.google.com" title: @"Google" date: date1],
-                nil],
-            [NSArray arrayWithObjects:
-                [self createTestEntryWithURLString: @"http://www.amazon.com" title: @"Amazon" date: date2],
-                [self createTestEntryWithURLString: @"http://www.salon.com" title: @"Salon" date: date2],
-                nil],
-            nil];
-        [testData retain];
-    }
-
-    return testData;
+    [_historyPrivate release];
+    [super dealloc];
 }
 
 #pragma mark MODIFYING CONTENTS
 
+- (void)sendEntriesChangedNotification
+{
+    [[NSNotificationCenter defaultCenter]
+        postNotificationName: IFWebHistoryEntriesChangedNotification
+                      object: self];
+}
+
 - (void)addEntry: (IFURIEntry *)entry
 {
-    //FIXME: not yet implemented
+    [_historyPrivate addEntry: entry];
+    [self sendEntriesChangedNotification];
 }
 
 - (void)removeEntry: (IFURIEntry *)entry
 {
-    //FIXME: not yet implemented
+    if ([_historyPrivate removeEntry: entry]) {
+        [self sendEntriesChangedNotification];
+    }
+}
+
+- (void)removeEntriesForDay: (NSCalendarDate *)calendarDate
+{
+    if ([_historyPrivate removeEntriesForDay: calendarDate]) {
+        [self sendEntriesChangedNotification];
+    }
 }
 
 - (void)removeAllEntries
 {
-    //FIXME: not yet implemented
+    if ([_historyPrivate removeAllEntries]) {
+        [self sendEntriesChangedNotification];
+    }
 }
 
 
@@ -99,65 +78,31 @@ static IFWebHistory *sharedWebHistory = nil;
 
 - (NSArray *)orderedLastVisitedDays
 {
-    //FIXME: not yet implemented
-    return [self testDataDates];
+    return [_historyPrivate orderedLastVisitedDays];
 }
 
 - (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)date
 {
-    //FIXME: not yet implemented
-    int index, count;
-    NSArray *dataDates;
-
-    dataDates = [self testDataDates];
-    count = [dataDates count];
-    for (index = 0; index < count; ++index) {
-        if ([date daysSinceDate: [dataDates objectAtIndex: index]] == 0) {
-            return [[self testData] objectAtIndex: index];
-        }
-    }
-    
-    return nil;
+    return [_historyPrivate orderedEntriesLastVisitedOnDay: date];
 }
 
 #pragma mark STRING-BASED RETRIEVAL
 
 - (NSArray *)entriesWithAddressContainingString: (NSString *)string
 {
-    // FIXME: not yet implemented
-    return nil;
+    return [_historyPrivate entriesWithAddressContainingString: string];
 }
 
 - (NSArray *)entriesWithTitleOrAddressContainingString: (NSString *)string
 {
-    // FIXME: not yet implemented
-    return nil;
+    return [_historyPrivate entriesWithTitleOrAddressContainingString: string];
 }
 
 #pragma mark URL MATCHING
 
 - (BOOL)containsURL: (NSURL *)url
 {
-    // FIXME: not yet implemented
-    return NO;
-}
-
- at end
-
- at implementation NSCalendarDate (IFExtensions)
-
-- (int)daysSinceDate: (NSCalendarDate *)date
-{
-    int deltaDays;
-
-    if (self == date) {
-        deltaDays = 0;
-    } else {
-        [self years:NULL months:NULL days:&deltaDays
-            hours:NULL minutes:NULL seconds:NULL sinceDate: date];
-    }
-
-    return deltaDays;
+    return [_historyPrivate containsURL: url];
 }
 
 @end
diff --git a/WebKit/History.subproj/WebHistoryItem.h b/WebKit/History.subproj/WebHistoryItem.h
index 2453cf7..8a8ccb1 100644
--- a/WebKit/History.subproj/WebHistoryItem.h
+++ b/WebKit/History.subproj/WebHistoryItem.h
@@ -17,9 +17,9 @@
     NSString *_title;
     NSImage *_image;
     NSString *_comment;
-    NSDate *_creationDate;
-    NSDate *_modificationDate;
-    NSDate *_lastVisitedDate;
+    NSCalendarDate *_creationDate;
+    NSCalendarDate *_modificationDate;
+    NSCalendarDate *_lastVisitedDate;
 }
 
 -(id)init;
@@ -31,16 +31,16 @@
 -(NSString *)title;
 -(NSImage *)image;
 -(NSString *)comment;
--(NSDate *)creationDate;
--(NSDate *)modificationDate;
--(NSDate *)lastVisitedDate;
+-(NSCalendarDate *)creationDate;
+-(NSCalendarDate *)modificationDate;
+-(NSCalendarDate *)lastVisitedDate;
 
 -(void)setURL:(NSURL *)url;
 -(void)setTitle:(NSString *)title;
 -(void)setImage:(NSImage *)image;
 -(void)setComment:(NSString *)comment;
--(void)setModificationDate:(NSDate *)date;
--(void)setLastVisitedDate:(NSDate *)date;
+-(void)setModificationDate:(NSCalendarDate *)date;
+-(void)setLastVisitedDate:(NSCalendarDate *)date;
 
 -(unsigned)hash;
 -(BOOL)isEqual:(id)anObject;
diff --git a/WebKit/History.subproj/WebHistoryItem.m b/WebKit/History.subproj/WebHistoryItem.m
index a46993a..e6472b6 100644
--- a/WebKit/History.subproj/WebHistoryItem.m
+++ b/WebKit/History.subproj/WebHistoryItem.m
@@ -48,9 +48,9 @@ id <WCURIEntry> WCCreateURIEntry(void)
     _title = [title retain];
     _image = [image retain];
     _comment = [comment retain];
-    _creationDate = [[NSDate alloc] init];
-    _modificationDate = [[NSDate alloc] init];
-    _lastVisitedDate = [[NSDate alloc] init];
+    _creationDate = [[NSCalendarDate alloc] init];
+    _modificationDate = [[NSCalendarDate alloc] init];
+    _lastVisitedDate = [[NSCalendarDate alloc] init];
     
     return self;
 }
@@ -75,17 +75,17 @@ id <WCURIEntry> WCCreateURIEntry(void)
     return _comment;
 }
 
--(NSDate *)creationDate;
+-(NSCalendarDate *)creationDate;
 {
     return _creationDate;
 }
 
--(NSDate *)modificationDate;
+-(NSCalendarDate *)modificationDate;
 {
     return _modificationDate;
 }
 
--(NSDate *)lastVisitedDate
+-(NSCalendarDate *)lastVisitedDate
 {
     return _lastVisitedDate;
 }
@@ -122,7 +122,7 @@ id <WCURIEntry> WCCreateURIEntry(void)
     }
 }
 
--(void)setModificationDate:(NSDate *)date
+-(void)setModificationDate:(NSCalendarDate *)date
 {
     if (date != _modificationDate) {
         [_modificationDate release];
@@ -130,7 +130,7 @@ id <WCURIEntry> WCCreateURIEntry(void)
     }
 }
 
--(void)setLastVisitedDate:(NSDate *)date
+-(void)setLastVisitedDate:(NSCalendarDate *)date
 {
     if (date != _lastVisitedDate) {
         [_lastVisitedDate release];
diff --git a/WebKit/History.subproj/WebHistoryPrivate.h b/WebKit/History.subproj/WebHistoryPrivate.h
new file mode 100644
index 0000000..e618084
--- /dev/null
+++ b/WebKit/History.subproj/WebHistoryPrivate.h
@@ -0,0 +1,31 @@
+//
+//  IFWebHistoryPrivate.h
+//  WebKit
+//
+//  Created by John Sullivan on Tue Feb 19 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <WebKit/IFURIEntry.h>
+
+ at interface IFWebHistoryPrivate : NSObject {
+ at private
+    NSMutableDictionary *_urlDictionary;
+    NSMutableArray *_datesWithEntries;
+    NSMutableArray *_entriesByDate;
+}
+
+- (void)addEntry: (IFURIEntry *)entry;
+- (BOOL)removeEntry: (IFURIEntry *)entry;
+- (BOOL)removeEntriesForDay: (NSCalendarDate *)calendarDate;
+- (BOOL)removeAllEntries;
+
+- (NSArray *)orderedLastVisitedDays;
+- (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)calendarDate;
+- (NSArray *)entriesWithAddressContainingString: (NSString *)string;
+- (NSArray *)entriesWithTitleOrAddressContainingString: (NSString *)string;
+- (BOOL)containsURL: (NSURL *)url;
+
+
+ at end
diff --git a/WebKit/History.subproj/WebHistoryPrivate.m b/WebKit/History.subproj/WebHistoryPrivate.m
new file mode 100644
index 0000000..6d2de6a
--- /dev/null
+++ b/WebKit/History.subproj/WebHistoryPrivate.m
@@ -0,0 +1,231 @@
+//
+//  IFWebHistoryPrivate.m
+//  WebKit
+//
+//  Created by John Sullivan on Tue Feb 19 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import "IFWebHistoryPrivate.h"
+
+#import <WebFoundation/IFNSCalendarDateExtensions.h>
+#import <WebKit/WebKitDebug.h>
+
+ at implementation IFWebHistoryPrivate
+
+#pragma mark OBJECT FRAMEWORK
+
+- (id)init
+{
+    if ((self = [super init]) != nil) {
+        _urlDictionary = [[NSMutableDictionary alloc] init];
+        _datesWithEntries = [[NSMutableArray alloc] init];
+        _entriesByDate = [[NSMutableArray alloc] init];
+    }
+    
+    return self;
+}
+
+- (void)dealloc
+{
+    [_urlDictionary release];
+    [_datesWithEntries release];
+    [_entriesByDate release];
+    
+    [super dealloc];
+}
+
+#pragma mark MODIFYING CONTENTS
+
+// Returns whether the day is already in the list of days,
+// and fills in *index with the found or proposed index.
+- (BOOL)findIndex: (int *)index forDay: (NSCalendarDate *)date
+{
+    int count;
+
+    WEBKIT_ASSERT_VALID_ARG (index, index != nil);
+
+    //FIXME: just does linear search through days; inefficient if many days
+    count = [_datesWithEntries count];
+    for (*index = 0; *index < count; ++*index) {
+        int deltaDays = [date daysSinceDate: [_datesWithEntries objectAtIndex: *index]];
+        if (deltaDays == 0) {
+            return YES;
+        }
+        if (deltaDays > 0) {
+            return NO;
+        }
+    }
+
+    return NO;
+}
+
+- (void)insertEntry: (IFURIEntry *)entry atDateIndex: (int)dateIndex
+{
+    int index, count;
+    NSMutableArray *entriesForDate;
+    NSCalendarDate *entryDate;
+
+    WEBKIT_ASSERT_VALID_ARG (entry, entry != nil);
+    WEBKIT_ASSERT_VALID_ARG (dateIndex, dateIndex >= 0 && (uint)dateIndex < [_entriesByDate count]);
+
+    //FIXME: just does linear search through entries; inefficient if many entries for this date
+    entryDate = [entry lastVisitedDate];
+    entriesForDate = [_entriesByDate objectAtIndex: dateIndex];
+    count = [entriesForDate count];
+    for (index = 0; index < count; ++index) {
+        if ([entryDate compare: [[entriesForDate objectAtIndex: index] lastVisitedDate]] != NSOrderedAscending) {
+            break;
+        }
+    }
+
+    [entriesForDate insertObject: entry atIndex: index];
+}
+
+- (BOOL)removeEntryForURLString: (NSString *)urlString
+{
+    IFURIEntry *entry;
+    int dateIndex;
+
+    entry = [_urlDictionary objectForKey: urlString];
+    if (entry == nil) {
+        return NO;
+    }
+
+    [_urlDictionary removeObjectForKey: urlString];
+
+    if ([self findIndex: &dateIndex forDay: [entry lastVisitedDate]]) {
+        NSMutableArray *entriesForDate = [_entriesByDate objectAtIndex: dateIndex];
+        [entriesForDate removeObject: entry];
+
+        // remove this date entirely if there are no other entries on it
+        if ([entriesForDate count] == 0) {
+            [_entriesByDate removeObjectAtIndex: dateIndex];
+            [_datesWithEntries removeObjectAtIndex: dateIndex];
+        }
+    } else {
+        NSLog(@"'%@' was in url dictionary but its date %@ was not in date index",
+              [entry url], [entry lastVisitedDate]);
+    }
+
+    return YES;
+}
+
+
+- (void)addEntry: (IFURIEntry *)entry
+{
+    int dateIndex;
+    NSString *urlString;
+
+    WEBKIT_ASSERT_VALID_ARG (entry, [entry lastVisitedDate] != nil);
+
+    urlString = [[entry url] absoluteString];
+    [self removeEntryForURLString: urlString];
+
+    if ([self findIndex: &dateIndex forDay: [entry lastVisitedDate]]) {
+        // other entries already exist for this date
+        [self insertEntry: entry atDateIndex: dateIndex];
+    } else {
+        // no other entries exist for this date
+        [_datesWithEntries insertObject: [entry lastVisitedDate] atIndex: dateIndex];
+        [_entriesByDate insertObject: [[NSMutableArray alloc] initWithObjects: entry, nil] atIndex: dateIndex];
+    }
+
+    [_urlDictionary setObject: entry forKey: urlString];
+}
+
+- (BOOL)removeEntry: (IFURIEntry *)entry
+{
+    IFURIEntry *matchingEntry;
+    NSString *urlString;
+
+    urlString = [[entry url] absoluteString];
+
+    // If this exact object isn't stored, then make no change.
+    // FIXME: Is this the right behavior if this entry isn't present, but another entry for the same URL is?
+    // Maybe need to change the API to make something like removeEntryForURLString public instead.
+    matchingEntry = [_urlDictionary objectForKey: urlString];
+    if (matchingEntry != entry) {
+        return NO;
+    }
+
+    [self removeEntryForURLString: urlString];
+
+    return YES;
+}
+
+- (BOOL)removeEntriesForDay: (NSCalendarDate *)calendarDate
+{
+    int index;
+    NSEnumerator *entriesForDay;
+    IFURIEntry *entry;
+
+    if (![self findIndex: &index forDay: calendarDate]) {
+        return NO;
+    }
+
+    entriesForDay = [[_entriesByDate objectAtIndex: index] objectEnumerator];
+    while ((entry = [entriesForDay nextObject]) != nil) {
+        [_urlDictionary removeObjectForKey: [[entry url] absoluteString]];
+    }
+
+    [_datesWithEntries removeObjectAtIndex: index];
+    [_entriesByDate removeObjectAtIndex: index];
+
+    return YES;
+}
+
+- (BOOL)removeAllEntries
+{
+    if ([_urlDictionary count] == 0) {
+        return NO;
+    }
+
+    [_entriesByDate removeAllObjects];
+    [_datesWithEntries removeAllObjects];
+    [_urlDictionary removeAllObjects];
+
+    return YES;
+}
+
+
+#pragma mark DATE-BASED RETRIEVAL
+
+- (NSArray *)orderedLastVisitedDays
+{
+    return _datesWithEntries;
+}
+
+- (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)date
+{
+    int index;
+
+    if ([self findIndex: &index forDay: date]) {
+        return [_entriesByDate objectAtIndex: index];
+    }
+
+    return nil;
+}
+
+#pragma mark STRING-BASED RETRIEVAL
+
+- (NSArray *)entriesWithAddressContainingString: (NSString *)string
+{
+    // FIXME: not yet implemented
+    return nil;
+}
+
+- (NSArray *)entriesWithTitleOrAddressContainingString: (NSString *)string
+{
+    // FIXME: not yet implemented
+    return nil;
+}
+
+#pragma mark URL MATCHING
+
+- (BOOL)containsURL: (NSURL *)url
+{
+    return [_urlDictionary objectForKey: [url absoluteString]] != nil;
+}
+
+ at end
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 6d40e2f..c06fb94 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -193,6 +193,7 @@
 				F5EBC45702134BC301CA1520,
 				F5EBC45802134BC301CA1520,
 				9CF0E24B021361B10ECA16EA,
+				F5B92B840223191D01C1A525,
 			);
 			isa = PBXHeadersBuildPhase;
 		};
@@ -225,6 +226,7 @@
 				9CF0E24C021361B10ECA16EA,
 				F5143A380221DCCE01A80181,
 				F520FB1C0221DEFD01C1A525,
+				F5B92B850223191D01C1A525,
 			);
 			isa = PBXSourcesBuildPhase;
 		};
@@ -414,6 +416,8 @@
 				39446082020F50ED0ECA1767,
 				F520FB190221DEFD01C1A525,
 				F520FB1A0221DEFD01C1A525,
+				F5B92B820223191D01C1A525,
+				F5B92B830223191D01C1A525,
 			);
 			isa = PBXGroup;
 			name = History;
@@ -1019,6 +1023,28 @@
 			settings = {
 			};
 		};
+		F5B92B820223191D01C1A525 = {
+			isa = PBXFileReference;
+			path = IFWebHistoryPrivate.h;
+			refType = 4;
+		};
+		F5B92B830223191D01C1A525 = {
+			isa = PBXFileReference;
+			path = IFWebHistoryPrivate.m;
+			refType = 4;
+		};
+		F5B92B840223191D01C1A525 = {
+			fileRef = F5B92B820223191D01C1A525;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F5B92B850223191D01C1A525 = {
+			fileRef = F5B92B830223191D01C1A525;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 		F5EBC45202134BB601CA1520 = {
 			children = (
 				F5EBC45302134BC301CA1520,

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list