From 85f41d59aceabbdeee1fdec75770249c6335e73a Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Fri, 27 Jan 2023 01:50:19 -0800 Subject: [PATCH] fix: ensure autofill popup view is > 1x1 in size (#36121) * fix: ensure autofill popup view is > 1x1 in size ref #26667 * Update shell/browser/ui/views/autofill_popup_view.cc Co-authored-by: Shelley Vohr Co-authored-by: Shelley Vohr --- shell/browser/ui/views/autofill_popup_view.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell/browser/ui/views/autofill_popup_view.cc b/shell/browser/ui/views/autofill_popup_view.cc index fd2e5092146..068c1a0f61e 100644 --- a/shell/browser/ui/views/autofill_popup_view.cc +++ b/shell/browser/ui/views/autofill_popup_view.cc @@ -224,6 +224,9 @@ void AutofillPopupView::DoUpdateBoundsAndRedrawPopup() { if (!popup_) return; + // Clamp popup_bounds_ to ensure it's never zero-width. + popup_->popup_bounds_.Union( + gfx::Rect(popup_->popup_bounds_.origin(), gfx::Size(1, 1))); GetWidget()->SetBounds(popup_->popup_bounds_); #if BUILDFLAG(ENABLE_OSR) if (view_proxy_.get()) {