[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:22:10 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 1e5dcb3c44be496ee8c68d6dc3fdffb004517bf1
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 27 23:50:41 2003 +0000
Fixed 3139909. Fake the resource load delegate messages (minus willSendRequest)
when a page is loaded from a the page cache.
Reviewed by john.
* WebView.subproj/WebBaseResourceHandleDelegate.m:
(-[WebBaseResourceHandleDelegate handle:didReceiveResponse:]):
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSourcePrivate dealloc]):
(-[WebDataSource _addResponse:]):
(-[WebDataSource _responses]):
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _opened]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index cae6607..1b79d9a 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2003-01-27 Richard Williamson <rjw at apple.com>
+
+ Fixed 3139909. Fake the resource load delegate messages (minus willSendRequest)
+ when a page is loaded from a the page cache.
+
+ Reviewed by john.
+
+ * WebView.subproj/WebBaseResourceHandleDelegate.m:
+ (-[WebBaseResourceHandleDelegate handle:didReceiveResponse:]):
+ * WebView.subproj/WebDataSourcePrivate.h:
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSourcePrivate dealloc]):
+ (-[WebDataSource _addResponse:]):
+ (-[WebDataSource _responses]):
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _opened]):
+
2003-01-27 Trey Matteson <trey at apple.com>
3157104 - reproducible assert in _continueFragmentScrollAfterNavigationPolicy
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
index bff88f0..3ed1857 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
@@ -13,7 +13,7 @@
#import <WebFoundation/WebResourceResponse.h>
#import <WebKit/WebController.h>
-#import <WebKit/WebDataSource.h>
+#import <WebKit/WebDataSourcePrivate.h>
#import <WebKit/WebKitErrors.h>
#import <WebKit/WebResourceLoadDelegate.h>
#import <WebKit/WebStandardPanelsPrivate.h>
@@ -179,8 +179,10 @@
if ([self isDownload])
[downloadDelegate resource:identifier didReceiveResponse:r fromDataSource:dataSource];
- else
+ else {
+ [dataSource _addResponse: r];
[resourceLoadDelegate resource:identifier didReceiveResponse:r fromDataSource:dataSource];
+ }
}
- (void)handle:(WebResourceHandle *)h didReceiveData:(NSData *)data
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 855d74b..f8a01fa 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -79,6 +79,11 @@
// so we can avoid asking again needlessly.
WebResourceRequest *lastCheckedRequest;
+ // We retain all the received responses so we can play back the
+ // WebResourceLoadDelegate messages if the item is loaded from the
+ // page cache.
+ NSMutableArray *responses;
+
BOOL isDownloading;
NSString *downloadPath;
@@ -147,4 +152,7 @@
- (BOOL)_storedInPageCache;
- (BOOL)_loadingFromPageCache;
+- (void)_addResponse: (WebResourceResponse *)r;
+- (NSArray *)_responses;
+
@end
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 0c0e504..2f58bb4 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -64,6 +64,7 @@
[triggeringAction release];
[lastCheckedRequest release];
[downloadPath release];
+ [responses release];
[super dealloc];
}
@@ -671,4 +672,18 @@
return _private->loadingFromPageCache;
}
+- (void)_addResponse: (WebResourceResponse *)r
+{
+ if (!_private->responses)
+ _private->responses = [[NSMutableArray alloc] init];
+ [_private->responses addObject: r];
+}
+
+- (NSArray *)_responses
+{
+ return _private->responses;
+}
+
+
+
@end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index d1d4d70..dd27f28 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -32,6 +32,7 @@
#import <WebFoundation/WebNSStringExtras.h>
#import <WebFoundation/WebResourceHandle.h>
#import <WebFoundation/WebResourceRequest.h>
+#import <WebFoundation/WebResourceResponse.h>
#import <WebFoundation/WebHTTPResourceRequest.h>
#import <WebFoundation/WebSynchronousResult.h>
@@ -759,6 +760,16 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
[[[self webView] documentView] layout];
[self _restoreScrollPosition];
+ NSArray *responses = [[self dataSource] _responses];
+ WebResourceResponse *response;
+ int i, count = [responses count];
+ for (i = 0; i < count; i++){
+ response = [responses objectAtIndex: i];
+ [_private->bridge objectLoadedFromCacheWithURL: [[response URL] absoluteString]
+ response: response
+ size: [response contentLength]];
+ }
+
// Release the resources kept in the page cache. They will be
// reset when we leave this page. The core side of the page cache
// will have already been invalidated by the bridge to prevent
diff --git a/WebKit/WebView.subproj/WebLoader.m b/WebKit/WebView.subproj/WebLoader.m
index bff88f0..3ed1857 100644
--- a/WebKit/WebView.subproj/WebLoader.m
+++ b/WebKit/WebView.subproj/WebLoader.m
@@ -13,7 +13,7 @@
#import <WebFoundation/WebResourceResponse.h>
#import <WebKit/WebController.h>
-#import <WebKit/WebDataSource.h>
+#import <WebKit/WebDataSourcePrivate.h>
#import <WebKit/WebKitErrors.h>
#import <WebKit/WebResourceLoadDelegate.h>
#import <WebKit/WebStandardPanelsPrivate.h>
@@ -179,8 +179,10 @@
if ([self isDownload])
[downloadDelegate resource:identifier didReceiveResponse:r fromDataSource:dataSource];
- else
+ else {
+ [dataSource _addResponse: r];
[resourceLoadDelegate resource:identifier didReceiveResponse:r fromDataSource:dataSource];
+ }
}
- (void)handle:(WebResourceHandle *)h didReceiveData:(NSData *)data
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list