Repository navigation
fix(desktop): keep browser panel corner masks aligned - #52461
Merged
Merged
Conversation
Hona
force-pushed
the
browser-corner-masks
branch
from
October 8, 2026 21:23
44a8f3a to
4cb06d2
Compare
Document the nested BridgeLayout viewport and border fields so the SDK docs check passes. Read the window zoom in main so the edge gutter and the viewport rounding tolerance stay correct at every zoom level. Clear the lint warnings in the touched files.
3 of 6 tasks
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.
Issue for this PR
No linked issue.
Type of change
What does this PR do?
The browser page in the side panel is a native
WebContentsView, so CSS cannot round it. Two smallImageViewmasks paint its bottom corners instead. This fixes three ways the masks went wrong.box-shadow(theme and zoom aware); the masks redraw it along the arcsetBounds, which lands a frame after the page's bounds, and only went up once the page showedsetBackgroundBlur(0)), move with plainsetBoundsin the same step as the page, and go up as soon as the box is laid outresize, main moves box edges within 24 CSS px of the window edge by the deltaThe ring is composited over the backdrop in each mask pixel (premultiplied BGRA), in
packages/desktop/src/main/native/corners.ts:BridgeLayoutgains documentedviewportandborderfields;ExtensionLayoutvalidates them.How did you verify your code works?
886e236and this branch on Windows (100% scale, light theme), same session and test pages. The corner was screen-recorded at 60 fps and checked frame by frame.SetWindowPosat 60 Hz) shows the same 1–2 frame lag in both builds, so it does not isolate this fix. This case still needs a manual drag recording.Screenshots / recordings
Outline at the bottom corners (10x zoom, contrast boosted)
New tab: first frames of the page (60 fps, 4x zoom)
Slow motion, 1/8 speed:
first-show-slowmo.mp4
Checklist