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

Unified Diff: chrome/browser/web_contents.cc

Issue 1970: Prevent constrained popup windows from trying to become real... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_contents.cc
===================================================================
--- chrome/browser/web_contents.cc (revision 2086)
+++ chrome/browser/web_contents.cc (working copy)
@@ -1902,7 +1902,14 @@
const std::wstring& default_prompt,
const int flags,
IPC::Message* reply_msg) {
- if (!suppress_javascript_messages_) {
+ // Suppress javascript messages when requested and when inside a constrained
+ // popup window (because that activates them and breaks them out of the
+ // constrained window jail).
+ bool suppress_this_message = suppress_javascript_messages_;
+ if (delegate())
+ suppress_this_message |= delegate()->IsPopup(this);
+
+ if (!suppress_this_message) {
TimeDelta time_since_last_message(
TimeTicks::Now() - last_javascript_message_dismissal_);
bool show_suppress_checkbox = false;
@@ -2589,4 +2596,3 @@
return TRUE;
}
-
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698