Closed Bug 1824804 Opened 2 years ago Closed 2 years ago

WPT failure in css/css-masking/clip-path-svg-content/mask-nested-clip-path-001.svg

Categories

(Core :: SVG, defect)

defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: dholbert, Assigned: longsonr)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Firefox fails this WPT:
https://wpt.fyi/results/css/css-masking/clip-path-svg-content/mask-nested-clip-path-001.svg
http://wpt.live/css/css-masking/clip-path-svg-content/mask-nested-clip-path-001.svg

The test expects there to be a 2x2 grid of white squares over the green square. Firefox is failing to render the bottom-right white square.

That square seems to be defined by #clip0, which in turn is used by a clipping path inside the definition for another clipping path, #clip2. (i.e. if I adjust the height of #clip0 in Chrome, then I see that bottom-right white square changing its height accordingly)

Something's going wrong at some point in the chain of applying that clipping path, I guess.

Attached image reduced testcase 1

Here's a somewhat reduced testcase, where I've snipped out a version of the clipPath here and I'm varying the transform that's applied to it.

We render this testcase with quite noticeably different sizes & positions for the colorful bars, as compared to Chromium & WebKit.

Here's a screenshot comparing our rendering (left) vs. other browser engines. Red arrows show the most visibly-different sections.

The rendering difference goes back a long ways; Chrome 15 (the oldest version I can test on BrowserStack, on Win7 / XP) looks like it matches current Chrome on my attached reduced-testcase; and Firefox 6 (just the oldest version I tested) matches current Firefox.

Attached image reduced testcase 2

Here's a simpler reduced testcase, comparing a clipped rect vs. what-that-clipped-rect-looks-like-when-used-itself-as-a-clip-path-for-another-rect.

The Blue/Teal pair have a 1x scale on the rect, while the Brown/Orange pair have a 2x horizontal scale.

Firefox renders the orange rect skinnier than other browsers. It looks like we're applying the "clip-to-#inner" operation after applying the 2x scale in that case, instead of beforehand; or something to that effect.

CC'ing longsonr in case he's interested to poke at this SVG interop issue (though no pressure if you don't have cycles).

See Also: → 1712301
Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Pushed by longsonr@gmail.com: https://hg.mozilla.org/integration/autoland/rev/e29e3f98d069 apply transform for clipPaths that are children of clipPaths r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: