Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index ffba46b099c9192c32330841cccdb96e87b58595..edbbe2913f4f67b41a4516d232160cc97ce387a2 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -4425,6 +4425,11 @@ void WebContentsImpl::RunJavaScriptDialog(RenderFrameHost* render_frame_host, |
const GURL& frame_url, |
JavaScriptDialogType dialog_type, |
IPC::Message* reply_msg) { |
+ // Running a dialog causes an exit to webpage-initiated fullscreen. |
+ // http://crbug.com/728276 |
+ if (IsFullscreenForCurrentTab()) |
+ ExitFullscreen(false); |
Matt Giuca
2017/06/09 06:16:37
I think this should be true... documentation says
Avi (use Gerrit)
2017/06/09 14:36:23
Done.
|
+ |
// Suppress JavaScript dialogs when requested. Also suppress messages when |
// showing an interstitial as it's shown over the previous page and we don't |
// want the hidden page's dialogs to interfere with the interstitial. |
@@ -4457,6 +4462,11 @@ void WebContentsImpl::RunBeforeUnloadConfirm( |
RenderFrameHost* render_frame_host, |
bool is_reload, |
IPC::Message* reply_msg) { |
+ // Running a dialog causes an exit to webpage-initiated fullscreen. |
+ // http://crbug.com/728276 |
+ if (IsFullscreenForCurrentTab()) |
+ ExitFullscreen(false); |
Matt Giuca
2017/06/09 06:16:37
Same as above.
Avi (use Gerrit)
2017/06/09 14:36:23
Done.
|
+ |
RenderFrameHostImpl* rfhi = |
static_cast<RenderFrameHostImpl*>(render_frame_host); |
if (delegate_) |