| Summary: | [LBSE] Do not relayout on dynamic transform changes, if not necessary | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nikolas Zimmermann <zimmermann> |
| Component: | SVG | Assignee: | Nikolas Zimmermann <zimmermann> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | heycam, rbuis, sabouhallawa, simon.fraser, webkit-bug-importer, zimmermann |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 249142 | ||
| Bug Blocks: | 90738 | ||
Pull request: https://github.com/WebKit/WebKit/pull/7482 Committed 259158@main (b348ce7635b6): <https://commits.webkit.org/259158@main> Reviewed commits have been landed. Closing PR #7482 and removing active labels. |
The legacy SVG engine always had to perform relayouts when the transform of an element changed (up to the containing block, stopping at RenderSVGRoot boundary in case of mixed SVG/HTML documents). Container position and sizes were affected by the transformations of the descendants. That's no longer the case in LBSE, which follows CSS/HTML style of making transformations a paint effect, not inducing costly relayouts. However this only works if SVG <text> elements are not involved: SVG text always needs a relayout, as the "screen font size scaling factor" depends on the CTM of the transformed element (all transformations from target element up to RenderSVGRoot enter the calculation). The patch will present a solution for that, giving us transform updates without relayouts for everything except text, which is a good start.