[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:30:52 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit ab00ea633b86933d08568fdcb804c725b7dc9637
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 21 03:39:23 2003 +0000
WebKit:
Use "Item" consistently in the WebHistory and WebBackForwardList.
Change createSharedHistoryWithFile: to setSharedHistory:
Make the various page cache methods per WebBackForwardList instead of global.
Reviewed by gramps.
* History.subproj/WebBackForwardList.h:
* History.subproj/WebBackForwardList.m:
(-[WebBackForwardListPrivate dealloc]):
(-[WebBackForwardList init]):
(-[WebBackForwardList dealloc]):
(-[WebBackForwardList goBack]):
(-[WebBackForwardList goForward]):
(-[WebBackForwardList goToItem:]):
(-[WebBackForwardList backItem]):
(-[WebBackForwardList currentItem]):
(-[WebBackForwardList forwardItem]):
(-[WebBackForwardList containsItem:]):
(-[WebBackForwardList maximumSize]):
(-[WebBackForwardList setMaximumSize:]):
(-[WebBackForwardList description]):
(-[WebBackForwardList clearPageCache]):
(-[WebBackForwardList setPageCacheSize:]):
(-[WebBackForwardList pageCacheSize]):
(-[WebBackForwardList setUsesPageCache:]):
(-[WebBackForwardList usesPageCache]):
(-[WebBackForwardList backListCount]):
(-[WebBackForwardList forwardListCount]):
(-[WebBackForwardList itemAtIndex:]):
* History.subproj/WebHistory.h:
* History.subproj/WebHistory.m:
(-[_WebCoreHistoryProvider containsItemForURLString:]):
(+[WebHistory setSharedHistory:]):
(-[WebHistory addItemForURL:]):
(-[WebHistory addItem:]):
(-[WebHistory removeItem:]):
(-[WebHistory removeItems:]):
(-[WebHistory removeAllItems]):
(-[WebHistory addItems:]):
(-[WebHistory orderedItemsLastVisitedOnDay:]):
(-[WebHistory containsItemForURLString:]):
(-[WebHistory itemForURL:]):
* History.subproj/WebHistoryItem.h:
* History.subproj/WebHistoryPrivate.h:
* History.subproj/WebHistoryPrivate.m:
(-[WebHistoryPrivate insertItem:atDateIndex:]):
(-[WebHistoryPrivate removeItemForURLString:]):
(-[WebHistoryPrivate addItem:]):
(-[WebHistoryPrivate removeItem:]):
(-[WebHistoryPrivate removeItems:]):
(-[WebHistoryPrivate removeAllItems]):
(-[WebHistoryPrivate addItems:]):
(-[WebHistoryPrivate orderedItemsLastVisitedOnDay:]):
(-[WebHistoryPrivate containsItemForURLString:]):
(-[WebHistoryPrivate itemForURL:]):
(-[WebHistoryPrivate _loadHistoryGuts:]):
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge goBackOrForward:]):
* WebKit.exp:
* WebKit.pbproj/project.pbxproj:
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _setTitle:]):
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _addBackForwardItemClippedAtTarget:]):
(-[WebFrame _transitionToCommitted:]):
(-[WebFrame _canCachePage]):
(-[WebFrame _purgePageCache]):
(-[WebFrame _goToItem:withLoadType:]):
(-[WebFrame _resetBackForwardListToCurrent]):
* WebView.subproj/WebLocationChangeDelegate.h:
* WebView.subproj/WebResourceLoadDelegate.h:
* WebView.subproj/WebView.h:
* WebView.subproj/WebView.m:
(-[WebView _commonInitialization:frameName:groupName:]):
(-[WebView setMaintainsBackForwardList:]):
(-[WebView goBack]):
(-[WebView goForward]):
WebCore:
Use "Item" consistently in the WebHistory and WebBackForwardList.
Change createSharedHistoryWithFile: to setSharedHistory:
Make the various page cache methods per WebBackForwardList instead of global.
Reviewed by gramps.
* kwq/KWQKHistoryProvider.mm:
* kwq/WebCoreHistory.h:
WebBrowser:
Use "Item" consistently in the WebHistory and WebBackForwardList.
Change createSharedHistoryWithFile: to setSharedHistory:
Make the various page cache methods per WebBackForwardList instead of global.
Reviewed by gramps.
* AppController.m:
(-[AppController confirmResetSafari:]):
* BrowserDocument.m:
(-[BrowserDocument canGoBack]):
(-[BrowserDocument canGoForward]):
(-[BrowserDocument goBack:]):
(-[BrowserDocument goForward:]):
(-[BrowserDocument goToItem:]):
(-[BrowserDocument backListMenuForButton:]):
* BrowserWebController.m:
(-[BrowserWebController snapBackTo:]):
(-[BrowserWebController setPageForSnapBackToCurrentPage:]):
(-[BrowserWebController canSnapBackToPage]):
(-[BrowserWebController setSearchResultsForSnapBackToCurrentPage]):
(-[BrowserWebController canSnapBackToSearchResults]):
* ContextMenuHandler.m:
(-[ContextMenuHandler addLinkToBookmarks:]):
* Debug/DebugUtilities.m:
(-[DebugUtilities createDebugMenu]):
(-[BrowserDocument toggleBackForwardEnabled:]):
(-[BrowserDocument validate_toggleBackForwardEnabled:]):
* GlobalHistory.m:
(-[GlobalHistory _registerForHistoryNotifications]):
(-[GlobalHistory init]):
(-[GlobalHistory _entriesFromMixedItems:]):
(-[GlobalHistory _addItemsForDate:toMenu:skip:limit:]):
(-[GlobalHistory _removeEntries:]):
(-[GlobalHistory _undoRemoveEntries:]):
(-[GlobalHistory deleteContentItems:withUndoManager:]):
(-[GlobalHistory child:ofContentItem:]):
(-[GlobalHistory numberOfChildrenOfContentItem:]):
* URLCompletionController.m:
(+[URLCompletionController _loadDB]):
(+[URLCompletionController _registerForNotifications]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 3eb028a..2656feb 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2003-03-20 Richard Williamson <rjw at apple.com>
+
+ Use "Item" consistently in the WebHistory and WebBackForwardList.
+ Change createSharedHistoryWithFile: to setSharedHistory:
+ Make the various page cache methods per WebBackForwardList instead of global.
+
+ Reviewed by gramps.
+
+ * kwq/KWQKHistoryProvider.mm:
+ * kwq/WebCoreHistory.h:
+
2003-03-20 David Hyatt <hyatt at apple.com>
Always do residual style fixups in all three Safari rendering
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 3eb028a..2656feb 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2003-03-20 Richard Williamson <rjw at apple.com>
+
+ Use "Item" consistently in the WebHistory and WebBackForwardList.
+ Change createSharedHistoryWithFile: to setSharedHistory:
+ Make the various page cache methods per WebBackForwardList instead of global.
+
+ Reviewed by gramps.
+
+ * kwq/KWQKHistoryProvider.mm:
+ * kwq/WebCoreHistory.h:
+
2003-03-20 David Hyatt <hyatt at apple.com>
Always do residual style fixups in all three Safari rendering
diff --git a/WebCore/kwq/KWQKHistoryProvider.mm b/WebCore/kwq/KWQKHistoryProvider.mm
index b5e1594..8096b24 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 historyProvider] containsEntryForURLString: KURL(s).canonicalURL().getNSString()];
+ return [[WebCoreHistory historyProvider] containsItemForURLString: KURL(s).canonicalURL().getNSString()];
}
} // namespace KParts
diff --git a/WebCore/kwq/WebCoreHistory.h b/WebCore/kwq/WebCoreHistory.h
index 980262b..8b43587 100644
--- a/WebCore/kwq/WebCoreHistory.h
+++ b/WebCore/kwq/WebCoreHistory.h
@@ -26,7 +26,7 @@
#import <Foundation/Foundation.h>
@protocol WebCoreHistoryProvider <NSObject>
-- (BOOL)containsEntryForURLString: (NSString *)urlString;
+- (BOOL)containsItemForURLString: (NSString *)urlString;
@end
@interface WebCoreHistory : NSObject
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 07e0ba6..7fcab06 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,83 @@
+2003-03-20 Richard Williamson <rjw at apple.com>
+
+ Use "Item" consistently in the WebHistory and WebBackForwardList.
+ Change createSharedHistoryWithFile: to setSharedHistory:
+ Make the various page cache methods per WebBackForwardList instead of global.
+
+ Reviewed by gramps.
+
+ * History.subproj/WebBackForwardList.h:
+ * History.subproj/WebBackForwardList.m:
+ (-[WebBackForwardListPrivate dealloc]):
+ (-[WebBackForwardList init]):
+ (-[WebBackForwardList dealloc]):
+ (-[WebBackForwardList goBack]):
+ (-[WebBackForwardList goForward]):
+ (-[WebBackForwardList goToItem:]):
+ (-[WebBackForwardList backItem]):
+ (-[WebBackForwardList currentItem]):
+ (-[WebBackForwardList forwardItem]):
+ (-[WebBackForwardList containsItem:]):
+ (-[WebBackForwardList maximumSize]):
+ (-[WebBackForwardList setMaximumSize:]):
+ (-[WebBackForwardList description]):
+ (-[WebBackForwardList clearPageCache]):
+ (-[WebBackForwardList setPageCacheSize:]):
+ (-[WebBackForwardList pageCacheSize]):
+ (-[WebBackForwardList setUsesPageCache:]):
+ (-[WebBackForwardList usesPageCache]):
+ (-[WebBackForwardList backListCount]):
+ (-[WebBackForwardList forwardListCount]):
+ (-[WebBackForwardList itemAtIndex:]):
+ * History.subproj/WebHistory.h:
+ * History.subproj/WebHistory.m:
+ (-[_WebCoreHistoryProvider containsItemForURLString:]):
+ (+[WebHistory setSharedHistory:]):
+ (-[WebHistory addItemForURL:]):
+ (-[WebHistory addItem:]):
+ (-[WebHistory removeItem:]):
+ (-[WebHistory removeItems:]):
+ (-[WebHistory removeAllItems]):
+ (-[WebHistory addItems:]):
+ (-[WebHistory orderedItemsLastVisitedOnDay:]):
+ (-[WebHistory containsItemForURLString:]):
+ (-[WebHistory itemForURL:]):
+ * History.subproj/WebHistoryItem.h:
+ * History.subproj/WebHistoryPrivate.h:
+ * History.subproj/WebHistoryPrivate.m:
+ (-[WebHistoryPrivate insertItem:atDateIndex:]):
+ (-[WebHistoryPrivate removeItemForURLString:]):
+ (-[WebHistoryPrivate addItem:]):
+ (-[WebHistoryPrivate removeItem:]):
+ (-[WebHistoryPrivate removeItems:]):
+ (-[WebHistoryPrivate removeAllItems]):
+ (-[WebHistoryPrivate addItems:]):
+ (-[WebHistoryPrivate orderedItemsLastVisitedOnDay:]):
+ (-[WebHistoryPrivate containsItemForURLString:]):
+ (-[WebHistoryPrivate itemForURL:]):
+ (-[WebHistoryPrivate _loadHistoryGuts:]):
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge goBackOrForward:]):
+ * WebKit.exp:
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _setTitle:]):
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _addBackForwardItemClippedAtTarget:]):
+ (-[WebFrame _transitionToCommitted:]):
+ (-[WebFrame _canCachePage]):
+ (-[WebFrame _purgePageCache]):
+ (-[WebFrame _goToItem:withLoadType:]):
+ (-[WebFrame _resetBackForwardListToCurrent]):
+ * WebView.subproj/WebLocationChangeDelegate.h:
+ * WebView.subproj/WebResourceLoadDelegate.h:
+ * WebView.subproj/WebView.h:
+ * WebView.subproj/WebView.m:
+ (-[WebView _commonInitialization:frameName:groupName:]):
+ (-[WebView setMaintainsBackForwardList:]):
+ (-[WebView goBack]):
+ (-[WebView goForward]):
+
2003-03-20 Chris Blumenberg <cblu at apple.com>
Properly handle file URL directory errors.
diff --git a/WebKit/History.subproj/WebBackForwardList.h b/WebKit/History.subproj/WebBackForwardList.h
index 89df1d9..dfa3c59 100644
--- a/WebKit/History.subproj/WebBackForwardList.h
+++ b/WebKit/History.subproj/WebBackForwardList.h
@@ -5,6 +5,7 @@
#import <Foundation/Foundation.h>
@class WebHistoryItem;
+ at class WebBackForwardListPrivate;
/*!
@class WebBackForwardList
@@ -16,10 +17,8 @@
structure.
*/
@interface WebBackForwardList : NSObject {
- @private
- NSMutableArray *_entries;
- int _current;
- int _maximumSize;
+ at private
+ WebBackForwardListPrivate *_private;
}
/*!
@@ -29,28 +28,28 @@
will load much more quickly; however, they may not always be up-to-date. The
page cache may not apply to all pages.
*/
-+ (void)setUsesPageCache: (BOOL)flag;
+- (void)setUsesPageCache: (BOOL)flag;
/*!
@method usesPageCache
@abstract Returns whether page cacheing is enabled.
@result YES if the page cache is enabled, otherwise NO.
*/
-+ (BOOL)usesPageCache;
+- (BOOL)usesPageCache;
/*!
@method setPageCacheSize:
@abstract Sets the size of the page cache.
@param size The number of pages to allow in the page cache.
*/
-+ (void)setPageCacheSize: (unsigned)size;
+- (void)setPageCacheSize: (unsigned)size;
/*!
@method pageCacheSize
@abstract Returns the number of pages that may be cached.
@result The number of pages that may be cached.
*/
-+ (unsigned)pageCacheSize;
+- (unsigned)pageCacheSize;
/*!
@method clearPageCache
@@ -59,7 +58,7 @@
- (void)clearPageCache;
/*!
- @method addEntry:
+ @method addItem:
@abstract Adds an entry to the list.
@param entry The entry to add.
@discussion The added entry is inserted immediately after the current entry.
@@ -67,7 +66,7 @@
forward list will be dropped at this point. In addition, entries may be dropped to keep
the size of the list within the maximum size.
*/
-- (void)addEntry:(WebHistoryItem *)entry;
+- (void)addItem:(WebHistoryItem *)item;
/*!
@method goBack
@@ -82,40 +81,40 @@
- (void)goForward;
/*!
- @method goToEntry:
+ @method goToItem:
@abstract Move the current pointer to the given entry.
- @param entry The history item to move the pointer to
+ @param item The history item to move the pointer to
*/
-- (void)goToEntry:(WebHistoryItem *)entry;
+- (void)goToItem:(WebHistoryItem *)item;
/*!
- @method backEntry
+ @method backItem
@abstract Returns the entry right before the current entry.
@result The entry right before the current entry, or nil if there isn't one.
*/
-- (WebHistoryItem *)backEntry;
+- (WebHistoryItem *)backItem;
/*!
- @method currentEntry
+ @method currentItem
@abstract Returns the current entry.
@result The current entry.
*/
-- (WebHistoryItem *)currentEntry;
+- (WebHistoryItem *)currentItem;
/*!
- @method forwardEntry
+ @method forwardItem
@abstract Returns the entry right after the current entry.
@result The entry right after the current entry, or nil if there isn't one.
*/
-- (WebHistoryItem *)forwardEntry;
+- (WebHistoryItem *)forwardItem;
/*!
- @method containsEntry:
+ @method containsItem:
@abstract Returns whether the receiver contains the given entry.
- @param entry The history item to search for.
+ @param item The history item to search for.
@result YES if the list contains the given entry, otherwise NO.
*/
-- (BOOL)containsEntry:(WebHistoryItem *)entry;
+- (BOOL)containsItem:(WebHistoryItem *)item;
/*!
@method backListWithSizeLimit:
@@ -162,11 +161,11 @@
- (int)forwardListCount;
/*!
- @method entryAtIndex:
+ @method itemAtIndex:
@abstract Returns an entry the given distance from the current entry.
@param index Index of the desired list item relative to the current item; 0 is current item, -1 is back item, 1 is forward item, etc.
@result The entry the given distance from the current entry. If index exceeds the limits of the list, nil is returned.
*/
-- (WebHistoryItem *)entryAtIndex:(int)index;
+- (WebHistoryItem *)itemAtIndex:(int)index;
@end
diff --git a/WebKit/History.subproj/WebBackForwardList.m b/WebKit/History.subproj/WebBackForwardList.m
index 0be152e..1f4b6cd 100644
--- a/WebKit/History.subproj/WebBackForwardList.m
+++ b/WebKit/History.subproj/WebBackForwardList.m
@@ -10,6 +10,26 @@
#import <WebFoundation/WebAssertions.h>
#import <WebFoundation/WebSystemBits.h>
+ at interface WebBackForwardListPrivate : NSObject
+{
+ at public
+ NSMutableArray *entries;
+ int current;
+ int maximumSize;
+ BOOL usesPageCache;
+ BOOL pageCacheSizeModified;
+ unsigned pageCacheSize;
+}
+ at end
+
+ at implementation WebBackForwardListPrivate
+- (void)dealloc
+{
+ [entries release];
+ [super dealloc];
+}
+ at end
+
@implementation WebBackForwardList
- (id)init
@@ -19,112 +39,118 @@
return nil;
}
- _entries = [[NSMutableArray alloc] init];
- _current = -1;
- _maximumSize = 100; // typically set by browser app
+ _private = [[WebBackForwardListPrivate alloc] init];
+
+ _private->entries = [[NSMutableArray alloc] init];
+ _private->current = -1;
+ _private->maximumSize = 100; // typically set by browser app
+ _private->usesPageCache = YES;
+ _private->pageCacheSizeModified = NO;
+ _private->pageCacheSize = 4;
+
return self;
}
- (void)dealloc
{
unsigned i;
- for (i = 0; i < [_entries count]; i++){
- WebHistoryItem *item = [_entries objectAtIndex: i];
+ for (i = 0; i < [_private->entries count]; i++){
+ WebHistoryItem *item = [_private->entries objectAtIndex: i];
[item setHasPageCache: NO];
}
- [_entries release];
+ [_private release];
[super dealloc];
}
-- (void)addEntry:(WebHistoryItem *)entry;
+- (void)addItem:(WebHistoryItem *)entry;
{
// Toss anything in the forward list
- int currSize = [_entries count];
- if (_current != currSize-1 && _current != -1) {
- NSRange forwardRange = NSMakeRange(_current+1, currSize-(_current+1));
+ int currSize = [_private->entries count];
+ if (_private->current != currSize-1 && _private->current != -1) {
+ NSRange forwardRange = NSMakeRange(_private->current+1, currSize-(_private->current+1));
NSArray *subarray;
- subarray = [_entries subarrayWithRange:forwardRange];
+ subarray = [_private->entries subarrayWithRange:forwardRange];
unsigned i;
for (i = 0; i < [subarray count]; i++){
WebHistoryItem *item = [subarray objectAtIndex: i];
[item setHasPageCache: NO];
}
- [_entries removeObjectsInRange: forwardRange];
+ [_private->entries removeObjectsInRange: forwardRange];
currSize -= forwardRange.length;
}
// Toss the first item if the list is getting too big, as long as we're not using it
- if (currSize == _maximumSize && _current != 0) {
- WebHistoryItem *item = [_entries objectAtIndex: 0];
+ if (currSize == _private->maximumSize && _private->current != 0) {
+ WebHistoryItem *item = [_private->entries objectAtIndex: 0];
[item setHasPageCache: NO];
- [_entries removeObjectAtIndex:0];
+ [_private->entries removeObjectAtIndex:0];
currSize--;
- _current--;
+ _private->current--;
}
- [_entries addObject:entry];
- _current++;
+ [_private->entries addObject:entry];
+ _private->current++;
}
- (void)goBack
{
- ASSERT(_current > 0);
- _current--;
+ ASSERT(_private->current > 0);
+ _private->current--;
}
- (void)goForward
{
- ASSERT(_current < (int)[_entries count]-1);
- _current++;
+ ASSERT(_private->current < (int)[_private->entries count]-1);
+ _private->current++;
}
-- (void)goToEntry:(WebHistoryItem *)entry
+- (void)goToItem:(WebHistoryItem *)entry
{
- int index = [_entries indexOfObjectIdenticalTo:entry];
+ int index = [_private->entries indexOfObjectIdenticalTo:entry];
ASSERT(index != NSNotFound);
- _current = index;
+ _private->current = index;
}
-- (WebHistoryItem *)backEntry
+- (WebHistoryItem *)backItem
{
- if (_current > 0) {
- return [_entries objectAtIndex:_current-1];
+ if (_private->current > 0) {
+ return [_private->entries objectAtIndex:_private->current-1];
} else {
return nil;
}
}
-- (WebHistoryItem *)currentEntry;
+- (WebHistoryItem *)currentItem
{
- if (_current >= 0) {
- return [_entries objectAtIndex:_current];
+ if (_private->current >= 0) {
+ return [_private->entries objectAtIndex:_private->current];
} else {
return nil;
}
}
-- (WebHistoryItem *)forwardEntry
+- (WebHistoryItem *)forwardItem
{
- if (_current < (int)[_entries count]-1) {
- return [_entries objectAtIndex:_current+1];
+ if (_private->current < (int)[_private->entries count]-1) {
+ return [_private->entries objectAtIndex:_private->current+1];
} else {
return nil;
}
}
-- (BOOL)containsEntry:(WebHistoryItem *)entry
+- (BOOL)containsItem:(WebHistoryItem *)entry
{
- return [_entries indexOfObjectIdenticalTo:entry] != NSNotFound;
+ return [_private->entries indexOfObjectIdenticalTo:entry] != NSNotFound;
}
- (NSArray *)backListWithSizeLimit:(int)limit;
{
- if (_current > 0) {
+ if (_private->current > 0) {
NSRange r;
- r.location = MAX(_current-limit, 0);
- r.length = _current - r.location;
- return [_entries subarrayWithRange:r];
+ r.location = MAX(_private->current-limit, 0);
+ r.length = _private->current - r.location;
+ return [_private->entries subarrayWithRange:r];
} else {
return nil;
}
@@ -132,12 +158,12 @@
- (NSArray *)forwardListWithSizeLimit:(int)limit;
{
- int lastEntry = (int)[_entries count]-1;
- if (_current < lastEntry) {
+ int lastEntry = (int)[_private->entries count]-1;
+ if (_private->current < lastEntry) {
NSRange r;
- r.location = _current+1;
- r.length = MIN(_current+limit, lastEntry) - _current;
- return [_entries subarrayWithRange:r];
+ r.location = _private->current+1;
+ r.length = MIN(_private->current+limit, lastEntry) - _private->current;
+ return [_private->entries subarrayWithRange:r];
} else {
return nil;
}
@@ -145,12 +171,12 @@
- (int)maximumSize
{
- return _maximumSize;
+ return _private->maximumSize;
}
- (void)setMaximumSize:(int)size
{
- _maximumSize = size;
+ _private->maximumSize = size;
}
@@ -164,8 +190,8 @@
[result appendString:@"\n--------------------------------------------\n"];
[result appendString:@"WebBackForwardList:\n"];
- for (i = 0; i < (int)[_entries count]; i++) {
- if (i == _current) {
+ for (i = 0; i < (int)[_private->entries count]; i++) {
+ if (i == _private->current) {
[result appendString:@" >>>"];
}
else {
@@ -173,7 +199,7 @@
}
[result appendFormat:@"%2d) ", i];
int currPos = [result length];
- [result appendString:[[_entries objectAtIndex:i] description]];
+ [result appendString:[[_private->entries objectAtIndex:i] description]];
// shift all the contents over. a bit slow, but this is for debugging
NSRange replRange = {currPos, [result length]-currPos};
@@ -190,28 +216,26 @@
- (void)clearPageCache
{
int i;
- for (i = 0; i < (int)[_entries count]; i++) {
- [[_entries objectAtIndex:i] setHasPageCache:NO];
+ for (i = 0; i < (int)[_private->entries count]; i++) {
+ [[_private->entries objectAtIndex:i] setHasPageCache:NO];
}
[WebHistoryItem _releaseAllPendingPageCaches];
}
-static BOOL pageCacheSizeModified = NO;
-static unsigned pageCacheSize = 4;
-+ (void)setPageCacheSize: (unsigned)size
+- (void)setPageCacheSize: (unsigned)size
{
- pageCacheSizeModified = YES;
- pageCacheSize = size;
+ _private->pageCacheSizeModified = YES;
+ _private->pageCacheSize = size;
}
#ifndef NDEBUG
static BOOL loggedPageCacheSize = NO;
#endif
-+ (unsigned)pageCacheSize
+- (unsigned)pageCacheSize
{
- if (!pageCacheSizeModified){
+ if (!_private->pageCacheSizeModified){
unsigned s;
vm_size_t memSize = WebSystemMainMemory();
unsigned multiplier = 1;
@@ -231,44 +255,43 @@ static BOOL loggedPageCacheSize = NO;
return s * multiplier;
}
- return pageCacheSize;
+ return _private->pageCacheSize;
}
// On be default for now.
-static BOOL usesPageCache = YES;
-+ (void)setUsesPageCache: (BOOL)f
+- (void)setUsesPageCache: (BOOL)f
{
- usesPageCache = f ? YES : NO;
+ _private->usesPageCache = f ? YES : NO;
}
-+ (BOOL)usesPageCache
+- (BOOL)usesPageCache
{
- if ([WebBackForwardList pageCacheSize] == 0)
+ if ([self pageCacheSize] == 0)
return NO;
- return usesPageCache;
+ return _private->usesPageCache;
}
- (int)backListCount
{
- return _current;
+ return _private->current;
}
- (int)forwardListCount
{
- return (int)[_entries count] - (_current + 1);
+ return (int)[_private->entries count] - (_private->current + 1);
}
-- (WebHistoryItem *)entryAtIndex:(int)index
+- (WebHistoryItem *)itemAtIndex:(int)index
{
// Do range checks without doing math on index to avoid overflow.
- if (index < -_current) {
+ if (index < -_private->current) {
return nil;
}
if (index > [self forwardListCount]) {
return nil;
}
- return [_entries objectAtIndex:index + _current];
+ return [_private->entries objectAtIndex:index + _private->current];
}
@end
diff --git a/WebKit/History.subproj/WebHistory.h b/WebKit/History.subproj/WebHistory.h
index 40d0e06..34c7578 100644
--- a/WebKit/History.subproj/WebHistory.h
+++ b/WebKit/History.subproj/WebHistory.h
@@ -13,12 +13,12 @@
// The first two come with a userInfo dictionary with a single key "Entries", which contains
// an array of entries that were added or removed.
-// posted from addEntry: and addEntries:
-extern NSString *WebHistoryEntriesAddedNotification;
-// posted from removeEntry: and removeEntries:
-extern NSString *WebHistoryEntriesRemovedNotification;
-// posted from removeAllEntries
-extern NSString *WebHistoryAllEntriesRemovedNotification;
+// posted from addItems:
+extern NSString *WebHistoryItemsAddedNotification;
+// posted from and removeItemss:
+extern NSString *WebHistoryItemsRemovedNotification;
+// posted from removeAllItems
+extern NSString *WebHistoryAllItemsRemovedNotification;
// posted from loadHistory
extern NSString *WebHistoryLoadedNotification;
@@ -44,43 +44,31 @@ extern NSString *WebHistoryLoadedNotification;
@param file The file to use to initialize the WebHistory.
@result Returns a WebHistory initialized with the contents of file.
*/
-+ (WebHistory *)createSharedHistoryWithFile: (NSString*)file;
++ (void)setSharedHistory:(WebHistory *)file;
/*!
@method initWithFile:
@abstract The designated initializer for WebHistory.
@result Returns an initialized WebHistory.
*/
-- initWithFile: (NSString *)file;
-
-/*!
- @method addEntry:
- @param entry The history item to add to the WebHistory.
-*/
-- (void)addEntry: (WebHistoryItem *)entry;
+- initWithFile:(NSString *)file;
/*!
@method addEntries:
@param newEntries An array of WebHistoryItems to add to the WebHistory.
*/
-- (void)addEntries:(NSArray *)newEntries;
-
-/*!
- @method removeEntry:
- @param entry The WebHistoryItem to remove from the WebHistory.
-*/
-- (void)removeEntry: (WebHistoryItem *)entry;
+- (void)addItems:(NSArray *)newEntries;
/*!
@method removeEntries:
@param entries An array of WebHistoryItems to remove from the WebHistory.
*/
-- (void)removeEntries: (NSArray *)entries;
+- (void)removeItems:(NSArray *)entries;
/*!
@method removeAllEntries
*/
-- (void)removeAllEntries;
+- (void)removeAllItems;
/*!
@method orderedLastVisitedDays
@@ -97,7 +85,7 @@ extern NSString *WebHistoryLoadedNotification;
@param calendarDate A date identifying the unique day of interest.
@result Returns an array of WebHistoryItems last visited on the indicated day.
*/
-- (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)calendarDate;
+- (NSArray *)orderedItemsLastVisitedOnDay:(NSCalendarDate *)calendarDate;
/*!
@method containsURL:
@@ -106,7 +94,7 @@ extern NSString *WebHistoryLoadedNotification;
@discussion This method is useful for implementing a visited-link mechanism.
@result YES if WebHistory contains a history item for the given URL, otherwise NO.
*/
-- (BOOL)containsURL: (NSURL *)URL;
+- (BOOL)containsURL:(NSURL *)URL;
/*!
@method entryForURL:
@@ -114,7 +102,7 @@ extern NSString *WebHistoryLoadedNotification;
@param URL The URL of the history item to search for
@result Returns an item matching the URL
*/
-- (WebHistoryItem *)entryForURL:(NSURL *)URL;
+- (WebHistoryItem *)itemForURL:(NSURL *)URL;
/*!
@method file
diff --git a/WebKit/History.subproj/WebHistory.m b/WebKit/History.subproj/WebHistory.m
index 472b9e0..8e8a3a6 100644
--- a/WebKit/History.subproj/WebHistory.m
+++ b/WebKit/History.subproj/WebHistory.m
@@ -16,9 +16,9 @@
#import <WebCore/WebCoreHistory.h>
-NSString *WebHistoryEntriesAddedNotification = @"WebHistoryEntriesAddedNotification";
-NSString *WebHistoryEntriesRemovedNotification = @"WebHistoryEntriesRemovedNotification";
-NSString *WebHistoryAllEntriesRemovedNotification = @"WebHistoryAllEntriesRemovedNotification";
+NSString *WebHistoryItemsAddedNotification = @"WebHistoryItemsAddedNotification";
+NSString *WebHistoryItemsRemovedNotification = @"WebHistoryItemsRemovedNotification";
+NSString *WebHistoryAllItemsRemovedNotification = @"WebHistoryAllItemsRemovedNotification";
NSString *WebHistoryLoadedNotification = @"WebHistoryLoadedNotification";
static WebHistory *_sharedHistory = nil;
@@ -37,9 +37,9 @@ static WebHistory *_sharedHistory = nil;
return self;
}
-- (BOOL)containsEntryForURLString: (NSString *)URLString
+- (BOOL)containsItemForURLString: (NSString *)URLString
{
- return [history containsEntryForURLString: URLString];
+ return [history containsItemForURLString: URLString];
}
- (void)dealloc
@@ -58,15 +58,15 @@ static WebHistory *_sharedHistory = nil;
}
-+ (WebHistory *)createSharedHistoryWithFile: (NSString*)file
++ (void)setSharedHistory: (WebHistory *)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];
- [WebCoreHistory setHistoryProvider: [[[_WebCoreHistoryProvider alloc] initWithHistory: h] autorelease]];
- _sharedHistory = h;
-
- return h;
+ [WebCoreHistory setHistoryProvider: [[[_WebCoreHistoryProvider alloc] initWithHistory: history] autorelease]];
+ if (_sharedHistory != history){
+ [_sharedHistory release];
+ _sharedHistory = [history retain];
+ }
}
- (id)initWithFile: (NSString *)file;
@@ -93,51 +93,51 @@ static WebHistory *_sharedHistory = nil;
postNotificationName: name object: self userInfo: userInfo];
}
-- (WebHistoryItem *)addEntryForURL: (NSURL *)URL
+- (WebHistoryItem *)addItemForURL: (NSURL *)URL
{
WebHistoryItem *entry = [[WebHistoryItem alloc] initWithURL:URL title:nil];
- [self addEntry: entry];
+ [self addItem: entry];
[entry release];
return entry;
}
-- (void)addEntry: (WebHistoryItem *)entry
+- (void)addItem: (WebHistoryItem *)entry
{
- [_historyPrivate addEntry: entry];
- [self _sendNotification: WebHistoryEntriesAddedNotification
+ [_historyPrivate addItem: entry];
+ [self _sendNotification: WebHistoryItemsAddedNotification
entries: [NSArray arrayWithObject:entry]];
}
-- (void)removeEntry: (WebHistoryItem *)entry
+- (void)removeItem: (WebHistoryItem *)entry
{
- if ([_historyPrivate removeEntry: entry]) {
- [self _sendNotification: WebHistoryEntriesRemovedNotification
+ if ([_historyPrivate removeItem: entry]) {
+ [self _sendNotification: WebHistoryItemsRemovedNotification
entries: [NSArray arrayWithObject:entry]];
}
}
-- (void)removeEntries: (NSArray *)entries
+- (void)removeItems: (NSArray *)entries
{
- if ([_historyPrivate removeEntries:entries]) {
- [self _sendNotification: WebHistoryEntriesRemovedNotification
+ if ([_historyPrivate removeItems:entries]) {
+ [self _sendNotification: WebHistoryItemsRemovedNotification
entries: entries];
}
}
-- (void)removeAllEntries
+- (void)removeAllItems
{
- if ([_historyPrivate removeAllEntries]) {
+ if ([_historyPrivate removeAllItems]) {
[[NSNotificationCenter defaultCenter]
- postNotificationName: WebHistoryAllEntriesRemovedNotification
+ postNotificationName: WebHistoryAllItemsRemovedNotification
object: self];
}
}
-- (void)addEntries:(NSArray *)newEntries
+- (void)addItems:(NSArray *)newEntries
{
- [_historyPrivate addEntries:newEntries];
- [self _sendNotification: WebHistoryEntriesAddedNotification
+ [_historyPrivate addItems:newEntries];
+ [self _sendNotification: WebHistoryItemsAddedNotification
entries: newEntries];
}
@@ -148,16 +148,16 @@ static WebHistory *_sharedHistory = nil;
return [_historyPrivate orderedLastVisitedDays];
}
-- (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)date
+- (NSArray *)orderedItemsLastVisitedOnDay: (NSCalendarDate *)date
{
- return [_historyPrivate orderedEntriesLastVisitedOnDay: date];
+ return [_historyPrivate orderedItemsLastVisitedOnDay: date];
}
#pragma mark URL MATCHING
-- (BOOL)containsEntryForURLString: (NSString *)URLString
+- (BOOL)containsItemForURLString: (NSString *)URLString
{
- return [_historyPrivate containsEntryForURLString: URLString];
+ return [_historyPrivate containsItemForURLString: URLString];
}
- (BOOL)containsURL: (NSURL *)URL
@@ -165,9 +165,9 @@ static WebHistory *_sharedHistory = nil;
return [_historyPrivate containsURL: URL];
}
-- (WebHistoryItem *)entryForURL:(NSURL *)URL
+- (WebHistoryItem *)itemForURL:(NSURL *)URL
{
- return [_historyPrivate entryForURL:URL];
+ return [_historyPrivate itemForURL:URL];
}
#pragma mark SAVING TO DISK
diff --git a/WebKit/History.subproj/WebHistoryItem.h b/WebKit/History.subproj/WebHistoryItem.h
index cd09390..8025d43 100644
--- a/WebKit/History.subproj/WebHistoryItem.h
+++ b/WebKit/History.subproj/WebHistoryItem.h
@@ -36,7 +36,11 @@
// info used to repost form data
NSData *_formData;
NSString *_formContentType;
- NSString *_formReferrer;
+ NSString *_formReferrer;
+ void *_reserved1;
+ void *_reserved2;
+ void *_reserved3;
+ void *_reserved4;
}
/*!
diff --git a/WebKit/History.subproj/WebHistoryPrivate.h b/WebKit/History.subproj/WebHistoryPrivate.h
index e8d8ad2..f12960f 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.h
+++ b/WebKit/History.subproj/WebHistoryPrivate.h
@@ -22,17 +22,17 @@
- (id)initWithFile: (NSString *)file;
-- (void)addEntry: (WebHistoryItem *)entry;
-- (void)addEntries:(NSArray *)newEntries;
-- (BOOL)removeEntry: (WebHistoryItem *)entry;
-- (BOOL)removeEntries: (NSArray *)entries;
-- (BOOL)removeAllEntries;
+- (void)addItem: (WebHistoryItem *)entry;
+- (void)addItems:(NSArray *)newEntries;
+- (BOOL)removeItem: (WebHistoryItem *)entry;
+- (BOOL)removeItems: (NSArray *)entries;
+- (BOOL)removeAllItems;
- (NSArray *)orderedLastVisitedDays;
-- (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)calendarDate;
-- (BOOL)containsEntryForURLString: (NSString *)URLString;
+- (NSArray *)orderedItemsLastVisitedOnDay: (NSCalendarDate *)calendarDate;
+- (BOOL)containsItemForURLString: (NSString *)URLString;
- (BOOL)containsURL: (NSURL *)URL;
-- (WebHistoryItem *)entryForURL:(NSURL *)URL;
+- (WebHistoryItem *)itemForURL:(NSURL *)URL;
- (NSString *)file;
- (BOOL)loadHistory;
@@ -41,8 +41,11 @@
@end
@interface WebHistory (WebPrivate)
+- (void)removeItem: (WebHistoryItem *)entry;
+- (void)addItem: (WebHistoryItem *)entry;
+
- (BOOL)loadHistory;
- initWithFile: (NSString *)file;
-- (WebHistoryItem *)addEntryForURL: (NSURL *)URL;
-- (BOOL)containsEntryForURLString: (NSString *)URLString;
+- (WebHistoryItem *)addItemForURL: (NSURL *)URL;
+- (BOOL)containsItemForURLString: (NSString *)URLString;
@end
diff --git a/WebKit/History.subproj/WebHistoryPrivate.m b/WebKit/History.subproj/WebHistoryPrivate.m
index 9aa7a29..e98315f 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.m
+++ b/WebKit/History.subproj/WebHistoryPrivate.m
@@ -87,7 +87,7 @@
return NO;
}
-- (void)insertEntry: (WebHistoryItem *)entry atDateIndex: (int)dateIndex
+- (void)insertItem: (WebHistoryItem *)entry atDateIndex: (int)dateIndex
{
int index, count;
NSMutableArray *entriesForDate;
@@ -110,7 +110,7 @@
[entriesForDate insertObject: entry atIndex: index];
}
-- (BOOL)removeEntryForURLString: (NSString *)URLString
+- (BOOL)removeItemForURLString: (NSString *)URLString
{
NSMutableArray *entriesForDate;
WebHistoryItem *entry;
@@ -141,7 +141,7 @@
}
-- (void)addEntry: (WebHistoryItem *)entry
+- (void)addItem: (WebHistoryItem *)entry
{
int dateIndex;
NSString *URLString;
@@ -153,11 +153,11 @@
#else
URLString = [[entry URL] absoluteString];
#endif
- [self removeEntryForURLString: URLString];
+ [self removeItemForURLString: URLString];
if ([self findIndex: &dateIndex forDay: [entry lastVisitedDate]]) {
// other entries already exist for this date
- [self insertEntry: entry atDateIndex: dateIndex];
+ [self insertItem: entry atDateIndex: dateIndex];
} else {
// no other entries exist for this date
[_datesWithEntries insertObject: [entry lastVisitedDate] atIndex: dateIndex];
@@ -167,7 +167,7 @@
[_entriesByURL setObject: entry forKey: URLString];
}
-- (BOOL)removeEntry: (WebHistoryItem *)entry
+- (BOOL)removeItem: (WebHistoryItem *)entry
{
WebHistoryItem *matchingEntry;
NSString *URLString;
@@ -186,12 +186,12 @@
return NO;
}
- [self removeEntryForURLString: URLString];
+ [self removeItemForURLString: URLString];
return YES;
}
-- (BOOL)removeEntries: (NSArray *)entries
+- (BOOL)removeItems: (NSArray *)entries
{
int index, count;
@@ -201,13 +201,13 @@
}
for (index = 0; index < count; ++index) {
- [self removeEntry:[entries objectAtIndex:index]];
+ [self removeItem:[entries objectAtIndex:index]];
}
return YES;
}
-- (BOOL)removeAllEntries
+- (BOOL)removeAllItems
{
if ([_entriesByURL count] == 0) {
return NO;
@@ -220,19 +220,19 @@
return YES;
}
-- (void)addEntries:(NSArray *)newEntries
+- (void)addItems:(NSArray *)newEntries
{
NSEnumerator *enumerator;
WebHistoryItem *entry;
// There is no guarantee that the incoming entries are in any particular
// order, but if this is called with a set of entries that were created by
- // iterating through the results of orderedLastVisitedDays and orderedEntriesLastVisitedOnDayy
+ // iterating through the results of orderedLastVisitedDays and orderedItemsLastVisitedOnDayy
// then they will be ordered chronologically from newest to oldest. We can make adding them
// faster (fewer compares) by inserting them from oldest to newest.
enumerator = [newEntries reverseObjectEnumerator];
while ((entry = [enumerator nextObject]) != nil) {
- [self addEntry:entry];
+ [self addItem:entry];
}
}
@@ -243,7 +243,7 @@
return _datesWithEntries;
}
-- (NSArray *)orderedEntriesLastVisitedOnDay: (NSCalendarDate *)date
+- (NSArray *)orderedItemsLastVisitedOnDay: (NSCalendarDate *)date
{
int index;
@@ -261,7 +261,7 @@
return [_entriesByURL objectForKey: URLString];
}
-- (BOOL)containsEntryForURLString: (NSString *)URLString
+- (BOOL)containsItemForURLString: (NSString *)URLString
{
return [self _entryForURLString:URLString] != nil;
}
@@ -275,7 +275,7 @@
#endif
}
-- (WebHistoryItem *)entryForURL:(NSURL *)URL
+- (WebHistoryItem *)itemForURL:(NSURL *)URL
{
#ifdef FIX_VISITED
return [self _entryForURLString:[[URL _web_canonicalize] absoluteString]];
@@ -396,7 +396,7 @@
}
}
- [self addEntry: entry];
+ [self addItem: entry];
if (++index >= limit) {
break;
}
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 51305ca..5665822 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -722,17 +722,17 @@ static BOOL loggedObjectCacheSize = NO;
}
WebView *controller = [frame webView];
WebBackForwardList *list = [controller backForwardList];
- WebHistoryItem *item = [list entryAtIndex:distance];
+ WebHistoryItem *item = [list itemAtIndex:distance];
if (!item) {
if (distance > 0) {
int forwardListCount = [list forwardListCount];
if (forwardListCount > 0) {
- item = [list entryAtIndex:forwardListCount];
+ item = [list itemAtIndex:forwardListCount];
}
} else {
int backListCount = [list forwardListCount];
if (backListCount > 0) {
- item = [list entryAtIndex:-backListCount];
+ item = [list itemAtIndex:-backListCount];
}
}
}
diff --git a/WebKit/WebKit.exp b/WebKit/WebKit.exp
index 50f2357..dc2e7d4 100644
--- a/WebKit/WebKit.exp
+++ b/WebKit/WebKit.exp
@@ -42,9 +42,9 @@ _WebElementLinkTargetFrameKey
_WebElementLinkTitleKey
_WebElementLinkURLKey
_WebErrorDomainWebKit
-_WebHistoryAllEntriesRemovedNotification
-_WebHistoryEntriesAddedNotification
-_WebHistoryEntriesRemovedNotification
+_WebHistoryAllItemsRemovedNotification
+_WebHistoryItemsAddedNotification
+_WebHistoryItemsRemovedNotification
_WebHistoryLoadedNotification
_WebIconDatabaseDidAddIconNotification
_WebIconLargeSize
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 3425599..4521207 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -565,14 +565,14 @@
3944607D020F50ED0ECA1767,
3944607E020F50ED0ECA1767,
F520FB190221DEFD01C1A525,
- F5B92B820223191D01C1A525,
F520FB1A0221DEFD01C1A525,
- F5B92B830223191D01C1A525,
3944607F020F50ED0ECA1767,
39446080020F50ED0ECA1767,
+ 516F296F03A6C45A00CA2D3A,
+ F5B92B820223191D01C1A525,
+ F5B92B830223191D01C1A525,
F5E0A76E02B8FEE401C1A525,
F5E0A76F02B8FEE401C1A525,
- 516F296F03A6C45A00CA2D3A,
);
isa = PBXGroup;
name = History;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 1965ecb..d202154 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -298,7 +298,7 @@
if (_private->committed) {
WebHistoryItem *entry;
NSURL *canonURL = [[[self _originalRequest] URL] _web_canonicalize];
- entry = [[WebHistory sharedHistory] entryForURL: canonURL];
+ entry = [[WebHistory sharedHistory] itemForURL: canonURL];
[entry setTitle: _private->pageTitle];
// Must update the entries in the back-forward list too.
diff --git a/WebKit/WebView.subproj/WebFrameLoadDelegate.h b/WebKit/WebView.subproj/WebFrameLoadDelegate.h
index 6c63648..7f3943d 100644
--- a/WebKit/WebView.subproj/WebFrameLoadDelegate.h
+++ b/WebKit/WebView.subproj/WebFrameLoadDelegate.h
@@ -26,7 +26,7 @@
@discussion You can find out the URL and other parameters of the location change
from the data source object.
*/
-- (void)webView: (WebView *)webView locationChangeStartedForDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender locationChangeStartedForDataSource:(WebDataSource *)dataSource;
/*!
@method serverRedirectedTo:forDataSource:
@@ -34,7 +34,7 @@
@param dataSource The data source for which the redirect occurred
@discussion You can find the new URL from the data source object.
*/
-- (void)webView: (WebView *)webView serverRedirectedForDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender serverRedirectedForDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangeCommittedForDataSource:
@@ -47,7 +47,7 @@
page fails to load completely.
*/
-- (void)webView: (WebView *)webView locationChangeCommittedForDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender locationChangeCommittedForDataSource:(WebDataSource *)dataSource;
/*!
@method receivedPageTitle:forDataSource:
@@ -56,7 +56,7 @@
@param dataSource The data source for which the title changed
@discussion The title may update during loading; clients should be prepared for this.
*/
-- (void)webView: (WebView *)webView receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource;
/*!
@method receivedPageIcon:forDataSource:
@@ -68,7 +68,7 @@
default or stored image and changing on a refresh.
*/
-- (void)webView: (WebView *)webView receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangeDone:forDataSource:
@@ -79,7 +79,7 @@
@discussion This callback will only be received when all
subresources are done loading.
*/
-- (void)webView: (WebView *)webView locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource;
/*!
@method willCloseLocationForDataSource:
@@ -89,7 +89,7 @@
@discussion This callback happens right before WebKit is done with the data source
and the document representation that it contains.
*/
-- (void)webView: (WebView *)webView willCloseLocationForDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender willCloseLocationForDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangedWithinPageForDataSource:
@@ -100,7 +100,7 @@
@discussion This is normally used for clicks on anchors within a page
that is already displayed. You can find the new URL from the data source object.
*/
-- (void)webView: (WebView *)webView locationChangedWithinPageForDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender locationChangedWithinPageForDataSource:(WebDataSource *)dataSource;
/*!
@method clientWillRedirectTo:delay:fireDate:forFrame:
@@ -114,7 +114,7 @@
going while a client redirect is pending. A client redirect might
be cancelled before it fires - see clientRedirectCancelledForFrame.
*/
-- (void)webView: (WebView *)webView clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame;
+- (void)webView:(WebView *)sender clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame;
/*!
@method clientRedirectCancelledForFrame:
@@ -124,7 +124,7 @@
@discussion A client redirect can be cancelled if the frame
changes locations before the timeout.
*/
-- (void)webView: (WebView *)webView clientRedirectCancelledForFrame:(WebFrame *)frame;
+- (void)webView:(WebView *)sender clientRedirectCancelledForFrame:(WebFrame *)frame;
@end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 1701890..1711428 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -260,7 +260,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
- (WebHistoryItem *)_addBackForwardItemClippedAtTarget:(BOOL)doClip
{
WebHistoryItem *bfItem = [[[self webView] mainFrame] _createItemTreeWithTargetFrame:self clippedAtTarget:doClip];
- [[[self webView] backForwardList] addEntry:bfItem];
+ [[[self webView] backForwardList] addItem:bfItem];
return bfItem;
}
@@ -644,7 +644,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
// Add item to history.
NSURL *URL = [[[ds _originalRequest] URL] _web_canonicalize];
if ([[URL absoluteString] length] > 0) {
- entry = [[WebHistory sharedHistory] addEntryForURL:URL];
+ entry = [[WebHistory sharedHistory] addItemForURL:URL];
if (ptitle)
[entry setTitle: ptitle];
[self _addBackForwardItemClippedAtTarget:YES];
@@ -706,13 +706,13 @@ Repeat load of the same URL (by any other means of navigation other than the rel
- (BOOL)_canCachePage
{
- return [WebBackForwardList usesPageCache];
+ return [[[self webView] backForwardList] usesPageCache];
}
- (void)_purgePageCache
{
// This method implements the rule for purging the page cache.
- unsigned sizeLimit = [WebBackForwardList pageCacheSize];
+ unsigned sizeLimit = [[[self webView] backForwardList] pageCacheSize];
unsigned pagesCached = 0;
WebBackForwardList *backForwardList = [[self webView] backForwardList];
NSArray *backList = [backForwardList backListWithSizeLimit: 999999];
@@ -1200,11 +1200,11 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
{
ASSERT(!_private->parent);
WebBackForwardList *backForwardList = [[self webView] backForwardList];
- WebHistoryItem *currItem = [backForwardList currentEntry];
+ WebHistoryItem *currItem = [backForwardList currentItem];
// Set the BF cursor before commit, which lets the user quickly click back/forward again.
// - plus, it only makes sense for the top level of the operation through the frametree,
// as opposed to happening for some/one of the page commits that might happen soon
- [backForwardList goToEntry:item];
+ [backForwardList goToItem:item];
[self _recursiveGoToItem:item fromItem:currItem withLoadType:type];
}
@@ -1815,7 +1815,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
&& [_private currentItem]
&& self == [[self webView] mainFrame])
{
- [[[self webView] backForwardList] goToEntry:[_private currentItem]];
+ [[[self webView] backForwardList] goToItem:[_private currentItem]];
}
}
diff --git a/WebKit/WebView.subproj/WebLocationChangeDelegate.h b/WebKit/WebView.subproj/WebLocationChangeDelegate.h
index 6c63648..7f3943d 100644
--- a/WebKit/WebView.subproj/WebLocationChangeDelegate.h
+++ b/WebKit/WebView.subproj/WebLocationChangeDelegate.h
@@ -26,7 +26,7 @@
@discussion You can find out the URL and other parameters of the location change
from the data source object.
*/
-- (void)webView: (WebView *)webView locationChangeStartedForDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender locationChangeStartedForDataSource:(WebDataSource *)dataSource;
/*!
@method serverRedirectedTo:forDataSource:
@@ -34,7 +34,7 @@
@param dataSource The data source for which the redirect occurred
@discussion You can find the new URL from the data source object.
*/
-- (void)webView: (WebView *)webView serverRedirectedForDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender serverRedirectedForDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangeCommittedForDataSource:
@@ -47,7 +47,7 @@
page fails to load completely.
*/
-- (void)webView: (WebView *)webView locationChangeCommittedForDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender locationChangeCommittedForDataSource:(WebDataSource *)dataSource;
/*!
@method receivedPageTitle:forDataSource:
@@ -56,7 +56,7 @@
@param dataSource The data source for which the title changed
@discussion The title may update during loading; clients should be prepared for this.
*/
-- (void)webView: (WebView *)webView receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource;
/*!
@method receivedPageIcon:forDataSource:
@@ -68,7 +68,7 @@
default or stored image and changing on a refresh.
*/
-- (void)webView: (WebView *)webView receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangeDone:forDataSource:
@@ -79,7 +79,7 @@
@discussion This callback will only be received when all
subresources are done loading.
*/
-- (void)webView: (WebView *)webView locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource;
/*!
@method willCloseLocationForDataSource:
@@ -89,7 +89,7 @@
@discussion This callback happens right before WebKit is done with the data source
and the document representation that it contains.
*/
-- (void)webView: (WebView *)webView willCloseLocationForDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender willCloseLocationForDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangedWithinPageForDataSource:
@@ -100,7 +100,7 @@
@discussion This is normally used for clicks on anchors within a page
that is already displayed. You can find the new URL from the data source object.
*/
-- (void)webView: (WebView *)webView locationChangedWithinPageForDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender locationChangedWithinPageForDataSource:(WebDataSource *)dataSource;
/*!
@method clientWillRedirectTo:delay:fireDate:forFrame:
@@ -114,7 +114,7 @@
going while a client redirect is pending. A client redirect might
be cancelled before it fires - see clientRedirectCancelledForFrame.
*/
-- (void)webView: (WebView *)webView clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame;
+- (void)webView:(WebView *)sender clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame;
/*!
@method clientRedirectCancelledForFrame:
@@ -124,7 +124,7 @@
@discussion A client redirect can be cancelled if the frame
changes locations before the timeout.
*/
-- (void)webView: (WebView *)webView clientRedirectCancelledForFrame:(WebFrame *)frame;
+- (void)webView:(WebView *)sender clientRedirectCancelledForFrame:(WebFrame *)frame;
@end
diff --git a/WebKit/WebView.subproj/WebResourceLoadDelegate.h b/WebKit/WebView.subproj/WebResourceLoadDelegate.h
index 7340ab3..9f362cf 100644
--- a/WebKit/WebView.subproj/WebResourceLoadDelegate.h
+++ b/WebKit/WebView.subproj/WebResourceLoadDelegate.h
@@ -36,7 +36,7 @@
@result An identifier that will be passed back to the implementor for each callback.
The identifier will be retained.
*/
-- webView: (WebView *)webView identifierForInitialRequest: (WebRequest *)request fromDataSource: (WebDataSource *)dataSource;
+- webView:(WebView *)sender identifierForInitialRequest: (WebRequest *)request fromDataSource: (WebDataSource *)dataSource;
/*!
@method resource:willSendRequest:fromDataSource:
@@ -50,7 +50,7 @@
@result Returns the request, which may be mutated by the implementor, although typically
will be request.
*/
--(WebRequest *)webView: (WebView *)webView resource:identifier willSendRequest: (WebRequest *)request fromDataSource:(WebDataSource *)dataSource;
+-(WebRequest *)webView:(WebView *)sender resource:identifier willSendRequest: (WebRequest *)request fromDataSource:(WebDataSource *)dataSource;
/*!
@method resource:didReceiveResponse:fromDataSource:
@@ -61,7 +61,7 @@
@param response The response for the request.
@param dataSource The dataSource that initiated the load.
*/
--(void)webView: (WebView *)webView resource:identifier didReceiveResponse: (WebResponse *)response fromDataSource:(WebDataSource *)dataSource;
+-(void)webView:(WebView *)sender resource:identifier didReceiveResponse: (WebResponse *)response fromDataSource:(WebDataSource *)dataSource;
/*!
@method resource:didReceiveContentLength:fromDataSource:
@@ -72,7 +72,7 @@
@param length The amount of new data received. This is not the total amount, just the new amount received.
@param dataSource The dataSource that initiated the load.
*/
--(void)webView: (WebView *)webView resource:identifier didReceiveContentLength: (unsigned)length fromDataSource:(WebDataSource *)dataSource;
+-(void)webView:(WebView *)sender resource:identifier didReceiveContentLength: (unsigned)length fromDataSource:(WebDataSource *)dataSource;
/*!
@method resource:didFinishLoadingFromDataSource:
@@ -82,7 +82,7 @@
multiple call backs.
@param dataSource The dataSource that initiated the load.
*/
--(void)webView: (WebView *)webView resource:identifier didFinishLoadingFromDataSource:(WebDataSource *)dataSource;
+-(void)webView:(WebView *)sender resource:identifier didFinishLoadingFromDataSource:(WebDataSource *)dataSource;
/*!
@method resource:didFailLoadingWithError:fromDataSource:
@@ -93,7 +93,7 @@
@param error The error associated with this load.
@param dataSource The dataSource that initiated the load.
*/
--(void)webView: (WebView *)webView resource:identifier didFailLoadingWithError:(WebError *)error fromDataSource:(WebDataSource *)dataSource;
+-(void)webView:(WebView *)sender resource:identifier didFailLoadingWithError:(WebError *)error fromDataSource:(WebDataSource *)dataSource;
/*!
@method pluginFailedWithError:dataSource:
@@ -102,7 +102,7 @@
@param error The plug-in error.
@param dataSource The dataSource that contains the plug-in.
*/
-- (void)webView: (WebView *)webView pluginFailedWithError:(WebPluginError *)error dataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender pluginFailedWithError:(WebPluginError *)error dataSource:(WebDataSource *)dataSource;
@end
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 1a4e699..1f0d4ae 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -203,7 +203,7 @@ extern NSString *WebElementLinkLabelKey; // NSString of the text within the anch
@abstract Enable or disable the use of a backforward list for this controller.
@param flag Turns use of the back forward list on or off
*/
-- (void)setUsesBackForwardList: (BOOL)flag;
+- (void)setMaintainsBackForwardList: (BOOL)flag;
/*!
@method goBack
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 88420b4..3ad2fa6 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -76,7 +76,7 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
[WebControllerSets addController:self toSetNamed:_private->controllerSetName];
}
- [self setUsesBackForwardList: YES];
+ [self setMaintainsBackForwardList: YES];
++WebControllerCount;
@@ -212,7 +212,7 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
return nil;
}
-- (void)setUsesBackForwardList: (BOOL)flag
+- (void)setMaintainsBackForwardList: (BOOL)flag
{
_private->useBackForwardList = flag;
}
@@ -229,7 +229,7 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
- (BOOL)goBack
{
- WebHistoryItem *item = [[self backForwardList] backEntry];
+ WebHistoryItem *item = [[self backForwardList] backItem];
if (item){
[self _goToItem: item withLoadType: WebFrameLoadTypeBack];
@@ -240,7 +240,7 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
- (BOOL)goForward
{
- WebHistoryItem *item = [[self backForwardList] forwardEntry];
+ WebHistoryItem *item = [[self backForwardList] forwardItem];
if (item){
[self _goToItem: item withLoadType: WebFrameLoadTypeForward];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list