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

Unified Diff: chrome/browser/ui/browser.cc

Issue 2104513004: Don't attempt to show validation bubble for unparented web contents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whoops Created 4 years, 6 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/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 64ab742dcf3ab7a1e8945781e1bf59d60556fb78..d2bfd8f0f6e96aa03abf20857611e9ab76e95b98 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1260,6 +1260,10 @@ void Browser::ShowValidationMessage(content::WebContents* web_contents,
const gfx::Rect& anchor_in_root_view,
const base::string16& main_text,
const base::string16& sub_text) {
+ // If the web contents is unparented (e.g. in a blocked popup) it does not
+ // make sense to show a validation message. See http://crbug.com/616990
+ if (!web_contents->GetTopLevelNativeWindow())
+ return;
validation_message_bubble_ =
TabDialogs::FromWebContents(web_contents)
->ShowValidationMessage(anchor_in_root_view, main_text, sub_text);
« 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