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 <shelley.vohr@gmail.com>

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
Jeremy Rose 2023-01-27 01:50:19 -08:00 committed by GitHub
parent 0026fdb78a
commit 85f41d59ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()) {