CSS "clip-path" doesn't work (clips everything?) inside marker
Categories
(Core :: SVG, defect, P3)
Tracking
()
People
(Reporter: dholbert, Assigned: violet.bugreport)
References
Details
Attachments
(3 files)
STR:
- Load attached testcase.
EXPECTED RESULTS:
Three rects: skinny, square, skinny.
ACTUAL RESULTS:
Only the top rect is visible (the one that's not in a marker).
NOTES:
The first and third rect use the same clip-path; the only difference is that the third one is inside of a marker.
The second rect (also inside of a marker) uses a trivial clip-path, "inset(0px)", which clips away everything even though it shouldn't clip anything.
Chrome gives EXPECTED RESULTS.
Firefox gives ACTUAL RESULTS.
Edge/Safari don't do any clipping at all. (They render 3 squares).
Reporter | ||
Comment 1•6 years ago
|
||
Here's another testcase, which is expected to render the same as the first (but produces the same bad results).
This one uses 'polygon' to do the clipping on the first and third rect, and fill-box
to produce a trivial no-op clipping region for the second rect.
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 2•6 years ago
|
||
This may be a version of (or related to) bug 1323962... Maybe we implement CSS clip-path
in a way that depends on display lists, which means indirectly rendered things don't work with it? (not sure)
Anyway, adding dependency for now.
Reporter | ||
Comment 3•6 years ago
|
||
Note: bug 1323962 is now fixed in latest Nightly (2019-04-23), but I'm still seeing the same "ACTUAL RESULTS" on the testcases in this bug here.
So, this was not a duplicate of bug 1323962 [though I had suspected it might be].
violet.bugreport: if you're looking for other similar bugs, perhaps this one might interest you. :)
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 4•6 years ago
|
||
The cause is that nsCSSClipPathInstance::ApplyBasicShapeOrPathClip
fails to consider transforms under a certain code path. However, even if it's fixed, there is still a missing box in testcase2, because clip-path: fill-box
is simply not implemented (https://searchfox.org/mozilla-central/source/layout/svg/nsCSSClipPathInstance.cpp#97). Filed a new bug as "See Also".
Assignee | ||
Comment 5•6 years ago
|
||
nsSVGUtils::PaintFrameWithEffects needs to pass its transform to
nsCSSClipPathInstance::ApplyBasicShapeOrPathClip so that the latter
can compute the correct box.
Pushed by violet.bugreport@gmail.com: https://hg.mozilla.org/integration/autoland/rev/2a3c00a2d761 nsCSSClipPathInstance::ApplyBasicShapeOrPathClip should consider transform r=longsonr
Comment 7•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Description
•