Skip to content

fix: ensure autofill popup view is > 1x1 in size - #36121

Merged
codebytere merged 2 commits into
mainfrom
clamp-autofill-popup-size
Jan 27, 2023
Merged

codebytere merged 2 commits into
mainfrom
clamp-autofill-popup-size

Conversation

@nornagon

Copy link
Copy Markdown
Contributor

Description of Change

Fixes #26667

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes

Release Notes

Notes: none

@nornagon nornagon added no-backport semver/patch backwards-compatible bug fixes labels Oct 24, 2022
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Oct 24, 2022
codebytere
codebytere previously approved these changes Oct 25, 2022
@codebytere
codebytere dismissed their stale review October 25, 2022 06:15

Oops meant to comment - it doesn't look like popup_->popup_bounds_.Union returns a gfx::Rect


GetWidget()->SetBounds(popup_->popup_bounds_);
GetWidget()->SetBounds(popup_->popup_bounds_.Union(
gfx::Rect(popup_->popup_bounds_.origin(), gfx::Size(1, 1))));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If popup_->popup_bounds_ could be empty, then so would be popup_->popup_bounds_in_view(), which is used in some other places.

@zcbenz

zcbenz commented Oct 25, 2022

Copy link
Copy Markdown
Contributor

It was also mentioned in #26667 that passing zero size to BrowserWindow could cause the same problem.

@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Oct 25, 2022
@codebytere
codebytere requested a review from zcbenz January 26, 2023 12:06
@codebytere
codebytere merged commit 85f41d5 into main Jan 27, 2023
@codebytere
codebytere deleted the clamp-autofill-popup-size branch January 27, 2023 09:50
@release-clerk

release-clerk Bot commented Jan 27, 2023

Copy link
Copy Markdown

No Release Notes

khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
* fix: ensure autofill popup view is > 1x1 in size

ref electron#26667

* Update shell/browser/ui/views/autofill_popup_view.cc

Co-authored-by: Shelley Vohr <[email protected]>

Co-authored-by: Shelley Vohr <[email protected]>
gecko19 pushed a commit to brightsign/electron that referenced this pull request Feb 28, 2023
* fix: ensure autofill popup view is > 1x1 in size

ref electron#26667

* Update shell/browser/ui/views/autofill_popup_view.cc

Co-authored-by: Shelley Vohr <[email protected]>

Co-authored-by: Shelley Vohr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-backport semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DCHECK in autofill relating to zero-sized windows on macOS

3 participants