Browser: Remove duplicate border in Modern UI - #335463
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Kyle Cutler (@kycutler)Matched files:
Joaquín Ruales (@jruales)Matched files:
|
There was a problem hiding this comment.
🟡 Changes recommended
Pixel expansion must preserve zero-sized panes to prevent native-view bleed.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Removes the redundant integrated Browser boundary when Modern UI’s editor card supplies it.
Changes:
- Conditionally reserves Browser border padding.
- Adds host-pixel snapping for fractional zoom.
- Adds focused layout regression coverage.
File summaries
| File | Description |
|---|---|
webContentsViewRendererFeature.ts |
Updates padding and pixel-snapping behavior. |
webContentsViewRendererFeature.test.ts |
Tests UI modes and fractional zoom. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| const snappedAbsoluteTop = snapDown(absoluteTop); | ||
| return { | ||
| ...current, | ||
| width: coverAvailableArea && current.width !== 0 ? snapUp(absoluteLeft + current.width) - snappedAbsoluteLeft : snapDown(current.width), |
There was a problem hiding this comment.
Why was this rounding changed? Rounding up causes the browser to overflow the available area in certain cases (whereas rounding down leaves a bit of extra margin in those cases which is generally preferable).
| // Snap CSS-pixel values down so `v × hostZoom` is an exact integer: | ||
| // main places the WCV at `round(v × hostZoom) × systemDPR` physical | ||
| // pixels while CSS renders it at `v × hostZoom × systemDPR`, so this | ||
| // collapses main's rounding to a no-op and keeps the WebContentsView | ||
| // aligned with the placeholder screenshot. We snap the absolute | ||
| // origin (pane origin + local offset) then derive the corresponding | ||
| // local position so the DOM element and the WCV land on the same | ||
| // physical pixel. Runs late so it refines whatever sizing upstream | ||
| // contributions (e.g. device emulation) produced. |
There was a problem hiding this comment.
This comment gives really important context and shouldn't have been removed
|
Thanks for the feedback - I think we should revert for now & revisit later #335487 |

Summary
Validation
npm run compile./scripts/test.sh --runGlob '**/webContentsViewRendererFeature.test.js'Fixes #327036
Before / After
Both captures use the Browser welcome page, Dark Modern, Modern UI enabled, a 1440×900 window, zoom level 0, hidden sidebars/panel, and the focused URL field.