New issue
Advanced search Search tips

Issue 844359 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Views: platform handling of WidgetDelegate::Min/Max size differs when called via NativeWidgetPrivate::CenterWindow()

Project Member Reported by tapted@chromium.org, May 18 2018

Issue description

Context: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-chromeos-rel/4989

two jobs fail in mash_browser_tests:

 - ModeIndicatorBrowserTest.NumOfWidgets
 - ModeIndicatorBrowserTest.Bounds


void DesktopWindowTreeHostMus::SetBoundsInPixels() clamps the |size| passed to CenterWindow to WidgetDelegate::GetMin/MaximumSize

NativeWidgetAura and DesktopWindowTreeHostX11 do not

DesktopWindowTreeHostX11 does

NativeWidgetMac does not.


It's unlikely there's a bug -- calls to CenterWindow are almost always overridden by a call to SetBounds just after a Widget is created.

Widget calls CenterWindow during initializtion by passing non_client_view_->GetPreferredSize() -- (clients should never give a preferred size that disagrees with their min/max size). But it can also be called via Widget::CenterWindow.


ModeIndicatorBrowserTest fails on https://chromium-review.googlesource.com/c/chromium/src/+/790175 because ModeIndicatorView is a BubbleDialogDelegateView but it provides a custom ModeIndicatorFrameView inheriting from BubbleFrameView directly rather than relying on BubbleDialogDelegateView::CreateNonClientFrameView().

But it only fails on Mus (it should fail on non-mus as well except for this bug).
 

Sign in to add a comment