[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:16:19 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit db57d554d34503b02e4b2eeae1d7ebe4e50cc904
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 18 22:40:07 2002 +0000
Fixed 3109590. We now set the cookie policy URL to a frame's URL if the
contents of the frame changes as a result of user action. The site mentioned
is this bug branded a service by wrapping it in their own frameset. That frameset
had a different domain than the service, so our cookie policy prevented cookies
from being set.
Reviewed by trey.
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _startLoading:]):
* WebView.subproj/WebFrame.m:
(-[WebFrame loadRequest:]):
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _loadItem:fromItem:withLoadType:]):
(-[WebFrame _addExtraFieldsToRequest:alwaysFromRequest:]):
(-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):
(-[WebFrame _postWithURL:data:contentType:triggeringEvent:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index d91d964..7d61c1c 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,24 @@
+2002-12-18 Richard Williamson <rjw at apple.com>
+
+ Fixed 3109590. We now set the cookie policy URL to a frame's URL if the
+ contents of the frame changes as a result of user action. The site mentioned
+ is this bug branded a service by wrapping it in their own frameset. That frameset
+ had a different domain than the service, so our cookie policy prevented cookies
+ from being set.
+
+ Reviewed by trey.
+
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _startLoading:]):
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame loadRequest:]):
+ * WebView.subproj/WebFramePrivate.h:
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _loadItem:fromItem:withLoadType:]):
+ (-[WebFrame _addExtraFieldsToRequest:alwaysFromRequest:]):
+ (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):
+ (-[WebFrame _postWithURL:data:contentType:triggeringEvent:]):
+
2002-12-18 Chris Blumenberg <cblu at apple.com>
Fixed: 3131714 - System becomes unresponsive while downloading
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index c831ecf..f53791a 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -164,12 +164,7 @@
[self _commitIfReady: pageCache];
} else if (!_private->mainClient) {
_private->loadingFromPageCache = NO;
- if ([self webFrame] == [[self controller] mainFrame]) {
- [_private->request setCookiePolicyBaseURL:[self URL]];
- } else {
- [_private->request setCookiePolicyBaseURL:[[[_private->controller mainFrame] dataSource] URL]];
- }
-
+ [[self webFrame] _addExtraFieldsToRequest:_private->request alwaysFromRequest: NO];
_private->mainClient = [[WebMainResourceClient alloc] initWithDataSource:self];
if (![_private->mainClient loadWithRequest:_private->request]) {
ERROR("could not create WebResourceHandle for URL %@ -- should be caught by policy handler level",
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index f71714f..4b66f03 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -112,7 +112,7 @@
// note this copies request
WebDataSource *newDataSource = [[WebDataSource alloc] initWithRequest:request];
WebResourceRequest *r = [newDataSource request];
- [self _addExtraFieldsToRequest:r];
+ [self _addExtraFieldsToRequest:r alwaysFromRequest: NO];
if ([self _shouldTreatURLAsSameAsCurrent:[request URL]]) {
[r setRequestCachePolicy:WebRequestCachePolicyLoadFromOrigin];
loadType = WebFrameLoadTypeSame;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index cc7eb87..5117f14 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -117,7 +117,7 @@ typedef enum {
- (void)_setLoadType: (WebFrameLoadType)loadType;
- (WebFrameLoadType)_loadType;
-- (void)_addExtraFieldsToRequest:(WebResourceRequest *)request;
+- (void)_addExtraFieldsToRequest:(WebResourceRequest *)request alwaysFromRequest: (BOOL)f;
- (void)_checkNavigationPolicyForRequest:(WebResourceRequest *)request dataSource:(WebDataSource *)dataSource andCall:(id)target withSelector:(SEL)selector;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 27c5294..80be620 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -1008,7 +1008,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
}
else {
WebResourceRequest *request = [[WebResourceRequest alloc] initWithURL:itemURL];
- [self _addExtraFieldsToRequest:request];
+ [self _addExtraFieldsToRequest:request alwaysFromRequest: (formData != nil)?YES:NO];
// If this was a repost that failed the page cache, we might try to repost the form.
NSDictionary *action;
@@ -1346,10 +1346,10 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
[[[self controller] locationChangeDelegate] locationChangedWithinPageForDataSource:dataSrc];
}
-- (void)_addExtraFieldsToRequest:(WebResourceRequest *)request
+- (void)_addExtraFieldsToRequest:(WebResourceRequest *)request alwaysFromRequest: (BOOL)f
{
[request setUserAgent:[[self controller] userAgentForURL:[request URL]]];
- if (self == [[self controller] mainFrame]) {
+ if (self == [[self controller] mainFrame] || f) {
[request setCookiePolicyBaseURL:[request URL]];
} else {
[request setCookiePolicyBaseURL:[[[[self controller] mainFrame] dataSource] URL]];
@@ -1361,7 +1361,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
{
WebResourceRequest *request = [[WebResourceRequest alloc] initWithURL:URL];
[request setReferrer:[_private->bridge referrer]];
- [self _addExtraFieldsToRequest:request];
+ [self _addExtraFieldsToRequest:request alwaysFromRequest: (event != nil || isFormSubmission) ? YES : NO ];
if (loadType == WebFrameLoadTypeReload) {
[request setRequestCachePolicy:WebRequestCachePolicyLoadFromOrigin];
}
@@ -1473,7 +1473,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
// This prevents a potential bug which may cause a page with a form that uses itself
// as an action to be returned from the cache without submitting.
WebResourceRequest *request = [[WebResourceRequest alloc] initWithURL:URL];
- [self _addExtraFieldsToRequest:request];
+ [self _addExtraFieldsToRequest:request alwaysFromRequest: YES];
[request setRequestCachePolicy:WebRequestCachePolicyLoadFromOrigin];
[request setMethod:@"POST"];
[request setData:data];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list