diff --git a/components/layout/taffy/layout.rs b/components/layout/taffy/layout.rs index 12d47947fc5..c5f66eee6d2 100644 --- a/components/layout/taffy/layout.rs +++ b/components/layout/taffy/layout.rs @@ -320,6 +320,7 @@ impl taffy::LayoutGridContainer for TaffyContainerContext<'_> { ) -> Self::GridItemStyle<'_> { let id = usize::from(child_node_id); let child = (*self.source_child_nodes[id]).borrow(); + // 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) diff --git a/components/layout/taffy/stylo_taffy/convert.rs b/components/layout/taffy/stylo_taffy/convert.rs index f45a705148d..6ac2e983602 100644 --- a/components/layout/taffy/stylo_taffy/convert.rs +++ b/components/layout/taffy/stylo_taffy/convert.rs @@ -41,7 +41,7 @@ pub fn length_percentage(val: &stylo::LengthPercentage) -> taffy::LengthPercenta match val.unpack() { stylo::UnpackedLengthPercentage::Length(len) => length(len.px()), stylo::UnpackedLengthPercentage::Percentage(percentage) => percent(percentage.0), - stylo::UnpackedLengthPercentage::Calc(_) => length(0.0), + stylo::UnpackedLengthPercentage::Calc(_) => percent(0.0), } }