Commit fc8693e1 authored by Becky Zhou's avatar Becky Zhou Committed by Commit Bot

Exit fullscreen when tab modal dialog is about to show

Exiting fullscreen on tab modal dialog shown could prevent it not being
shown inside fullscreen mode, and also provides a better escape path
for the user who doesn't want to interact with the dialog.

Bug: 958742
Change-Id: I831a77016e94b6797aae04e425e4a6aae8a3eb30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1603982Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Becky Zhou <huayinz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658413}
parent 779dcfb3
...@@ -353,6 +353,9 @@ public class TabModalPresenter ...@@ -353,6 +353,9 @@ public class TabModalPresenter
private void onTabModalDialogStateChanged(boolean isShowing) { private void onTabModalDialogStateChanged(boolean isShowing) {
TabAttributes.from(mActiveTab).set(TabAttributeKeys.MODAL_DIALOG_SHOWING, isShowing); TabAttributes.from(mActiveTab).set(TabAttributeKeys.MODAL_DIALOG_SHOWING, isShowing);
// Make sure to exit fullscreen mode before showing the tab modal dialog view.
if (isShowing) mActiveTab.exitFullscreenMode();
// Also need to update browser control state after dismissal to refresh the constraints. // Also need to update browser control state after dismissal to refresh the constraints.
TabBrowserControlsOffsetHelper offsetHelper = getControlsOffsetHelper(); TabBrowserControlsOffsetHelper offsetHelper = getControlsOffsetHelper();
if (isShowing && mActiveTab.areRendererInputEventsIgnored()) { if (isShowing && mActiveTab.areRendererInputEventsIgnored()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment