[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:23:39 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 8e0d2b7b04d8800fa91f9b30ac9484c9092bf28d
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 5 08:28:11 2003 +0000
WebKit:
Cleanup public WebHistory API, stage 1.
Reviewed by trey.
* History.subproj/WebHistory.h:
* History.subproj/WebHistory.m:
(-[_WebCoreHistoryProvider initWithHistory:]):
(-[_WebCoreHistoryProvider containsEntryForURLString:]):
(-[_WebCoreHistoryProvider dealloc]):
(+[WebHistory sharedHistory]):
(+[WebHistory createSharedHistoryWithFile:]):
* History.subproj/WebHistoryPrivate.h:
* History.subproj/WebHistoryPrivate.m:
WebBrowser:
Cleanup public WebHistory API, stage 1.
Reviewed by trey.
* GlobalHistory.m:
(-[GlobalHistory init]):
WebCore:
Cleanup public WebHistory API, stage 1.
Reviewed by trey.
* kwq/KWQKHistoryProvider.mm:
* kwq/WebCoreHistory.h:
* kwq/WebCoreHistory.m:
(+[WebCoreHistory setHistoryProvider:]):
(+[WebCoreHistory historyProvider]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index d167032..d9513fb 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,15 @@
+2003-02-05 Richard Williamson <rjw at apple.com>
+
+ Cleanup public WebHistory API, stage 1.
+
+ Reviewed by trey.
+
+ * kwq/KWQKHistoryProvider.mm:
+ * kwq/WebCoreHistory.h:
+ * kwq/WebCoreHistory.m:
+ (+[WebCoreHistory setHistoryProvider:]):
+ (+[WebCoreHistory historyProvider]):
+
2003-02-04 Darin Adler <darin at apple.com>
Reviewed by Maciej.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index d167032..d9513fb 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2003-02-05 Richard Williamson <rjw at apple.com>
+
+ Cleanup public WebHistory API, stage 1.
+
+ Reviewed by trey.
+
+ * kwq/KWQKHistoryProvider.mm:
+ * kwq/WebCoreHistory.h:
+ * kwq/WebCoreHistory.m:
+ (+[WebCoreHistory setHistoryProvider:]):
+ (+[WebCoreHistory historyProvider]):
+
2003-02-04 Darin Adler <darin at apple.com>
Reviewed by Maciej.
diff --git a/WebCore/kwq/KWQKHistoryProvider.mm b/WebCore/kwq/KWQKHistoryProvider.mm
index b346b30..b5e1594 100644
--- a/WebCore/kwq/KWQKHistoryProvider.mm
+++ b/WebCore/kwq/KWQKHistoryProvider.mm
@@ -43,7 +43,7 @@ void HistoryProvider::insert(const QString &s)
bool HistoryProvider::contains(const QString &s) const
{
- return [[WebCoreHistory sharedHistory] containsEntryForURLString: KURL(s).canonicalURL().getNSString()];
+ return [[WebCoreHistory historyProvider] containsEntryForURLString: KURL(s).canonicalURL().getNSString()];
}
} // namespace KParts
diff --git a/WebCore/kwq/WebCoreHistory.h b/WebCore/kwq/WebCoreHistory.h
index 19e1ba4..980262b 100644
--- a/WebCore/kwq/WebCoreHistory.h
+++ b/WebCore/kwq/WebCoreHistory.h
@@ -25,14 +25,15 @@
#import <Foundation/Foundation.h>
+ at protocol WebCoreHistoryProvider <NSObject>
+- (BOOL)containsEntryForURLString: (NSString *)urlString;
+ at end
+
@interface WebCoreHistory : NSObject
{
}
-+ (void)setSharedHistory: (WebCoreHistory *)h;
-+ (WebCoreHistory *)sharedHistory;
-
-- (void)addEntryForURLString: (NSString *)urlString;
-- (BOOL)containsEntryForURLString: (NSString *)urlString;
++ (void)setHistoryProvider: (id<WebCoreHistoryProvider>)h;
++ (id<WebCoreHistoryProvider>)historyProvider;
@end
diff --git a/WebCore/kwq/WebCoreHistory.m b/WebCore/kwq/WebCoreHistory.m
index b088f94..e624452 100644
--- a/WebCore/kwq/WebCoreHistory.m
+++ b/WebCore/kwq/WebCoreHistory.m
@@ -29,28 +29,19 @@
@implementation WebCoreHistory
-static WebCoreHistory *_sharedHistory = nil;
+static id<WebCoreHistoryProvider> _historyProvider = nil;
-+ (void)setSharedHistory: (WebCoreHistory *)h
++ (void)setHistoryProvider: (id<WebCoreHistoryProvider>)h
{
- if (_sharedHistory != h && _sharedHistory != nil)
- [_sharedHistory release];
- _sharedHistory = [h retain];
+ if (_historyProvider != h){
+ [_historyProvider release];
+ _historyProvider = [h retain];
+ }
}
-+ (WebCoreHistory *)sharedHistory
++ (id<WebCoreHistoryProvider>)historyProvider
{
- return _sharedHistory;
+ return _historyProvider;
}
-- (void)addEntryForURLString: (NSString *)urlString
-{
-}
-
-- (BOOL)containsEntryForURLString: (NSString *)urlString;
-{
- return false;
-}
-
-
@end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1e5f172..6ed7aa8 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2003-02-05 Richard Williamson <rjw at apple.com>
+
+ Cleanup public WebHistory API, stage 1.
+
+ Reviewed by trey.
+
+ * History.subproj/WebHistory.h:
+ * History.subproj/WebHistory.m:
+ (-[_WebCoreHistoryProvider initWithHistory:]):
+ (-[_WebCoreHistoryProvider containsEntryForURLString:]):
+ (-[_WebCoreHistoryProvider dealloc]):
+ (+[WebHistory sharedHistory]):
+ (+[WebHistory createSharedHistoryWithFile:]):
+ * History.subproj/WebHistoryPrivate.h:
+ * History.subproj/WebHistoryPrivate.m:
+
2003-02-04 Maciej Stachowiak <mjs at apple.com>
Reviewed by Darin.
diff --git a/WebKit/History.subproj/WebHistory.h b/WebKit/History.subproj/WebHistory.h
index fa0f74a..c7344de 100644
--- a/WebKit/History.subproj/WebHistory.h
+++ b/WebKit/History.subproj/WebHistory.h
@@ -8,9 +8,6 @@
*/
#import <Foundation/Foundation.h>
-// FIXME Cannot inherit from WebCoreHistory
-#import <WebCore/WebCoreHistory.h>
-
@class WebHistoryItem;
@class WebHistoryPrivate;
@@ -32,7 +29,7 @@ extern NSString *WebHistoryLoadedNotification;
@discussion WebHistory is used to track pages that have been loaded
by WebKit.
*/
- at interface WebHistory : WebCoreHistory {
+ at interface WebHistory : NSObject {
@private
WebHistoryPrivate *_historyPrivate;
}
@@ -40,11 +37,11 @@ extern NSString *WebHistoryLoadedNotification;
+ (WebHistory *)sharedHistory;
/*!
- @method webHistoryWithFile:
+ @method createSharedHistoryWithFile:
@param file The file to use to initialize the WebHistory.
@result Returns a WebHistory initialized with the contents of file.
*/
-+ (WebHistory *)webHistoryWithFile: (NSString *)file;
++ (WebHistory *)createSharedHistoryWithFile: (NSString*)file;
/*!
@method initWithFile:
diff --git a/WebKit/History.subproj/WebHistory.m b/WebKit/History.subproj/WebHistory.m
index 0cc9f80..0e68ced 100644
--- a/WebKit/History.subproj/WebHistory.m
+++ b/WebKit/History.subproj/WebHistory.m
@@ -12,26 +12,58 @@
#import <WebFoundation/WebAssertions.h>
#import <WebFoundation/WebNSURLExtras.h>
+#import <WebCore/WebCoreHistory.h>
+
+
NSString *WebHistoryEntriesAddedNotification = @"WebHistoryEntriesAddedNotification";
NSString *WebHistoryEntriesRemovedNotification = @"WebHistoryEntriesRemovedNotification";
NSString *WebHistoryAllEntriesRemovedNotification = @"WebHistoryAllEntriesRemovedNotification";
NSString *WebHistoryLoadedNotification = @"WebHistoryLoadedNotification";
+static WebHistory *_sharedHistory = nil;
+
+ at interface _WebCoreHistoryProvider : NSObject <WebCoreHistoryProvider>
+{
+ WebHistory *history;
+}
+- initWithHistory: (WebHistory *)h;
+ at end
+
+ at implementation _WebCoreHistoryProvider
+- initWithHistory: (WebHistory *)h
+{
+ history = [h retain];
+ return self;
+}
+
+- (BOOL)containsEntryForURLString: (NSString *)URLString
+{
+ return [history containsEntryForURLString: URLString];
+}
+
+- (void)dealloc
+{
+ [history release];
+ [super dealloc];
+}
+
+ at end
+
@implementation WebHistory
+ (WebHistory *)sharedHistory
{
- return (WebHistory *)[super sharedHistory];
+ return _sharedHistory;
}
-+ (WebHistory *)webHistoryWithFile: (NSString*)file
++ (WebHistory *)createSharedHistoryWithFile: (NSString*)file
{
- // Should only be called once. Need to rationalize usage
- // of history.
+ // FIXME. Need to think about multiple instances of WebHistory per application
+ // and correct synchronization of history file between applications.
WebHistory *h = [[self alloc] initWithFile:file];
- [[self class] setSharedHistory: h];
- [h release];
+ [WebCoreHistory setHistoryProvider: [[[_WebCoreHistoryProvider alloc] initWithHistory: h] autorelease]];
+ _sharedHistory = h;
return h;
}
diff --git a/WebKit/History.subproj/WebHistoryPrivate.h b/WebKit/History.subproj/WebHistoryPrivate.h
index 460dd4e..ae6b2ac 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.h
+++ b/WebKit/History.subproj/WebHistoryPrivate.h
@@ -8,6 +8,8 @@
#import <Foundation/Foundation.h>
+#import <WebKit/WebHistory.h>
+
@class WebHistoryItem;
@interface WebHistoryPrivate : NSObject {
@@ -37,3 +39,7 @@
- (BOOL)saveHistory;
@end
+
+ at interface WebHistory (WebPrivate)
+- (BOOL)containsEntryForURLString: (NSString *)URLString;
+ at end
diff --git a/WebKit/History.subproj/WebHistoryPrivate.m b/WebKit/History.subproj/WebHistoryPrivate.m
index 6ed51d5..079412c 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.m
+++ b/WebKit/History.subproj/WebHistoryPrivate.m
@@ -14,6 +14,7 @@
#import <WebFoundation/WebNSCalendarDateExtras.h>
#import <WebFoundation/WebNSURLExtras.h>
+
@interface WebHistoryPrivate (Private)
-(WebHistoryItem *)_entryForURLString:(NSString *)URLString;
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list