Bug 249141 - [LBSE] Do not relayout on dynamic transform changes, if not necessary
Summary: [LBSE] Do not relayout on dynamic transform changes, if not necessary
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nikolas Zimmermann
URL:
Keywords: InRadar
Depends on: 249142
Blocks: 90738
  Show dependency treegraph
 
Reported: 2022-12-12 05:34 PST by Nikolas Zimmermann
Modified: 2024-01-18 14:41 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.