[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:08:50 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit e1a5bc6de55cdeb6c90ae383a524ca38cc1714b6
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 26 09:25:59 2002 +0000
WebBrowser
Added some logging to indicate when page cache is turned on.
* Debug/DebugUtilities.m:
(-[BrowserDocument toggleBackForwardEnabled:]):
WebKit
More work on back/forward cache. It's ready for
more general testing. Although, to be safe I've
left it disabled by default for tomorrow's release.
It will log when a page is save and restored from
the page cache.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge saveDocumentToPageCache:]):
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _startLoading:]):
(-[WebDataSource _commitIfReady:]):
(-[WebDataSource _loadIcon]):
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _transitionToCommitted:]):
(-[WebFrame _setState:]):
(-[WebFrame _loadItem:fromItem:withLoadType:]):
(-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):
(-[WebFrame _setProvisionalDataSource:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 73c1de0..7c06c6b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,25 @@
+2002-11-26 Richard Williamson <rjw at apple.com>
+
+ More work on back/forward cache. It's ready for
+ more general testing. Although, to be safe I've
+ left it disabled by default for tomorrow's release.
+ It will log when a page is save and restored from
+ the page cache.
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge saveDocumentToPageCache:]):
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _startLoading:]):
+ (-[WebDataSource _commitIfReady:]):
+ (-[WebDataSource _loadIcon]):
+ * WebView.subproj/WebFramePrivate.h:
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _transitionToCommitted:]):
+ (-[WebFrame _setState:]):
+ (-[WebFrame _loadItem:fromItem:withLoadType:]):
+ (-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):
+ (-[WebFrame _setProvisionalDataSource:]):
+
2002-11-25 Richard Williamson <rjw at apple.com>
Cleanup leaking objects in page cache.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 73c1de0..7c06c6b 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,25 @@
+2002-11-26 Richard Williamson <rjw at apple.com>
+
+ More work on back/forward cache. It's ready for
+ more general testing. Although, to be safe I've
+ left it disabled by default for tomorrow's release.
+ It will log when a page is save and restored from
+ the page cache.
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge saveDocumentToPageCache:]):
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _startLoading:]):
+ (-[WebDataSource _commitIfReady:]):
+ (-[WebDataSource _loadIcon]):
+ * WebView.subproj/WebFramePrivate.h:
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _transitionToCommitted:]):
+ (-[WebFrame _setState:]):
+ (-[WebFrame _loadItem:fromItem:withLoadType:]):
+ (-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):
+ (-[WebFrame _setProvisionalDataSource:]):
+
2002-11-25 Richard Williamson <rjw at apple.com>
Cleanup leaking objects in page cache.
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 8b84f84..a500840 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -326,12 +326,10 @@
{
WebHistoryItem *item = [frame _itemForSavingDocState];
if (![item hasPageCache]){
- printf ("WebBridge saveDocumentToPageCache: not saving\n");
return false;
}
ASSERT ([[item pageCache] objectForKey: @"WebCorePageState"] == nil);
[[item pageCache] setObject: documentInfo forKey: @"WebCorePageState"];
- printf ("WebBridge saveDocumentToPageCache: saving\n");
return true;
}
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index f862a6f..3d542de 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -159,7 +159,7 @@
[self _commitIfReady: pageCache];
}
else if (!_private->mainClient) {
- if ([self webFrame] == [[self controller] mainFrame]) {
+ if ([self webFrame] == [[self controller] mainFrame]) {
[_private->request setCookiePolicyBaseURL:[self URL]];
} else {
[_private->request setCookiePolicyBaseURL:[[[_private->controller mainFrame] dataSource] URL]];
@@ -457,12 +457,11 @@
[[self webFrame] _transitionToCommitted: pageCache];
- if (pageCache){
- WebDataSource *ds = [pageCache objectForKey: @"WebKitDataSource"];
- [[ds _bridge] openURL:[[_private->response URL] absoluteString] reload:reload headers:headers lastModified:nil pageCache: pageCache];
- }
- else
- [[self _bridge] openURL:[[_private->response URL] absoluteString] reload:reload headers:headers lastModified:[_private->response lastModifiedDate] pageCache: pageCache];
+ [[self _bridge] openURL:[[_private->response URL] absoluteString]
+ reload:reload
+ headers:headers
+ lastModified: (pageCache ? nil : [_private->response lastModifiedDate])
+ pageCache: pageCache];
}
}
@@ -517,9 +516,7 @@
- (void)_loadIcon
{
- ASSERT(!_private->iconLoader);
-
- if([self webFrame] != [[self controller] mainFrame] || _private->mainDocumentError){
+ if([self webFrame] != [[self controller] mainFrame] || _private->mainDocumentError || _private->iconLoader){
return;
}
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index fe08270..ff14ef8 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -156,6 +156,8 @@ typedef enum {
- (void)_setJustOpenedForTargetedLink:(BOOL)justOpened;
+- (void)_setProvisionalDataSource: (WebDataSource *)d;
+
- (BOOL)_canCachePage;
- (void)_purgePageCache;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index e4adb48..30e7aaa 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -426,15 +426,7 @@ static const char * const stateNames[] = {
}
// Set the committed data source on the frame.
- // Use the datasource from the pageCache if present, otherwise
- // the provisional becomes the committed datasource.
- if (pageCache){
- WebDataSource *cachedDataSource = [pageCache objectForKey: @"WebKitDataSource"];
- ASSERT (cachedDataSource != nil);
- [self _setDataSource: cachedDataSource];
- }
- else
- [self _setDataSource:_private->provisionalDataSource];
+ [self _setDataSource:_private->provisionalDataSource];
[_private setProvisionalDataSource: nil];
@@ -529,6 +521,12 @@ static const char * const stateNames[] = {
ASSERT_NOT_REACHED();
}
}
+
+
+ if (pageCache){
+ [[self dataSource] _setPrimaryLoadComplete: YES];
+ [self _isLoadComplete];
+ }
}
- (BOOL)_canCachePage
@@ -592,7 +590,7 @@ static const char * const stateNames[] = {
// Cache the page, if possible.
if ([self _canCachePage] && [_private->bridge canCachePage] && [_private currentItem]){
if (![[_private currentItem] pageCache]){
- NSLog (@"saving page cache for %@, %@", [self name], [[self dataSource] URL]);
+ printf ("Saving page to back/forward cache, %s\n", [[[[self dataSource] URL] absoluteString] cString]);
[[_private currentItem] setHasPageCache: YES];
[[self dataSource] _setStoredInPageCache: YES];
[[[_private currentItem] pageCache] setObject: [self dataSource] forKey: @"WebKitDataSource"];
@@ -600,9 +598,6 @@ static const char * const stateNames[] = {
[_private->bridge saveDocumentToPageCache];
[self _purgePageCache];
}
- else {
- NSLog (@"already have page cache for %@, %@", [self name], [[self dataSource] URL]);
- }
}
}
@@ -856,44 +851,51 @@ static const char * const stateNames[] = {
[[[self controller] locationChangeDelegate] locationChangedWithinPageForDataSource:_private->dataSource];
} else {
- request = [[WebResourceRequest alloc] initWithURL:itemURL];
-
- // set the request cache policy based on the type of request we have
- // however, allow any previously set value to take precendence
- if ([request requestCachePolicy] == WebRequestCachePolicyUseProtocolDefault) {
- switch (type) {
- case WebFrameLoadTypeStandard:
- // if it's not a GET, reload from origin
- // unsure whether this is the best policy
- // other methods might be OK to get from the cache
- if (![[request method] _web_isCaseInsensitiveEqualToString:@"GET"]) {
- [request setRequestCachePolicy:WebRequestCachePolicyLoadFromOrigin];
- }
- break;
- case WebFrameLoadTypeReload:
- [request setRequestCachePolicy:WebRequestCachePolicyLoadFromOrigin];
- break;
- case WebFrameLoadTypeBack:
- case WebFrameLoadTypeForward:
- case WebFrameLoadTypeIndexedBackForward:
- [request setRequestCachePolicy:WebRequestCachePolicyReturnCacheObjectLoadFromOriginIfNoCacheObject];
- break;
- case WebFrameLoadTypeInternal:
- case WebFrameLoadTypeReloadAllowingStaleData:
- // no-op: leave as protocol default
- break;
- default:
- ASSERT_NOT_REACHED();
- }
- }
-
// Remember this item so we can traverse any child items as child frames load
[_private setProvisionalItem:item];
- WebDataSource *newDataSource = [[WebDataSource alloc] initWithRequest:request];
- [request release];
- [self _loadDataSource:newDataSource withLoadType:type];
- [newDataSource release];
+ WebDataSource *newDataSource;
+ if ([item hasPageCache]){
+ newDataSource = [[item pageCache] objectForKey: @"WebKitDataSource"];
+ [self _loadDataSource:newDataSource withLoadType:type];
+ }
+ else {
+ request = [[WebResourceRequest alloc] initWithURL:itemURL];
+
+ // set the request cache policy based on the type of request we have
+ // however, allow any previously set value to take precendence
+ if ([request requestCachePolicy] == WebRequestCachePolicyUseProtocolDefault) {
+ switch (type) {
+ case WebFrameLoadTypeStandard:
+ // if it's not a GET, reload from origin
+ // unsure whether this is the best policy
+ // other methods might be OK to get from the cache
+ if (![[request method] _web_isCaseInsensitiveEqualToString:@"GET"]) {
+ [request setRequestCachePolicy:WebRequestCachePolicyLoadFromOrigin];
+ }
+ break;
+ case WebFrameLoadTypeReload:
+ [request setRequestCachePolicy:WebRequestCachePolicyLoadFromOrigin];
+ break;
+ case WebFrameLoadTypeBack:
+ case WebFrameLoadTypeForward:
+ case WebFrameLoadTypeIndexedBackForward:
+ [request setRequestCachePolicy:WebRequestCachePolicyReturnCacheObjectLoadFromOriginIfNoCacheObject];
+ break;
+ case WebFrameLoadTypeInternal:
+ case WebFrameLoadTypeReloadAllowingStaleData:
+ // no-op: leave as protocol default
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+ }
+
+ newDataSource = [[WebDataSource alloc] initWithRequest:request];
+ [request release];
+ [self _loadDataSource:newDataSource withLoadType:type];
+ [newDataSource release];
+ }
}
}
@@ -1423,7 +1425,7 @@ static const char * const stateNames[] = {
loadType == WebFrameLoadTypeBack ||
loadType == WebFrameLoadTypeIndexedBackForward) &&
[[_private provisionalItem] hasPageCache]){
- printf ("Restoring page from state, %s\n", [[[[_private provisionalItem] URL] absoluteString] cString]);
+ printf ("Restoring page from back/forward cache, %s\n", [[[[_private provisionalItem] URL] absoluteString] cString]);
[_private->provisionalDataSource _startLoading: [[_private provisionalItem] pageCache]];
}
else
@@ -1473,4 +1475,10 @@ static const char * const stateNames[] = {
_private->justOpenedForTargetedLink = justOpened;
}
+- (void)_setProvisionalDataSource: (WebDataSource *)d
+{
+ [_private setProvisionalDataSource: d];
+}
+
+
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list