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

Unified Diff: Source/core/page/CreateWindow.cpp

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switched to constructors Created 6 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
« no previous file with comments | « Source/core/loader/NavigationScheduler.cpp ('k') | Source/core/page/DragController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/CreateWindow.cpp
diff --git a/Source/core/page/CreateWindow.cpp b/Source/core/page/CreateWindow.cpp
index 0c7b8f7d1cf24c231f6cb03d8c16b074c51a8e9e..c2bf76e60671859a2a6d359c251de8973e67eeb9 100644
--- a/Source/core/page/CreateWindow.cpp
+++ b/Source/core/page/CreateWindow.cpp
@@ -130,7 +130,7 @@ LocalFrame* createWindow(const String& urlString, const AtomicString& frameName,
// For whatever reason, Firefox uses the first frame to determine the outgoingReferrer. We replicate that behavior here.
Referrer referrer(SecurityPolicy::generateReferrerHeader(firstFrame.document()->referrerPolicy(), completedURL, firstFrame.document()->outgoingReferrer()), firstFrame.document()->referrerPolicy());
- ResourceRequest request(completedURL, referrer);
+ ResourceRequest request(completedURL, true, referrer);
FrameLoader::addHTTPOriginIfNeeded(request, AtomicString(firstFrame.document()->outgoingOrigin()));
FrameLoadRequest frameRequest(callingWindow.document(), request, frameName);
@@ -153,7 +153,8 @@ LocalFrame* createWindow(const String& urlString, const AtomicString& frameName,
function(newFrame->domWindow(), functionContext);
if (created) {
- FrameLoadRequest request(callingWindow.document(), ResourceRequest(completedURL, referrer));
+ ResourceRequest resourceRequest = ResourceRequest(completedURL, newFrame->isMainFrame(), referrer);
+ FrameLoadRequest request(callingWindow.document(), resourceRequest);
newFrame->loader().load(request);
} else if (!urlString.isEmpty()) {
newFrame->navigationScheduler().scheduleLocationChange(callingWindow.document(), completedURL.string(), referrer, false);
« no previous file with comments | « Source/core/loader/NavigationScheduler.cpp ('k') | Source/core/page/DragController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698