New issue
Advanced search Search tips

Issue 657293 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Sep 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocking:
issue 672343



Sign in to add a comment

constrained_window::CreateBrowserModalDialogViews() accepts MODAL_TYPE_WINDOW with a null window

Project Member Reported by tapted@chromium.org, Oct 19 2016

Issue description

Chrome Version       : 55.0.2883.11

Signature is:

views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
                                             gfx::NativeWindow parent);

What steps will reproduce the problem?
1. Call constrained_window::CreateBrowserModalDialogViews(new WindowModalDialog(), nullptr);

What is the expected result? What happens instead of that?

Something should complain! But nothing does.

CreateBrowserModalDialogViews(..) has 
  DCHECK_NE(ui::MODAL_TYPE_CHILD, dialog->GetModalType());
  DCHECK_NE(ui::MODAL_TYPE_NONE, dialog->GetModalType());

so this ModalType() must be MODAL_TYPE_WINDOW or MODAL_TYPE_SYSTEM. A null parent may be sensible for MODAL_TYPE_SYSTEM (although there is no |context| which would have confused Metro mode).

However, a null parent is also allowed for MODAL_TYPE_WINDOW. But that doesn't make sense.

Current NativeWidget logic allows this, and the Widget falls back to a non-modal window. This effectively ignores the WidgetDelegate::ModalType() request, which might not be what the dialog wants. If the parent is null, the client code probably shouldn't call CreateBrowserModalDialogViews at all. But currently this fallback allows some things to work. For example, extension "permissions need upgrading" dialogs when an extension is launched from a Windows (or Linux/Mac) Desktop shortcut, or an app that has been pinned to the ChromeOS shelf.

See also http://crbug.com/647574#c9 and https://codereview.chromium.org/2415053002
 
Project Member

Comment 1 by sheriffbot@chromium.org, Oct 19 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 2 by tapted@chromium.org, Oct 20 2017

Blocking: 672343
Labels: -Hotlist-Recharge-Cold Hotlist-Polish
Status: Available (was: Untriaged)
Status: Archived (was: Available)
Archiving old bugs that haven't been actively assigned in over 180 days.

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!
Archiving old bugs that haven't been actively assigned in over 180 days.

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!
Archiving old bugs that haven't been actively assigned in over 180 days.

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!
Archiving old bugs that haven't been actively assigned in over 180 days.

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!

Sign in to add a comment