Bug 249141

Summary: [LBSE] Do not relayout on dynamic transform changes, if not necessary
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: SVGAssignee: 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    

Description Nikolas Zimmermann 2022-12-12 05:34:26 PST
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.
Comment 1 Nikolas Zimmermann 2022-12-12 05:39:34 PST
Pull request: https://github.com/WebKit/WebKit/pull/7482
Comment 2 Radar WebKit Bug Importer 2022-12-19 05:35:13 PST
<rdar://problem/103512891>
Comment 3 EWS 2023-01-20 17:20:04 PST
Committed 259158@main (b348ce7635b6): <https://commits.webkit.org/259158@main>

Reviewed commits have been landed. Closing PR #7482 and removing active labels.