#52844: fix: blank WebContentsView after setBackgroundThrottling(false) while hidden
Merged
Created: Aug 16, 2026, 4:11:26 AM
Merged: Aug 16, 2026, 10:42:00 AM
4 comments
Target: main
Description of Change
webContents.setBackgroundThrottling(false)on aWebContentsViewwhose window is still hidden left the view blank once the window was shown (until a resize) —RenderWidgetHostImpl::WasShown()was called directly, bypassing the view, soBrowserCompositorMac/DelegatedFrameHostnever embedded the LocalSurfaceId the renderer was actually submitting to, and the realshow()skipped its show handling because the host was already "shown".- Un-hide via
RenderWidgetHostViewBase::ShowWithVisibility(kHiddenButPainting)(the path content uses for a hidden-but-captured WebContents) so view, compositor and host stay in sync. - Regression spec:
capturePage()on a hiddenWebContentsViewaftersetBackgroundThrottling(false)+show()(fails on unfixed builds with "Current display surface not available for capture").
Checklist
- PR description included and stakeholders cc'd
-
npm testpasses - tests are changed or added
- PR title follows semantic commit guidelines
Release Notes
Notes: Fixed a WebContentsView staying blank after its window is shown when setBackgroundThrottling(false) was called while the window was hidden.
Backports
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron