Bug 242425
Summary: | avoid invalidating SVG resources when referencing element changes style | ||
---|---|---|---|
Product: | WebKit | Reporter: | Cameron McCormack (:heycam) <heycam> |
Component: | SVG | Assignee: | Cameron McCormack (:heycam) <heycam> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | sabouhallawa, webkit-bug-importer, zimmermann |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Cameron McCormack (:heycam)
SVGResourcesCache::clientStyleChanged will destroy then recreate the SVG resources for an element when it is restyled and the StyleDifference is not Repaint or RepaintIfText. This is not necessary for many property changes. We only need to do this if there is a change in which resource is being referenced (i.e., the clip-path, mask-image, fill, etc. property changed), or if there is a property change on the element that a cached resource depends on.
One specific example is when the transform of a client RenderElement changes. With the work to make resources handle client layout changes lazily in bug 242420, transforms will be taken into account as part of the resource validation process at paint time, if needed. So if the transform changes we don't need to destroy and recreate the full set of SVG resources here in clientStyleChanged.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/96572561>
Cameron McCormack (:heycam)
Pull request: https://github.com/WebKit/WebKit/pull/2154
EWS
Committed 252484@main (fda943aadc10): <https://commits.webkit.org/252484@main>
Reviewed commits have been landed. Closing PR #2154 and removing active labels.