summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 03:47:14 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 03:47:14 +0000
commitb9aa944ff6d82e20d3b3a0a1997448391fa64b4e (patch)
tree0cab29e768581d6a24cff3e49311938c96af9487 /webkit
parentd1508f76c6b629304fc4ad699b07efb2d724fd36 (diff)
downloadchromium_src-b9aa944ff6d82e20d3b3a0a1997448391fa64b4e.zip
chromium_src-b9aa944ff6d82e20d3b3a0a1997448391fa64b4e.tar.gz
chromium_src-b9aa944ff6d82e20d3b3a0a1997448391fa64b4e.tar.bz2
Correct bad WebKit merge.
BUG=12969 R=darin TEST=I wish I could write a test, but I can't reproduce the issue. Review URL: http://codereview.chromium.org/149510 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20473 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index b173fbe..f646fc5 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -240,6 +240,16 @@ void WebFrameLoaderClient::dispatchWillSendRequest(
request.setTargetType(DetermineTargetTypeFromLoader(loader));
}
+ // Inherit the first party for cookies from the request's frame. However, if
+ // the request is for a main frame, the current document's
+ // firstPartyForCookies is the old document, so we leave firstPartyForCookies
+ // empty to indicate that the request is a first-party request.
+ if (request.targetType() != ResourceRequest::TargetIsMainFrame &&
+ webframe_->frame()->document()) {
+ request.setFirstPartyForCookies(
+ webframe_->frame()->document()->firstPartyForCookies());
+ }
+
// FrameLoader::loadEmptyDocumentSynchronously() creates an empty document
// with no URL. We don't like that, so we'll rename it to about:blank.
if (request.url().isEmpty())