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

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

Issue 1163543002: Reland "Correctly set ScriptState in the image loader microtask" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: git cl try Created 5 years, 5 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/page/ChromeClient.h ('k') | Source/web/ChromeClientImpl.h » ('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 36c57589d86a779e3ab7f1e4a508f8c89090d457..acd1cc9bb9c21b1f85d3033c158eea142cded6a9 100644
--- a/Source/core/page/CreateWindow.cpp
+++ b/Source/core/page/CreateWindow.cpp
@@ -47,7 +47,7 @@
namespace blink {
-static Frame* createWindow(LocalFrame& openerFrame, LocalFrame& lookupFrame, const FrameLoadRequest& request, const WindowFeatures& features, NavigationPolicy policy, ShouldSendReferrer shouldSendReferrer)
+static Frame* createWindow(LocalFrame& openerFrame, LocalFrame& lookupFrame, const FrameLoadRequest& request, const WindowFeatures& features, NavigationPolicy policy, ShouldSendReferrer shouldSendReferrer, CreateWindowReason createWindowReason)
{
ASSERT(!features.dialog || request.frameName().isEmpty());
ASSERT(request.resourceRequest().requestorOrigin() || openerFrame.document()->url().isEmpty());
@@ -81,7 +81,7 @@ static Frame* createWindow(LocalFrame& openerFrame, LocalFrame& lookupFrame, con
if (!oldHost)
return nullptr;
- Page* page = oldHost->chromeClient().createWindow(&openerFrame, request, features, policy, shouldSendReferrer);
+ Page* page = oldHost->chromeClient().createWindow(&openerFrame, request, features, policy, shouldSendReferrer, createWindowReason);
if (!page)
return nullptr;
FrameHost* host = &page->frameHost();
@@ -111,7 +111,7 @@ static Frame* createWindow(LocalFrame& openerFrame, LocalFrame& lookupFrame, con
windowRect.setHeight(features.height + (windowRect.height() - viewportSize.height()));
host->chromeClient().setWindowRectWithAdjustment(windowRect);
- host->chromeClient().show(policy);
+ host->chromeClient().show(policy, createWindowReason);
// TODO(japhet): There's currently no way to set sandbox flags on a RemoteFrame and have it propagate
// to the real frame in a different process. See crbug.com/483584.
@@ -151,7 +151,7 @@ DOMWindow* createWindow(const String& urlString, const AtomicString& frameName,
// We pass the opener frame for the lookupFrame in case the active frame is different from
// the opener frame, and the name references a frame relative to the opener frame.
- Frame* newFrame = createWindow(*activeFrame, openerFrame, frameRequest, windowFeatures, NavigationPolicyIgnore, MaybeSendReferrer);
+ Frame* newFrame = createWindow(*activeFrame, openerFrame, frameRequest, windowFeatures, NavigationPolicyIgnore, MaybeSendReferrer, CreatedFromWindowOpen);
if (!newFrame)
return nullptr;
@@ -179,7 +179,7 @@ void createWindowForRequest(const FrameLoadRequest& request, LocalFrame& openerF
policy = NavigationPolicyNewForegroundTab;
WindowFeatures features;
- Frame* newFrame = createWindow(openerFrame, openerFrame, request, features, policy, shouldSendReferrer);
+ Frame* newFrame = createWindow(openerFrame, openerFrame, request, features, policy, shouldSendReferrer, CreatedFromLoadRequest);
if (!newFrame)
return;
if (shouldSendReferrer == MaybeSendReferrer) {
« no previous file with comments | « Source/core/page/ChromeClient.h ('k') | Source/web/ChromeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698