Skip to content

[Upgrades Follow Up]: Enable MacWebContentsOcclusion #45776

Description

@VerteDinde

Confirmation

Description

In #45055 , MacWebContentsOcclusion was enabled by default upstream as part of CL:6078344 .

To keep the roll moving forward, we were forced to disable the feature by default, as it's causing three of our visibility tests to fail (one seemingly where the webContents hangs). See https://github.com/electron/electron/blob/main/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch for the specific patch.

We should debug the three failing needed tests to enable it by default and match upstream. The failing tests are:

  1. BrowserWindow module BrowserWindow.capturePage(rect) resolves when the window is occluded
  2. WebContentsView visibilityState becomes visible when parent window is shown
  3. document.visibilityState should be hidden when the window is initially hidden with BaseWindow

Sample failed run: https://github.com/electron/electron/actions/runs/13465984907

Activity

  1. added
    upgrade-follow-up
    on Feb 24, 2025
  2. moved this to 👀 Unsorted Items in 35-x-yon Feb 24, 2025
  3. changed the title [-][Upgrades Follow] Enable MacWebContentsOcclusion[/-] [+][Upgrades Follow Up]: Enable MacWebContentsOcclusion[/+] on Feb 24, 2025
  4. added theissue type on Feb 24, 2025
  5. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 35-x-yon Mar 3, 2025
  6. electron-issue-triage commented on May 27, 2025

    @electron-issue-triage

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  7. MaksymPylypenko commented on Dec 12, 2025

    @MaksymPylypenko

    Any progress on this?
    Covering the app window or moving it to a new screen results in 2 visibilitychange events. document.visibilityState is hidden (correct) at first, but then immediately (after 10-20ms) changes to visible (incorrect) and stays like that.

    My environment for context

    • Device: MacBook Air M1
    • macOS: Sequoia 15.7.1
    • Electron: 37.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

35-x-yplatform/macOSupgrade-follow-up

Type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions