diff options
-rw-r--r-- | chrome/renderer/render_view.cc | 8 |
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()) { |