Skip to content

fix(clipPaths): Fix svg element clipping - CU-86c8x20du#1

Merged
AshishBhattarai merged 1 commit intomasterfrom
fix-clipping-on-firefox
Mar 18, 2026
Merged

fix(clipPaths): Fix svg element clipping - CU-86c8x20du#1
AshishBhattarai merged 1 commit intomasterfrom
fix-clipping-on-firefox

Conversation

@AshishBhattarai
Copy link
Collaborator

What kind of change does this PR introduce?

  • Fixes svg clip paths on firefox

@AshishBhattarai AshishBhattarai merged commit 49b0da7 into master Mar 18, 2026
8 checks passed
@AshishBhattarai AshishBhattarai requested a review from Copilot March 18, 2026 17:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the SVG-to-PDF rendering path to improve <clipPath> behavior in Firefox’s built-in PDF viewer by changing how soft masks are generated and how clip content is colored.

Changes:

  • Switch soft-mask mode for clipPath application to always use Luminosity (instead of conditional Alpha).
  • Introduce a clip-specific fill-color path that forces RGB output (by temporarily clearing doc._activeColorProfile).
  • Update clip drawing call sites to pass isClip into docFillColor and simplify docApplyMask usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants