Skip to content

[Bug]: Rendering bugs when WebContentsView has a transparent background in Electron 31 #42335

Description

@Hans-Halverson

Preflight Checklist

Electron Version

31.0.0-beta.7

What operating system are you using?

macOS

Operating System Version

macOS Sonoma 14.4.1

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

30.0.9

Expected Behavior

When a WebContentsView has a transparent background we should be able to render animated or partially transparent content without visual bugs appearing.

Actual Behavior

Visual bugs appear, seeming like paints keep happen on top of each other and keep compounding until you take some action e.g. resizing the window. For example an animated spinner quickly turns into a full, solid circle. Or a partially transparent rectangle starts to get darker over time as the paints keep layering on top of each other.

A gist is attached with this behavior, and the following video shows what I mean since it's a bit hard to describe:

Electron31TransparentRenderingBugs.mov

Testcase Gist URL

https://gist.github.com/6be5a293066790bf03432da7baeb7894

Additional Information

This only appears to happen when the WebContentsView's background color is set to be transparent. If you remove the setBackgroundColor line from the attached Gist the visual bugs dissappear.

I tracked this down to #41326, as this issue was introduced between v31.0.0-nightly.20240304 and v31.0.0-nightly.20240305 and that is the only commit in between. I can also confirm that reverting this PR fixes these visual bugs for me locally.

Activity

  1. added
    has-repro-gist
    on May 31, 2024
  2. moved this to 👀 Unsorted Items in 31-x-yon May 31, 2024
  3. added
    status/confirmed
    on Jun 3, 2024
  4. moved this to 👀 Unsorted Items in 32-x-yon Jun 20, 2024
  5. self-assigned this
    on Jun 20, 2024
  6. moved this from 👀 Unsorted Items to 🛑 Blocks Stable in 32-x-yon Jun 20, 2024
  7. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 31-x-yon Jun 20, 2024
  8. moved this from 🛑 Blocks Stable to 🛠️ Fixed for Next Release in 32-x-yon Jul 31, 2024
  9. added 2 commits that reference this issue on Nov 11, 2024
    13476eb
    e64b6d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

31-x-y32-x-ybug 🪲component/WebContentsViewhas-repro-gistplatform/macOSstatus/confirmed

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions