render: honor transform containing blocks

Track every non-none transform as a containing-block trigger, including
unsupported visual transforms. Keep separate nearest-ancestor maps so
positioned boxes capture absolute descendants while only transforms capture
fixed descendants.
This commit is contained in:
SGavrl committed 2026-07-23 11:47:00 +00:00
1 parent 1526d02200
commit bbeceb97ad
4 files changed
+83 -19

No files matched your search

+4
View File
@@ -415,6 +415,10 @@ pub struct LayoutStyle {
/// off-screen skip-link out of view instead of painting it on-screen. Not
/// inherited (transform is a non-inherited property).
pub transform_translate: Option<(Dimension, Dimension)>,
/// Any computed transform other than `none` establishes containing blocks
/// for absolute and fixed descendants, even when its visual transform
/// function is not yet supported by the paint engine.
pub transform_establishes_containing_block: bool,
/// `transform: scale(sx[, sy])` / `scaleX` / `scaleY`, captured as (sx, sy).
/// Parsed and stored so a value that mixes scale with translate still yields
/// its translate part; scale is not yet folded into paint geometry (doing so