commit | 8b7ba0974535a2e492ecadbd8e3958cd89374046 | [log] [tgz] |
---|---|---|
author | Martin Kreichgauer <martinkr@google.com> | Mon Jun 17 22:27:31 2019 |
committer | Martin Kreichgauer <martinkr@google.com> | Mon Jun 17 22:27:31 2019 |
tree | 0ae3431416f1bcd93b4d4c4dfb25a5b8e281689f | |
parent | 84723c1aa20016b5646ce9195efd617011124a0e [diff] |
[m76] webauth: fix a AuthenticatorRequestDialogView regression CL:1562215 allowed the WebAuthn UI to be hidden mid request while e.g. the native Touch ID or Windows WebAuthn UIs are shown. AuthenticatorRequestDialogModel determines whether for the current step, the UI should be visible or hidden. AuthenticatorRequestDialogView in turn would read that information for every step change and call Widget::Show() or Widget::Hide() accordingly. This caused a bug with the dialogs modal-ness. The dialog is supposed to be modal to its tab, which is ensured by calling constrained_window::ShowWebModalDialogViews() with the tab's top-level WebContents. However, calling Show() on the dialog's widget while the parent tab is in background will make it appear as a child to the then-current tab. It appears that the visibility of a web-modal dialog is controlled by WebContentsModalDialogManager, which is a WebContentsObserver to the WebContents that the dialog is modal to. It observes the WebContents becoming shown/hidden and in turn shows/hides its managed dialogs accordingly. AuthenticatorRequestDialogView calling Show() on its widget seems to interfere with that. As a workaround, make AuthenticatorRequestDialogView also observe its WebContents' visibility and have it not call Widget::Show() while the WebContents is hidden; then catch up once the WebContents becomes visible again. (cherry picked from commit f85e659b61f9551b65cf5b2f2c20aa2c53b307ce) Bug: 969153 Change-Id: I15655b60604c5dfe7f536ae6f7cb3ffafead514d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1654235 Commit-Queue: Martin Kreichgauer <martinkr@google.com> Reviewed-by: Adam Langley <agl@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#668921} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1663348 Reviewed-by: Martin Kreichgauer <martinkr@google.com> Cr-Commit-Position: refs/branch-heads/3809@{#384} Cr-Branched-From: d82dec1a818f378c464ba307ddd9c92133eac355-refs/heads/master@{#665002}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .