RESOLVED FIXED 130127
Nested use of same SVG resource fails
https://bugs.webkit.org/show_bug.cgi?id=130127
Summary Nested use of same SVG resource fails
Dirk Schulze
Reported 2014-03-12 06:54:13 PDT
Created attachment 226500 [details] Example - passes if you see a circle An element is filled with a pattern #p1. The element gets masked as well. If this mask makes use of #p1 as well, then it fails. This is probably a problem with the cycle detection code for SVG resources. For some reason the code detects a cycle even though this is absolutely fine. Creating a second pattern with a different id makes the example work. The example passes if you see a circle.
Attachments
Example - passes if you see a circle (343 bytes, image/svg+xml)
2014-03-12 06:54 PDT, Dirk Schulze
no flags
Ahmad Saleem
Comment 1 2023-01-07 15:31:35 PST
It is still happening with Safari 16.2 and Safari Technology Preview 160, it was fixed in Blink with following commit: Commit - https://src.chromium.org/viewvc/blink?view=revision&revision=175129 & https://src.chromium.org/viewvc/blink?revision=174862&view=revision WebKit Source (Example) - https://searchfox.org/wubkat/source/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp#53 Just wanted to share this. Might be bit out of my area of expertise to try to merge this and don't want to cause collision with on-going LBSE work as well (if it reaches in this realm). Just wanted to share. Thanks!
Tim Nguyen (:ntim)
Comment 2 2023-01-07 16:53:31 PST
> Might be bit out of my area of expertise to try to merge this and don't want to cause collision with on-going LBSE work as well (if it reaches in this realm). I don't think there is any collision with LBSE in this case. LBSE does not affect resource resolution.
Ahmad Saleem
Comment 3 2023-05-14 03:51:43 PDT
(In reply to Ahmad Saleem from comment #1) > It is still happening with Safari 16.2 and Safari Technology Preview 160, it > was fixed in Blink with following commit: > > Commit - https://src.chromium.org/viewvc/blink?view=revision&revision=175129 > & https://src.chromium.org/viewvc/blink?revision=174862&view=revision > > WebKit Source (Example) - > https://searchfox.org/wubkat/source/Source/WebCore/rendering/svg/ > SVGResourcesCycleSolver.cpp#53 > > Just wanted to share this. Might be bit out of my area of expertise to try > to merge this and don't want to cause collision with on-going LBSE work as > well (if it reaches in this realm). Just wanted to share. Thanks! We only need to do: https://src.chromium.org/viewvc/blink?view=revision&revision=175129 ^ I tried but I think our code has also evolved, so it is not 1-1, there are still some similarities but we have WeakHashSet intro in this code as well. @Ryosuke did some WeakHashSet intro in various places of code. Might be something you can have a look?
Ryosuke Niwa
Comment 4 2023-05-25 02:15:43 PDT
EWS
Comment 5 2023-05-26 20:52:07 PDT
Committed 264618@main (99265dce4d2f): <https://commits.webkit.org/264618@main> Reviewed commits have been landed. Closing PR #14338 and removing active labels.
Radar WebKit Bug Importer
Comment 6 2023-05-26 20:53:16 PDT
Note You need to log in before you can comment on or make changes to this bug.