From 62d2a1159508500bd079f41f2169d8460566c342 Mon Sep 17 00:00:00 2001 From: "cevans@chromium.org" Date: Wed, 7 Apr 2010 00:53:02 +0000 Subject: Fix plugin (and other) block settings for windows opened simply with window.open(). Such cases should inherit settings from the parent. BUG=39740 TEST=TODO TBR=darin Review URL: http://codereview.chromium.org/1524014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43792 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/render_view.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 6cfb152..1a1e882 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1206,7 +1206,13 @@ void RenderView::UpdateURL(WebFrame* frame) { // flipped from "not blocked" to "blocked". ClearBlockedContentSettings(); - // Set content settings. + // Set content settings. Default them from the parent window if one exists. + // This makes sure about:blank windows work as expected. + if (frame->opener()) { + WebView* opener_view = frame->opener()->view(); + RenderView* opener = FromWebView(opener_view); + SetContentSettings(opener->current_content_settings_); + } HostContentSettings::iterator host_content_settings = host_content_settings_.find(GURL(request.url()).host()); if (host_content_settings != host_content_settings_.end()) { -- cgit v1.1