New issue
Advanced search Search tips

Issue 766774 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

WebUI dialogs don't resize when browser window height changes

Project Member Reported by taku...@chromium.org, Sep 19 2017

Issue description

Open the Cast dialog, and make the window shorter than the dialog. Notice that instead of the dialog getting a scroll bar, it just gets cropped at the bottom. The profile sign-in dialog seems to be affected as well.

This was a regression in M60 and crrev.com/c/513505 and crrev.com/c/516542 might be related. It seems to be happening because whenever the window is resized, instead of re-calculating the dialog size we simply return the preferred size. estade@, would you mind taking a look?
 

Comment 1 by est...@chromium.org, Sep 20 2017

Cc: sky@chromium.org
Are you sure this is a regression for gaia signin? I think that codepath is separate (SigninViewControllerDelegateViews is not a WebContentsDialogDelegate) and I don't think it ever worked differently.

WebContentsDialogDelegate does look like it has a clash between SetPreferredSize and CalculatePreferredSize (the latter no longer being called). Few dialogs actually use this codepath --- I think it's just some obscure email confirmation dialog and the cast dialog. How can I easily trigger the cast dialog? I think this patch[1] should fix it but haven't tested it.

[1] ConstrainedWebDialogDelegateViewViews

Thank you for taking a look! I'm assuming this [1] was the patch you meant to link, and yes, it does fix the issue. The dialog can be opened via the "Cast..." option in the hotdog menu or the right-click context menu.

No, I'm not sure whether it's a regression for the sign-in dialog.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/674179

Comment 3 by est...@chromium.org, Sep 20 2017

um yes, copy pasta fail. Thanks for checking.
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f094b59b055c5051242315be5e2bcdaff1068803

commit f094b59b055c5051242315be5e2bcdaff1068803
Author: Evan Stade <estade@chromium.org>
Date: Tue Sep 26 16:46:48 2017

Resize media router (cast) dialog when browser changes size.

Most of the lines of change in this patch are just from splitting 
the declaration and definition for ConstrainedWebDialogDelegateViewViews.
This entire file is a painful morass of similarly named classes that are
all defined inline.

Bug:  766774 
Change-Id: I4ebfece91d9398571232cf350a2dd27f117d88f4
Reviewed-on: https://chromium-review.googlesource.com/674179
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504397}
[modify] https://crrev.com/f094b59b055c5051242315be5e2bcdaff1068803/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc

Comment 5 by est...@chromium.org, Sep 26 2017

Status: Fixed (was: Assigned)
Labels: Needs-Feedback
Tested this issue on Windows 7, Mac OS 10.12.6 and Ubuntu 14.04 using the latest Canary and can observe that on selecting the cast option from the wrench menu and resizing the Chrome Window, the cast window is displayed as it is and it is not cropped or re-sized in Mac OS.
Whereas in Windows and Linux, the Cast window is getting cropped and no scroll bars are seen.

Attached is the screen casts for the same.

estade@ Can you please check and confirm if the fix is working as intended or no?

Thanks..
766774_Windows.webm
6.5 MB View Download
766774_Mac.webm
3.9 MB View Download

Comment 7 by est...@chromium.org, Sep 27 2017

Takumi, could you verify? Thanks.
Status: Verified (was: Fixed)
Verified on Win and Mac Canary. Thank you for the fix!

Sign in to add a comment