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

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

Issue 1097303002: Properly set WebURLRequest::FrameType for opened windows. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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/FrameLoader.cpp ('k') | no next file » | 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 957d48729062e907431344e69746526272139a6b..c2329edc91b41b680201896fbb7f2f7721548550 100644
--- a/Source/core/page/CreateWindow.cpp
+++ b/Source/core/page/CreateWindow.cpp
@@ -43,12 +43,14 @@
#include "platform/weborigin/KURL.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "platform/weborigin/SecurityPolicy.h"
+#include "public/platform/WebURLRequest.h"
namespace blink {
static LocalFrame* createWindow(LocalFrame& openerFrame, LocalFrame& lookupFrame, const FrameLoadRequest& request, const WindowFeatures& features, NavigationPolicy policy, ShouldSendReferrer shouldSendReferrer, bool& created)
{
ASSERT(!features.dialog || request.frameName().isEmpty());
+ ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeAuxiliary);
if (!request.frameName().isEmpty() && request.frameName() != "_blank" && policy == NavigationPolicyIgnore) {
if (Frame* frame = lookupFrame.findFrameForNavigation(request.frameName(), openerFrame)) {
@@ -139,6 +141,7 @@ LocalFrame* createWindow(const String& urlString, const AtomicString& frameName,
}
FrameLoadRequest frameRequest(callingWindow.document(), completedURL, frameName);
+ frameRequest.resourceRequest().setFrameType(WebURLRequest::FrameTypeAuxiliary);
// Normally, FrameLoader would take care of setting the referrer for a navigation that is
// triggered from javascript. However, creating a window goes through sufficient processing
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698