mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Set default back to 0%
Signed-off-by: Nico Burns <nico@nicoburns.com>
This commit is contained in:
parent
9509a19dc7
commit
cc64da821b
2 changed files with 2 additions and 1 deletions
|
@ -320,6 +320,7 @@ impl taffy::LayoutGridContainer for TaffyContainerContext<'_> {
|
||||||
) -> Self::GridItemStyle<'_> {
|
) -> Self::GridItemStyle<'_> {
|
||||||
let id = usize::from(child_node_id);
|
let id = usize::from(child_node_id);
|
||||||
let child = (*self.source_child_nodes[id]).borrow();
|
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 is_replaced = child.is_in_flow_replaced();
|
||||||
let stylo_style = AtomicRef::map(child, |c| &*c.style);
|
let stylo_style = AtomicRef::map(child, |c| &*c.style);
|
||||||
TaffyStyloStyle::new(stylo_style, is_replaced)
|
TaffyStyloStyle::new(stylo_style, is_replaced)
|
||||||
|
|
|
@ -41,7 +41,7 @@ pub fn length_percentage(val: &stylo::LengthPercentage) -> taffy::LengthPercenta
|
||||||
match val.unpack() {
|
match val.unpack() {
|
||||||
stylo::UnpackedLengthPercentage::Length(len) => length(len.px()),
|
stylo::UnpackedLengthPercentage::Length(len) => length(len.px()),
|
||||||
stylo::UnpackedLengthPercentage::Percentage(percentage) => percent(percentage.0),
|
stylo::UnpackedLengthPercentage::Percentage(percentage) => percent(percentage.0),
|
||||||
stylo::UnpackedLengthPercentage::Calc(_) => length(0.0),
|
stylo::UnpackedLengthPercentage::Calc(_) => percent(0.0),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue