From 6456f13bdee6dd6e916b63d9958761065def0d5d Mon Sep 17 00:00:00 2001 From: Psychotoxical Date: Sun, 19 Apr 2026 12:28:22 +0200 Subject: [PATCH] fix(player-bar): contain paint to prevent black-flash on WebKitGTK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The player bar occasionally renders fully black for one frame on Linux (WebKitGTK with software compositing) when an unrelated layer elsewhere in the page invalidates. `contain: layout paint` makes the bar its own paint boundary so it can no longer be pulled into a surrounding dirty rect. No-op on Wayland-with-GPU and on Chromium-based webviews (Windows, macOS) — those don't exhibit the flash to begin with. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/styles/layout.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/styles/layout.css b/src/styles/layout.css index 607e6c6b..ce43f3a0 100644 --- a/src/styles/layout.css +++ b/src/styles/layout.css @@ -1145,6 +1145,11 @@ height: var(--player-height); position: relative; z-index: 100; + /* WebKitGTK (software compositing) occasionally paints the bar fully + black for one frame when an unrelated layer in the page invalidates. + `contain` isolates layout/paint so the bar's region cannot + participate in the surrounding dirty rect. */ + contain: layout paint; } .player-track-info {