MarshallOfSound

#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 a WebContentsView whose window is still hidden left the view blank once the window was shown (until a resize) — RenderWidgetHostImpl::WasShown() was called directly, bypassing the view, so BrowserCompositorMac/DelegatedFrameHost never embedded the LocalSurfaceId the renderer was actually submitting to, and the real show() 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 hidden WebContentsView after setBackgroundThrottling(false) + show() (fails on unfixed builds with "Current display surface not available for capture").

Checklist

Release Notes

Notes: Fixed a WebContentsView staying blank after its window is shown when setBackgroundThrottling(false) was called while the window was hidden.

Backports

42-x-y
Merged
PR Number
#52865
Merged At
Aug 16, 2026, 12:31:19 PM
Released In
v42.9.2
Release Date
Aug 16, 2026, 2:03:28 PM
43-x-y
Merged
PR Number
#52864
Merged At
Aug 16, 2026, 12:19:48 PM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#52863
Merged At
Aug 16, 2026, 12:19:39 PM
Released In
Not yet
Release Date
Not yet

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