#52365: fix: don't treat transparent overlays as occluders on macOS
Description of Change
Fixes #51718.
Since #50579 re-enabled MacWebContentsOcclusion, Chromium's manual occlusion heuristic (active on macOS 13.3–25.x) marks a window occluded whenever a visible window above it fully contains its frame. It never looks at window opacity, so a transparent: true + setIgnoreMouseEvents(true) overlay flips the window beneath it to visibilityState = 'hidden' and triggers background throttling even though its content is fully visible.
This adds a Chromium patch that skips candidate occluders that can't visually cover anything — faded windows (alphaValue < 1), click-through windows, and non-opaque windows without an opaque background — mirroring how the Windows occlusion tracker filters WS_EX_TRANSPARENT and translucent layered windows. The #45776 hidden-then-shown fix from #50579 is untouched.
Checklist
- I have filled out the PR description
- I have reviewed and verified the changes
- tests are changed or added
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed a window being marked hidden and background-throttled on macOS when covered by a transparent or click-through window.
Backports
Semver Impact
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