Bug 121124
Summary: | Update SVGResourcesCache on SVG root insertion and removal | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | SVG | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Tim Horton
Seems reasonable to me.
Ahmad Saleem
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!