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

Unified Diff: content/renderer/render_view_impl.cc

Issue 2837683002: Remove opener URLs from CreateNewWindowParams. (Closed)
Patch Set: Fix browsertest. Created 3 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 | « content/common/frame.mojom ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 79f0cd1810837155153170aab399c95e442256a1..3f21403e359259cfde64d065611d1f2f69344044 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1413,29 +1413,7 @@ WebView* RenderViewImpl::CreateView(WebLocalFrame* creator,
if (frame_name != "_blank")
params->frame_name = frame_name.Utf8(
WebString::UTF8ConversionMode::kStrictReplacingErrorsWithFFFD);
- params->opener_url = creator->GetDocument().Url();
- // The browser process uses the top frame's URL for a content settings check
- // to determine whether the popup is allowed. If the top frame is remote,
- // its URL is not available, so use its replicated origin instead.
- //
- // TODO(alexmos): This works fine for regular origins but may break path
- // matching for file URLs with OOP subframes that open popups. This should
- // be fixed by either moving this lookup to the browser process or removing
- // path-based matching for file URLs from content settings. See
- // https://crbug.com/466297.
- if (creator->Top()->IsWebLocalFrame()) {
- params->opener_top_level_frame_url = creator->Top()->GetDocument().Url();
- } else {
- params->opener_top_level_frame_url =
- url::Origin(creator->Top()->GetSecurityOrigin()).GetURL();
- }
-
- GURL security_url(
- url::Origin(creator->GetDocument().GetSecurityOrigin()).GetURL());
- if (!security_url.is_valid())
- security_url = GURL();
- params->opener_security_origin = security_url;
params->opener_suppressed = suppress_opener;
params->disposition = NavigationPolicyToDisposition(policy);
if (!request.IsNull()) {
« no previous file with comments | « content/common/frame.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698