diff options
Diffstat (limited to 'components/layout/taffy/layout.rs')
-rw-r--r-- | components/layout/taffy/layout.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/components/layout/taffy/layout.rs b/components/layout/taffy/layout.rs index 61c4a0508e9..c5f66eee6d2 100644 --- a/components/layout/taffy/layout.rs +++ b/components/layout/taffy/layout.rs @@ -107,7 +107,7 @@ impl taffy::LayoutPartialTree for TaffyContainerContext<'_> { Self: 'a; fn get_core_container_style(&self, _node_id: taffy::NodeId) -> Self::CoreContainerStyle<'_> { - TaffyStyloStyle(self.style) + TaffyStyloStyle::new(self.style, false /* is_replaced */) } fn set_unrounded_layout(&mut self, node_id: taffy::NodeId, layout: &taffy::Layout) { @@ -311,7 +311,7 @@ impl taffy::LayoutGridContainer for TaffyContainerContext<'_> { &self, _node_id: taffy::prelude::NodeId, ) -> Self::GridContainerStyle<'_> { - TaffyStyloStyle(self.style) + TaffyStyloStyle::new(self.style, false /* is_replaced */) } fn get_grid_child_style( @@ -320,7 +320,10 @@ impl taffy::LayoutGridContainer for TaffyContainerContext<'_> { ) -> Self::GridItemStyle<'_> { let id = usize::from(child_node_id); let child = (*self.source_child_nodes[id]).borrow(); - TaffyStyloStyle(AtomicRef::map(child, |c| &*c.style)) + // TODO: account for non-replaced elements that are "compressible replaced" + let is_replaced = child.is_in_flow_replaced(); + let stylo_style = AtomicRef::map(child, |c| &*c.style); + TaffyStyloStyle::new(stylo_style, is_replaced) } fn set_detailed_grid_info( |