Index: chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc |
diff --git a/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc b/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc |
index 3c129ddf63df97801ae902bdb359207226d48ff3..881ffe2029fde5f4cd846aae81aabbdce35f7aae 100644 |
--- a/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc |
+++ b/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc |
@@ -133,6 +133,11 @@ void JavaScriptDialogTabHelper::RunJavaScriptDialog( |
break; |
} |
+ // For security reasons, when a page requests a JavaScript dialog it forfeits |
+ // fullscreen. http://crbug.com/670135 |
+ parent_web_contents->GetDelegate()->ExitFullscreenModeForTab( |
+ parent_web_contents); |
meacer
2017/06/01 22:26:01
Drive by: Does this exit window-fullscreen (as opp
Avi (use Gerrit)
2017/06/01 22:49:33
No, this is only exiting html5 fullscreen, which i
|
+ |
if (IsEnabled()) { |
if (!IsWebContentsForemost(parent_web_contents) && |
dialog_type == content::JAVASCRIPT_DIALOG_TYPE_PROMPT) { |
@@ -240,6 +245,10 @@ void JavaScriptDialogTabHelper::RunBeforeUnloadDialog( |
double engagement_score = |
site_engagement_service->GetScore(web_contents->GetLastCommittedURL()); |
+ // For security reasons, when a page requests a JavaScript dialog it forfeits |
+ // fullscreen. http://crbug.com/670135 |
+ web_contents->GetDelegate()->ExitFullscreenModeForTab(web_contents); |
+ |
return AppModalDialogManager()->RunBeforeUnloadDialog( |
web_contents, is_reload, |
base::Bind(&SaveUnloadUmaStats, engagement_score, callback)); |