Bug 121124

Summary: Update SVGResourcesCache on SVG root insertion and removal
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, heycam, pdr, rreno, simon.fraser, thorton, zalan, zimmermann
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Ryosuke Niwa
Reported 2013-09-10 14:23:57 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/0018f5ede8c39b6d63f7719dc0d5dcc8995b0004 SVG renderers update the SVGResourcesCache when children are added or removed using the addChild and removeChild methods. The root SVG renderer (RenderSVGRoot) may not properly update its own resources cache because its parent will not go through the SVG addChild/removeChild functions. This patch updates RenderSVGRoot to hook insertedIntoTree and willBeRemovedFromTree to update the resources cache for the root.
Attachments
Tim Horton
Comment 1 2013-09-10 14:27:50 PDT
Seems reasonable to me.
Ahmad Saleem
Comment 2 2022-08-22 15:56:42 PDT
I took the test case from the patch and changed it into JSFiddle: Link - https://jsfiddle.net/m2ozd0kb/show It shows "Green" rectangle for all browsers (Safari 15.6.1, Safari Technology Preview 151, Firefox Nightly 105 and Chrome Canary 106), I think this can be marked as 'RESOLVED CONFIGURATION CHANGED'. Thanks!
Note You need to log in before you can comment on or make changes to this bug.