summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-07 00:53:02 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-07 00:53:02 +0000
commit62d2a1159508500bd079f41f2169d8460566c342 (patch)
tree597397c6d784334ad77f70e7fede9f1eb0539f6f
parent4275c9232b11c2a8b435115f8742e0ecb3d59905 (diff)
downloadchromium_src-62d2a1159508500bd079f41f2169d8460566c342.zip
chromium_src-62d2a1159508500bd079f41f2169d8460566c342.tar.gz
chromium_src-62d2a1159508500bd079f41f2169d8460566c342.tar.bz2
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
-rw-r--r--chrome/renderer/render_view.cc8
1 files changed, 7 insertions, 1 deletions
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()) {