[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:54 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 4e73a46db74dcb2d7fe102d8d821c1a80a70e052
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 19 01:18:08 2002 +0000
First piece of implementing IFWebHistory. None of the mutators do anything,
and the accessors return canned data. But at least all the temporary hackery
is hiding behind legitimate API.
* History.subproj/IFWebHistory.h:
* History.subproj/IFWebHistory.m:
(+[IFWebHistory sharedWebHistory]):
Implemented sensibly.
(-[IFWebHistory createTestEntryWithURLString:title:date:]),
(-[IFWebHistory testDataDates]), (-[IFWebHistory testData]),
Private temporary hackery to return fake data.
(-[IFWebHistory orderedLastVisitedDays]),
(-[IFWebHistory orderedEntriesLastVisitedOnDay:]):
Implemented using temporary hackery.
(-[IFWebHistory addEntry:]),
(-[IFWebHistory removeEntry:]),
(-[IFWebHistory removeAllEntries]):
Unimplemented mutator methods.
(-[IFWebHistory entriesWithAddressContainingString:]),
(-[IFWebHistory entriesWithTitleOrAddressContainingString:]),
(-[IFWebHistory containsURL:]):
Methods that we'll need eventually, currently unimplemented. We may flesh out
the API a little more before we actually implement any of these.
(-[NSCalendarDate daysSinceDate:]): Convenience method in category; will
probably move to another file soon.
* WebKit.pbproj/project.pbxproj: Updated for new files
Made history implementation use IFWebHistory; removed temporary hackery.
(Actually it was mostly just moved to IFWebHistory, but now it's hiding
behind a legitimate API.)
* GlobalHistory.m:
(+[GlobalHistory testData]): Removed this temporary hackery.
(-[GlobalHistory outlineView:child:ofItem:]),
(-[GlobalHistory outlineView:isItemExpandable:]),
(-[GlobalHistory outlineView:numberOfChildrenOfItem:]),
(-[GlobalHistory outlineView:objectValueForTableColumn:byItem:]):
Replaced hacky implementation with use of new IFWebHistory API.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index a1621bf..472cf32 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,39 @@
+2002-02-18 John Sullivan <sullivan at apple.com>
+
+ First piece of implementing IFWebHistory. None of the mutators do anything,
+ and the accessors return canned data. But at least all the temporary hackery
+ is hiding behind legitimate API.
+
+ * History.subproj/IFWebHistory.h:
+ * History.subproj/IFWebHistory.m:
+
+ (+[IFWebHistory sharedWebHistory]):
+ Implemented sensibly.
+
+ (-[IFWebHistory createTestEntryWithURLString:title:date:]),
+ (-[IFWebHistory testDataDates]), (-[IFWebHistory testData]),
+ Private temporary hackery to return fake data.
+
+ (-[IFWebHistory orderedLastVisitedDays]),
+ (-[IFWebHistory orderedEntriesLastVisitedOnDay:]):
+ Implemented using temporary hackery.
+
+ (-[IFWebHistory addEntry:]),
+ (-[IFWebHistory removeEntry:]),
+ (-[IFWebHistory removeAllEntries]):
+ Unimplemented mutator methods.
+
+ (-[IFWebHistory entriesWithAddressContainingString:]),
+ (-[IFWebHistory entriesWithTitleOrAddressContainingString:]),
+ (-[IFWebHistory containsURL:]):
+ Methods that we'll need eventually, currently unimplemented. We may flesh out
+ the API a little more before we actually implement any of these.
+
+ (-[NSCalendarDate daysSinceDate:]): Convenience method in category; will
+ probably move to another file soon.
+
+ * WebKit.pbproj/project.pbxproj: Updated for new files
+
2002-02-18 Kenneth Kocienda <kocienda at apple.com>
Fixed breakge that came up when project file merged.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index a1621bf..472cf32 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,39 @@
+2002-02-18 John Sullivan <sullivan at apple.com>
+
+ First piece of implementing IFWebHistory. None of the mutators do anything,
+ and the accessors return canned data. But at least all the temporary hackery
+ is hiding behind legitimate API.
+
+ * History.subproj/IFWebHistory.h:
+ * History.subproj/IFWebHistory.m:
+
+ (+[IFWebHistory sharedWebHistory]):
+ Implemented sensibly.
+
+ (-[IFWebHistory createTestEntryWithURLString:title:date:]),
+ (-[IFWebHistory testDataDates]), (-[IFWebHistory testData]),
+ Private temporary hackery to return fake data.
+
+ (-[IFWebHistory orderedLastVisitedDays]),
+ (-[IFWebHistory orderedEntriesLastVisitedOnDay:]):
+ Implemented using temporary hackery.
+
+ (-[IFWebHistory addEntry:]),
+ (-[IFWebHistory removeEntry:]),
+ (-[IFWebHistory removeAllEntries]):
+ Unimplemented mutator methods.
+
+ (-[IFWebHistory entriesWithAddressContainingString:]),
+ (-[IFWebHistory entriesWithTitleOrAddressContainingString:]),
+ (-[IFWebHistory containsURL:]):
+ Methods that we'll need eventually, currently unimplemented. We may flesh out
+ the API a little more before we actually implement any of these.
+
+ (-[NSCalendarDate daysSinceDate:]): Convenience method in category; will
+ probably move to another file soon.
+
+ * WebKit.pbproj/project.pbxproj: Updated for new files
+
2002-02-18 Kenneth Kocienda <kocienda at apple.com>
Fixed breakge that came up when project file merged.
diff --git a/WebKit/History.subproj/IFWebHistory.h b/WebKit/History.subproj/IFWebHistory.h
new file mode 100644
index 0000000..a519d69
--- /dev/null
+++ b/WebKit/History.subproj/IFWebHistory.h
@@ -0,0 +1,43 @@
+//
+// IFWebHistory.h
+// WebKit
+//
+// Created by John Sullivan on Mon Feb 18 2002.
+// Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <WebKit/IFURIEntry.h>
+
+ at interface IFWebHistory : NSObject {
+ at private
+ id _historyPrivate;
+}
+
++ (IFWebHistory *)sharedWebHistory;
+
+// modifying contents
+- (void)addEntry: (IFURIEntry *)entry;
+- (void)removeEntry: (IFURIEntry *)entry;
+- (void)removeAllEntries;
+
+// retrieving contents for date-based presentation
+
+// get an array of NSCalendarDate, each one representing a unique day that contains one
+// or more history entries, ordered from most recent to oldest.
+- (NSArray *)orderedLastVisitedDays;
+
+// get an array of IFURIEntry that were last visited on the day represented by the
+// specified NSCalendarDate, ordered from most recent to oldest.
+- (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)calendarDate;
+
+// retrieving contents for autocompletion in location field
+- (NSArray *)entriesWithAddressContainingString: (NSString *)string;
+
+// retrieving contents for searching (maybe replace with state-based search API)
+- (NSArray *)entriesWithTitleOrAddressContainingString: (NSString *)string;
+
+// testing contents for visited-link mechanism
+- (BOOL)containsURL: (NSURL *)url;
+
+ at end
diff --git a/WebKit/History.subproj/IFWebHistory.m b/WebKit/History.subproj/IFWebHistory.m
new file mode 100644
index 0000000..2fbb449
--- /dev/null
+++ b/WebKit/History.subproj/IFWebHistory.m
@@ -0,0 +1,163 @@
+//
+// IFWebHistory.m
+// WebKit
+//
+// Created by John Sullivan on Mon Feb 18 2002.
+// Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import "IFWebHistory.h"
+
+static IFWebHistory *sharedWebHistory = nil;
+
+ at interface NSCalendarDate (IFExtensions)
+- (int)daysSinceDate: (NSCalendarDate *)date;
+ at end
+
+ at implementation IFWebHistory
+
++ (IFWebHistory *)sharedWebHistory
+{
+ if (sharedWebHistory == nil) {
+ sharedWebHistory = [[[self class] alloc] init];
+ }
+
+ return sharedWebHistory;
+}
+
+- (IFURIEntry *)createTestEntryWithURLString: (NSString *)urlString
+ title: (NSString *)title
+ date: (NSDate *)date
+{
+ 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];
+ }
+
+ return testDataDates;
+}
+
+- (NSArray *)testData
+{
+ 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;
+}
+
+#pragma mark MODIFYING CONTENTS
+
+- (void)addEntry: (IFURIEntry *)entry
+{
+ //FIXME: not yet implemented
+}
+
+- (void)removeEntry: (IFURIEntry *)entry
+{
+ //FIXME: not yet implemented
+}
+
+- (void)removeAllEntries
+{
+ //FIXME: not yet implemented
+}
+
+
+#pragma mark DATE-BASED RETRIEVAL
+
+- (NSArray *)orderedLastVisitedDays
+{
+ //FIXME: not yet implemented
+ return [self testDataDates];
+}
+
+- (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;
+}
+
+#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
+{
+ // 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;
+}
+
+ at end
diff --git a/WebKit/History.subproj/WebHistory.h b/WebKit/History.subproj/WebHistory.h
new file mode 100644
index 0000000..a519d69
--- /dev/null
+++ b/WebKit/History.subproj/WebHistory.h
@@ -0,0 +1,43 @@
+//
+// IFWebHistory.h
+// WebKit
+//
+// Created by John Sullivan on Mon Feb 18 2002.
+// Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <WebKit/IFURIEntry.h>
+
+ at interface IFWebHistory : NSObject {
+ at private
+ id _historyPrivate;
+}
+
++ (IFWebHistory *)sharedWebHistory;
+
+// modifying contents
+- (void)addEntry: (IFURIEntry *)entry;
+- (void)removeEntry: (IFURIEntry *)entry;
+- (void)removeAllEntries;
+
+// retrieving contents for date-based presentation
+
+// get an array of NSCalendarDate, each one representing a unique day that contains one
+// or more history entries, ordered from most recent to oldest.
+- (NSArray *)orderedLastVisitedDays;
+
+// get an array of IFURIEntry that were last visited on the day represented by the
+// specified NSCalendarDate, ordered from most recent to oldest.
+- (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)calendarDate;
+
+// retrieving contents for autocompletion in location field
+- (NSArray *)entriesWithAddressContainingString: (NSString *)string;
+
+// retrieving contents for searching (maybe replace with state-based search API)
+- (NSArray *)entriesWithTitleOrAddressContainingString: (NSString *)string;
+
+// testing contents for visited-link mechanism
+- (BOOL)containsURL: (NSURL *)url;
+
+ at end
diff --git a/WebKit/History.subproj/WebHistory.m b/WebKit/History.subproj/WebHistory.m
new file mode 100644
index 0000000..2fbb449
--- /dev/null
+++ b/WebKit/History.subproj/WebHistory.m
@@ -0,0 +1,163 @@
+//
+// IFWebHistory.m
+// WebKit
+//
+// Created by John Sullivan on Mon Feb 18 2002.
+// Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import "IFWebHistory.h"
+
+static IFWebHistory *sharedWebHistory = nil;
+
+ at interface NSCalendarDate (IFExtensions)
+- (int)daysSinceDate: (NSCalendarDate *)date;
+ at end
+
+ at implementation IFWebHistory
+
++ (IFWebHistory *)sharedWebHistory
+{
+ if (sharedWebHistory == nil) {
+ sharedWebHistory = [[[self class] alloc] init];
+ }
+
+ return sharedWebHistory;
+}
+
+- (IFURIEntry *)createTestEntryWithURLString: (NSString *)urlString
+ title: (NSString *)title
+ date: (NSDate *)date
+{
+ 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];
+ }
+
+ return testDataDates;
+}
+
+- (NSArray *)testData
+{
+ 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;
+}
+
+#pragma mark MODIFYING CONTENTS
+
+- (void)addEntry: (IFURIEntry *)entry
+{
+ //FIXME: not yet implemented
+}
+
+- (void)removeEntry: (IFURIEntry *)entry
+{
+ //FIXME: not yet implemented
+}
+
+- (void)removeAllEntries
+{
+ //FIXME: not yet implemented
+}
+
+
+#pragma mark DATE-BASED RETRIEVAL
+
+- (NSArray *)orderedLastVisitedDays
+{
+ //FIXME: not yet implemented
+ return [self testDataDates];
+}
+
+- (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;
+}
+
+#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
+{
+ // 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;
+}
+
+ at end
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index dc42ca4..6d40e2f 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -189,6 +189,7 @@
39446096020F50ED0ECA1767,
39446097020F50ED0ECA1767,
39446098020F50ED0ECA1767,
+ F520FB1B0221DEFD01C1A525,
F5EBC45702134BC301CA1520,
F5EBC45802134BC301CA1520,
9CF0E24B021361B10ECA16EA,
@@ -223,6 +224,7 @@
F5EBC45A02134BC301CA1520,
9CF0E24C021361B10ECA16EA,
F5143A380221DCCE01A80181,
+ F520FB1C0221DEFD01C1A525,
);
isa = PBXSourcesBuildPhase;
};
@@ -410,6 +412,8 @@
39446080020F50ED0ECA1767,
39446081020F50ED0ECA1767,
39446082020F50ED0ECA1767,
+ F520FB190221DEFD01C1A525,
+ F520FB1A0221DEFD01C1A525,
);
isa = PBXGroup;
name = History;
@@ -990,6 +994,31 @@
settings = {
};
};
+ F520FB190221DEFD01C1A525 = {
+ isa = PBXFileReference;
+ path = IFWebHistory.h;
+ refType = 4;
+ };
+ F520FB1A0221DEFD01C1A525 = {
+ isa = PBXFileReference;
+ path = IFWebHistory.m;
+ refType = 4;
+ };
+ F520FB1B0221DEFD01C1A525 = {
+ fileRef = F520FB190221DEFD01C1A525;
+ isa = PBXBuildFile;
+ settings = {
+ ATTRIBUTES = (
+ Public,
+ );
+ };
+ };
+ F520FB1C0221DEFD01C1A525 = {
+ fileRef = F520FB1A0221DEFD01C1A525;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
F5EBC45202134BB601CA1520 = {
children = (
F5EBC45302134BC301CA1520,
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list