Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 1999573003: OOPIFs: Fixing submitting forms targeting a remote frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@form-target-is-cross-site-frame
Patch Set: Added a TODO for investigating if remote and local frames can be handled uniformly. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index ebbfdd66e6f593a309a8e1a37a815d9b7de254d9..0ca5d1a803528925dfd4381babdee621ce52a7fc 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -766,15 +766,19 @@ void FrameLoader::loadInSameDocument(const KURL& url, PassRefPtr<SerializedScrip
takeObjectSnapshot();
}
-void FrameLoader::setReferrerForFrameRequest(ResourceRequest& request, ShouldSendReferrer shouldSendReferrer, Document* originDocument)
+// static
+void FrameLoader::setReferrerForFrameRequest(FrameLoadRequest& frameRequest)
{
+ ResourceRequest& request = frameRequest.resourceRequest();
+ Document* originDocument = frameRequest.originDocument();
+
if (!originDocument)
return;
// Anchor elements with the 'referrerpolicy' attribute will have
// already set the referrer on the request.
if (request.didSetHTTPReferrer())
return;
- if (shouldSendReferrer == NeverSendReferrer)
+ if (frameRequest.getShouldSendReferrer() == NeverSendReferrer)
return;
// Always use the initiating document to generate the referrer.
@@ -949,7 +953,7 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest, FrameLoadType fram
return;
}
- setReferrerForFrameRequest(request.resourceRequest(), request.getShouldSendReferrer(), request.originDocument());
+ setReferrerForFrameRequest(request);
FrameLoadType newLoadType = (frameLoadType == FrameLoadTypeStandard) ?
determineFrameLoadType(request) : frameLoadType;
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.h ('k') | third_party/WebKit/Source/core/loader/NavigationScheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698