[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:47:47 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 92ad8fa835e53e6f98e9865d5968380fcd073283
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 8 21:12:31 2002 +0000
WebFoundation:
Some changes to make some progress on this bug:
Radar 3015613 (Search results disappear when backtracking)
This set of changes does not fix this bug, but it does provide much of the WebFoundation
support we'll need for a complete fix. In order to finish the fix, we need to make
some API changes in WebKit.
* CacheLoader.subproj/WebResourceLoad.m:
(-[WebResourceLoad _cacheKey]): Add HTTP request method to cache key.
* CacheLoader.subproj/WebResourceRequest.m:
(-[WebResourceRequest initWithURL:]): Explicitly set defaults for requestCachePolicy and responseCachePolicy.
* ProtocolHandlers.subproj/WebHTTPProtocolHandler.m:
(-[WebHTTPProtocolHandler shouldCacheResponse:]): Do not unconditionally determine that HEAD, POST, PUT, and
DELETE methods are uncacheable. This change is made so we can show cached results when a user uses back/forward
or history to do navigation.
WebKit:
Use WebFrameLoadType variable to set the request cache policy for the WebResourceRequest.
This will help us to provide cached results for POST requests when the user navigates
using the back/forward list or history for navigation, while making sure we do not
use cached results when the user pokes the submit button for a form they have
submitted previously.
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _goToItem:withFrameLoadType:])
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 44965f6..ebf73c8 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2002-10-08 Ken Kocienda <kocienda at apple.com>
+
+ Use WebFrameLoadType variable to set the request cache policy for the WebResourceRequest.
+ This will help us to provide cached results for POST requests when the user navigates
+ using the back/forward list or history for navigation, while making sure we do not
+ use cached results when the user pokes the submit button for a form they have
+ submitted previously.
+
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _goToItem:withFrameLoadType:])
+
2002-10-08 Chris Blumenberg <cblu at apple.com>
Moved assumption that a resource without a content type or extension is HTML to WebFoundation.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 44965f6..ebf73c8 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,14 @@
+2002-10-08 Ken Kocienda <kocienda at apple.com>
+
+ Use WebFrameLoadType variable to set the request cache policy for the WebResourceRequest.
+ This will help us to provide cached results for POST requests when the user navigates
+ using the back/forward list or history for navigation, while making sure we do not
+ use cached results when the user pokes the submit button for a form they have
+ submitted previously.
+
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _goToItem:withFrameLoadType:])
+
2002-10-08 Chris Blumenberg <cblu at apple.com>
Moved assumption that a resource without a content type or extension is HTML to WebFoundation.
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 41a2039..6149417 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -27,8 +27,10 @@
#import <WebFoundation/WebError.h>
#import <WebFoundation/WebNSURLExtras.h>
+#import <WebFoundation/WebNSStringExtras.h>
#import <WebFoundation/WebResourceHandle.h>
#import <WebFoundation/WebResourceRequest.h>
+#import <WebFoundation/WebHTTPResourceRequest.h>
static const char * const stateNames[] = {
"WebFrameStateProvisional",
@@ -685,9 +687,36 @@ static const char * const stateNames[] = {
}
else {
request = [[WebResourceRequest alloc] initWithURL:itemURL];
- if (type == WebFrameLoadTypeBack || type == WebFrameLoadTypeForward) {
- [request setRequestCachePolicy:WebRequestCachePolicyReturnCacheObjectLoadFromOriginIfNoCacheObject];
+
+ // 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 WebFrameLoadTypeIndexedBack:
+ case WebFrameLoadTypeIndexedForward:
+ case WebFrameLoadTypeIntermediateBack:
+ [request setRequestCachePolicy:WebRequestCachePolicyReturnCacheObjectLoadFromOriginIfNoCacheObject];
+ break;
+ case WebFrameLoadTypeInternal:
+ case WebFrameLoadTypeReloadAllowingStaleData:
+ // no-op: leave as protocol default
+ break;
+ }
}
+
dataSource = [[WebDataSource alloc] initWithRequest:request];
[request release];
[self setProvisionalDataSource: dataSource];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list