Skip to content

@remotion/web-renderer: Fix opacity leaking between layers - #9567

Merged
JonnyBurger merged 4 commits into
mainfrom
codex/fix-web-renderer-opacity-overflow
Jul 24, 2026
Merged

@remotion/web-renderer: Fix opacity leaking between layers#9567
JonnyBurger merged 4 commits into
mainfrom
codex/fix-web-renderer-opacity-overflow

Conversation

@JonnyBurger

@JonnyBurger JonnyBurger commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

  • restore the overflow: hidden canvas state before resetting opacity so a fading layer cannot leak alpha into later siblings
  • add a cross-browser regression test for an opaque layer covering a fading clipped layer

Testing

  • bun run build
  • bun run stylecheck
  • bun run testwebrenderer (648 passed, 21 skipped)

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Building Building Preview, Comment Jul 24, 2026 9:58am
remotion Ready Ready Preview, Comment Jul 24, 2026 9:58am

Request Review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 cleanupAfterChildren order in drawElement — calls finishOverflowHidden() before finishFilter() and finishOpacity() so the canvas state restore from overflow: hidden cannot reapply a parent's opacity/filter after they've been cleared.
  • Add opaque-layer-over-fading-layer test 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.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the opaque-layer-over-fading-layer test.
  • Wire up testImage — adds the import and snapshot comparison call in opaque-layer-over-fading-layer.test.tsx.

✅ No new issues found.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

@JonnyBurger
JonnyBurger merged commit aa83ed3 into main Jul 24, 2026
20 checks passed
@JonnyBurger
JonnyBurger deleted the codex/fix-web-renderer-opacity-overflow branch July 24, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant