Repository navigation
Conversation
Contributor
Author
|
/request-review @mitchchn |
6 of 7 tasks
VerteDinde
approved these changes
Jun 5, 2026
Member
|
@gdavidkov can you rebase this PR? |
gdavidkov
force-pushed
the
gdavidkov/42-x-y-cherry-pick-crbug-506480944
branch
from
June 9, 2026 03:14
b4c89bd to
a3e5f43
Compare
Contributor
Author
Done — rebased onto the latest 42-x-y and force-pushed |
gdavidkov
force-pushed
the
gdavidkov/42-x-y-cherry-pick-crbug-506480944
branch
2 times, most recently
from
June 10, 2026 09:58
9c800d7 to
0065cac
Compare
3 tasks done
gdavidkov
force-pushed
the
gdavidkov/42-x-y-cherry-pick-crbug-506480944
branch
from
June 16, 2026 06:52
0065cac to
6ac203d
Compare
nikwen
previously requested changes
Jun 16, 2026
gdavidkov
force-pushed
the
gdavidkov/42-x-y-cherry-pick-crbug-506480944
branch
from
June 16, 2026 10:34
6ac203d to
c154578
Compare
gdavidkov
force-pushed
the
gdavidkov/42-x-y-cherry-pick-crbug-506480944
branch
from
June 16, 2026 10:41
c154578 to
5d9cb68
Compare
3 tasks done
Member
|
@gdavidkov can you rebase on the latest from 42-x-y and update the patch by running |
This comment has been minimized.
This comment has been minimized.
Member
|
@gdavidkov please see if you can rebase and verify no issues with the apply patch, workflow, I'd like to get this in so we can backport #51562 to 42.x. |
gdavidkov
force-pushed
the
gdavidkov/42-x-y-cherry-pick-crbug-506480944
branch
from
June 24, 2026 17:58
5d9cb68 to
aba89b2
Compare
Backport of https://chromium-review.googlesource.com/c/chromium/src/+/7795073 (Chromium bug 506480944, commit 22167afbecda05072355e5d8b324e00643b36bf4). On Windows, when a widget reports its size as the client area (WidgetSizeIsClientSize() is true), size constraints arrive in client-area coordinates and must be inflated by the frame insets before clamping the HWND. Without this, BrowserWindow.setBounds() (and aspect-ratio-locked resize) constrain the window to a smaller size than the configured maximum. This is the full upstream CL: extracts the duplicated inset-inflation arithmetic into a new helper InflateClientSizeConstraintsInPixels() in ui/views/win/hwnd_util.{h,cc}, refactors OnGetMinMaxInfo and SizeWindowToAspectRatio to use it, and adds the helper call to AdjustedContentBounds (with a DIP<->screen-px roundtrip because constraints arrive in DIPs at that call site). Includes the helper extraction so the follow-up patch fix_use_adjustwindowrectexfordpi_for_dpi-consistent_frame_insets.patch can layer on top to address the cross-DPI bug. The existing patch fix_aspect_ratio_with_max_size.patch is kept in place: its inline inset block in SizeWindowToAspectRatio is now refactored away by this patch, but its other change (switching from SizeRectToAspectRatioWithExcludedMargin to SizeRectToAspectRatio) is preserved. The upstream CL's unit test (DesktopWidgetTest.SetBoundsRespectsMaximumSize) is omitted: Electron does not run views_unittests. Notes: Fixed an issue where BrowserWindow.setBounds() on Windows could clamp the window to a size smaller than the configured maximumSize by the frame inset amount when useContentSize was true.
gdavidkov
force-pushed
the
gdavidkov/42-x-y-cherry-pick-crbug-506480944
branch
from
June 24, 2026 19:23
aba89b2 to
5db8e3a
Compare
Contributor
Author
jkleinsc
approved these changes
Jul 13, 2026
|
Release Notes Persisted
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
BrowserWindowwithuseContentSize: trueand amaxWidth/maxHeightconfigured was clamping the content area smaller than the configured maximum by the frame-inset amount. Fix correctsAdjustedContentBounds,OnGetMinMaxInfo, andSizeWindowToAspectRatioto inflate client-area constraints by frame insets before clamping the HWND.InflateClientSizeConstraintsInPixels()inui/views/win/hwnd_util.{h,cc}to match the upstream merged state.fix_aspect_ratio_with_max_size.patchis preserved; its inline inset block is refactored to call the new helper, so the aspect-ratio +maxWidth/maxHeightpath keeps working.Related
main), which adjusts Electron'sGetContentSizeConstraintsto pair correctly with the fixed Chromium behaviour. Together they resolve #51465 "Electron window changes size when moving after using setResizable".mainto fully resolve Electron window changes size when moving after using setResizable #51465 on this release line. This PR is intentionally scoped to just the Chromium-side change so it can ship independently and unblock the follow-up.Test plan
frame: true+useContentSize: trueat 125% scale — content clamps to exactlymaxWidth × maxHeight(Δ = +0 × +0)frame: true+useContentSize: trueat 138% scale —Δ = +0 × +1(sub-pixel rounding at non-integer scale)frame: false+useContentSize: trueat 138% scale —Δ = +0 × +1(no regression on the frameless path)frame: true+useContentSize: falseat 138% scale —Δ ≈ −inset(documented window-coords-max behaviour preserved, matches stock 42.0.1 baseline)e test— full spec suite (run separately)Checklist
npm testpasses(https://github.com/electron/electron/blob/main/docs/development/style-guide.md)
Release Notes
Notes: Fixed an issue on Windows where
BrowserWindowwithuseContentSize: truewould clamp the content area smaller than the configuredmaxWidth/maxHeightwhen programmatically resizing beyond those constraints viasetBounds,setSize, orsetContentSize.