If a dialog is shown, drop fullscreen.
BUG=875066, 817809, 792876, 812769, 813815
TEST=included
Change-Id: Ic3d697fa3c4b01f5d7fea77391857177ada660db
Reviewed-on: https://chromium-review.googlesource.com/1185208
Reviewed-by: Sidney San MartÃn <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586418}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 380c7e2e..db42573 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5180,6 +5180,10 @@
void WebContentsImpl::RunFileChooser(RenderFrameHost* render_frame_host,
const FileChooserParams& params) {
+ // Any explicit focusing of another window while this WebContents is in
+ // fullscreen can be used to confuse the user, so drop fullscreen.
+ ForSecurityDropFullscreen();
+
if (delegate_)
delegate_->RunFileChooser(render_frame_host, params);
}