Closed Bug 1780726 Opened 3 years ago Closed 3 years ago

Wrong clip-path rendering when box-shadow applied

Categories

(Core :: SVG, defect)

Firefox 102
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: johncido, Unassigned, NeedInfo)

Details

Attachments

(2 files)

Attached image Wrong behavior

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Steps to reproduce:

I added an SVG with a clipPath scaled down to 1x1px in size. And set the clipPathUnits="objectBoundingBox" and a unique ID so I can use the clip-path and change the size of it. I use this clip-path to display a polygon-shaped user avatar. It works fine when I tried it on images. But after I add another background beneath the avatar with a box-shadow, things go terribly wrong.

Actual results:

Instead of clip the element to the right size and rendering a box-shadow behind it, the clip mask becomes larger than expected.

Expected results:

Clip to the right size and render the shadow correctly.

Attached image Correct behavior

I understand the box shadow has no effect when clip-path is applied, but at least the clip-path should be rendered correctly.

The Bugbug bot thinks this bug should belong to the 'Core::SVG' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → SVG
Product: Firefox → Core

The severity field is not set for this bug.
:emilio, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

Sorry for the lag here. Can you attach a test-case that reproduces the issue please? That'd be great to be able to investigate this. Thank you.

Flags: needinfo?(emilio) → needinfo?(johncido)

Do reopen if you attach a testcase.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: