mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
Ensure AccumulatedVisualContext stays synchronized when CSS transform properties change. AccumulatedVisualContext copies transform and perspective matrices from the paintable tree at assignment time. When CSS properties that affect these matrices change (transform, rotate, scale, translate, perspective, transform-origin, perspective-origin), we must rebuild the AccumulatedVisualContext tree to reflect the new values. This adds a rebuild_accumulated_visual_contexts flag to style invalidation that triggers a full rebuild during the next paint. Note: The current invalidation strategy is inefficient - it rebuilds the entire tree even for single-element transform changes. This could be improved by patching the AccumulatedVisualContext node in-place with updated matrices, but only when the transform doesn't transition from/to none (which would change the tree structure). This optimization is left for future work.