| Summary: | ☂️ avoid invalidating SVG resources when referencing element changes layout | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Cameron McCormack (:heycam) <heycam> |
| Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | sabouhallawa, webkit-bug-importer, zimmermann |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 242778, 242421, 242423 | ||
| Bug Blocks: | |||
|
Description
Cameron McCormack (:heycam)
2022-07-06 21:26:02 PDT
The pattern I will use for all of the resource classes is to store the dependencies that came from the referencing RenderElement (such as its object bounding box) on the data object we store in the HashMap of the resource container object. Then, under applyResource, we compute those dependencies and compare them against the cached values. If they differ, we invalidate the cached values (such as the RefPtr<Gradient> of a gradient resource or the RefPtr<ImageBuffer> of a mask resource) and recompute them. |