@remotion/web-renderer: Fix opacity leaking between layers - #9567
Conversation
There was a problem hiding this comment.
Reviewed changes — fixes opacity leaking between layers in the web-renderer canvas compositor by reordering cleanup so that ctx.restore() from overflow: hidden runs before manual opacity and filter resets, and adds a cross-browser regression test.
- Fix
cleanupAfterChildrenorder indrawElement— callsfinishOverflowHidden()beforefinishFilter()andfinishOpacity()so the canvas state restore fromoverflow: hiddencannot reapply a parent's opacity/filter after they've been cleared. - Add
opaque-layer-over-fading-layertest fixture and test — renders a 0.3-opacity blue layer beneath an opaque red layer, asserts the center pixel is solid red, and snapshots across Chromium, Firefox, and WebKit.
✅ No new issues found.
DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏
There was a problem hiding this comment.
Reviewed changes — adds generated screenshot baselines for the new opacity regression test across Chromium, Firefox, and WebKit on Darwin, and wires up testImage snapshot comparison in the test file.
- Add screenshot baselines — three PNG snapshots (
chromium-darwin,firefox-darwin,webkit-darwin) generated from theopaque-layer-over-fading-layertest. - Wire up
testImage— adds the import and snapshot comparison call inopaque-layer-over-fading-layer.test.tsx.
✅ No new issues found.
DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

Summary
overflow: hiddencanvas state before resetting opacity so a fading layer cannot leak alpha into later siblingsTesting
bun run buildbun run stylecheckbun run testwebrenderer(648 passed, 21 skipped)