From b8c82c1ab00dc8d3738523b60afd9cdcf548e83c Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Wed, 27 Mar 2024 12:57:27 +0100 Subject: layout: Allow transforming inline replaced elements (#31833) This requires passing through information about whether or not the element in question is replaced when checking to see if it's transformable and transitively all functions that make decisions about containing blocks. A new FragmentFlag is added to help track this -- it will be set on both the replaced items BoxFragment container as well as the Fragment for the replaced item itself. Fixes #31806. --- components/layout_2020/fragment_tree/fragment.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/layout_2020/fragment_tree/fragment.rs') diff --git a/components/layout_2020/fragment_tree/fragment.rs b/components/layout_2020/fragment_tree/fragment.rs index 151a004aa13..b13fab0ddd4 100644 --- a/components/layout_2020/fragment_tree/fragment.rs +++ b/components/layout_2020/fragment_tree/fragment.rs @@ -192,12 +192,12 @@ impl Fragment { .translate(containing_block.origin.to_vector()); let new_manager = if fragment .style - .establishes_containing_block_for_all_descendants() + .establishes_containing_block_for_all_descendants(fragment.base.flags) { manager.new_for_absolute_and_fixed_descendants(&content_rect, &padding_rect) } else if fragment .style - .establishes_containing_block_for_absolute_descendants() + .establishes_containing_block_for_absolute_descendants(fragment.base.flags) { manager.new_for_absolute_descendants(&content_rect, &padding_rect) } else { -- cgit v1.2.3